IReadOnlyTopicCollection.TryGetById Method

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

Definition

Attempts to lookup a topic in the topic hierarchy by its qualified identifier.
bool TryGetById(string id, [NotNullWhen(true)] out TopicModel topic)

Parameters

id string
The qualified identifier of the topic to lookup.
topic TopicModel
When this method returns, contains the topic if found; otherwise, null.

Returns

bool
true if the topic was found; otherwise, false.

Remarks

This method performs a case-insensitive lookup for a topic by its identifier in constant time O(1).

The identifier must be fully qualified, which means it should include the identifier of all parent topics in the hierarchy separated by slashes ('/').