Table of Contents

Method GetSectionByIdentifierAsync

Namespace
LMKit.Data
Assembly
LM-Kit.NET.dll

GetSectionByIdentifierAsync(string, CancellationToken)

Asynchronously retrieves a Section object from this instance based on the specified identifier.

public Task<Section> GetSectionByIdentifierAsync(string sectionIdentifier, CancellationToken cancellationToken = default)

Parameters

sectionIdentifier string

The unique identifier for the section to be retrieved. This identifier is used to locate the corresponding Section within the collection.

cancellationToken CancellationToken

A token to monitor for cancellation requests. The default value is None.

Returns

Task<Section>

A Task<TResult> representing the asynchronous operation. The task result contains the Section that matches the given identifier.

Exceptions

KeyNotFoundException

Thrown when no section with the specified identifier can be found in the collection.