TopicCollection.TryResolve Method
- Namespace
- Kampute.DocToolkit.Collections
- Assembly
- Kampute.DocToolkit.dll
Definition
Attempts to resolve a topic in the collection based on the provided reference string.
public bool TryResolve(string reference, [NotNullWhen(true)] out TopicModel topic)Parameters
referencestring- The reference string used to identify the topic, such as a file path or identifier.
topicTopicModel- When this method returns, contains the resolved topic if found; otherwise,
null.

reference, which can be a file path or a topic identifier. If the reference is relative, it is resolved against the currently active model in the documentation context.The resolution process first tries to find a file-backed topic by the given reference. If no such topic is found, it then attempts to find a topic by its identifier. The search is case-insensitive and directory separators can be either slash ('/') or backslash ('\').