Method RemoveSection
RemoveSection(Section, CancellationToken)
Removes the specified Section from this DataSource.
public bool RemoveSection(Section section, CancellationToken cancellationToken = default)
Parameters
sectionSectionThe Section instance to remove. This parameter must not be null.
cancellationTokenCancellationTokenA token to monitor for cancellation requests. The default value is None.
Returns
- bool
trueif the section was successfully removed; otherwise,false.
Exceptions
- ArgumentNullException
Thrown if
sectionis null.
RemoveSection(string, CancellationToken)
Removes the section identified by the specified identifier from this DataSource.
public bool RemoveSection(string sectionIdentifier, CancellationToken cancellationToken = default)
Parameters
sectionIdentifierstringThe unique identifier of the section to remove. This parameter must not be null, empty, or consist solely of white-space characters.
cancellationTokenCancellationTokenA token to monitor for cancellation requests. The default value is None.
Returns
- bool
trueif a section with the specified identifier was found and removed; otherwise,false.
Exceptions
- ArgumentNullException
Thrown if
sectionIdentifieris null, empty, or white-space.