Method AddIfAbsentAsync
- Namespace
- IntentSharp.Mapping
- Assembly
- IntentSharp.dll
AddIfAbsentAsync(CompiledMapping, CancellationToken)
First writer wins: when the key has no active revision, stores mapping as the next revision (1 for
a new key) with the status Active. Returns the active row: this one, or the one another writer stored first.
public Task<CompiledMapping> AddIfAbsentAsync(CompiledMapping mapping, CancellationToken cancellationToken = default)
Parameters
mappingCompiledMappingcancellationTokenCancellationTokenCancels the write.
Returns
- Task<CompiledMapping>
Exceptions
- ArgumentNullException
mappingis null.- ArgumentException
The row cannot be stored: a member it needs is missing.