Table of Contents

Method RemoveSectionAsync

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

RemoveSectionAsync(Section, CancellationToken)

Asynchronously removes the specified Section from this DataSource.

public Task<bool> RemoveSectionAsync(Section section, CancellationToken cancellationToken = default)

Parameters

section Section

The Section instance to remove. This parameter must not be null.

cancellationToken CancellationToken

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

Returns

Task<bool>

A Task<TResult> representing the asynchronous operation. The task result contains true if the section was successfully removed; otherwise, false.

Exceptions

ArgumentNullException

Thrown if section is null.

RemoveSectionAsync(string, CancellationToken)

Asynchronously removes the section identified by the specified identifier from this DataSource.

public Task<bool> RemoveSectionAsync(string sectionIdentifier, CancellationToken cancellationToken = default)

Parameters

sectionIdentifier string

The unique identifier of the section to remove. This parameter must not be null, empty, or consist solely of white-space characters.

cancellationToken CancellationToken

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

Returns

Task<bool>

A Task<TResult> representing the asynchronous operation. The task result contains true if a section with the specified identifier was found and removed; otherwise, false.

Exceptions

ArgumentNullException

Thrown if sectionIdentifier is null, empty, or white-space.