TopicCollection.TryFindBySubpath Method

Namespace
Kampute.DocToolkit.Collections
Assembly
  • Kampute.DocToolkit.dll

Definition

Attempts to find a file-backed topic in the topic hierarchy by its subpaths.
public bool TryFindBySubpath(string filePath, [NotNullWhen(true)] out TopicModel topic)

Parameters

filePath string
The file path or subpath of the topic to lookup.
topic TopicModel
When this method returns, contains the topic that uniquely matches the specified file path or subpath; otherwise, null if no match or if ambiguous.

Returns

bool
true if a unique matching topic was found; otherwise, false.

Exceptions

ArgumentException
Thrown when filePath is null or empty.