Class SequentialValueService
Service for generating new sequential values.
Implements
Inherited Members
Namespace: DataWeb.Data
Assembly: DataWeb.Core.dll
Syntax
public class SequentialValueService : ISequentialValueService
Remarks
Constructor for SequentialValueService.
Constructors
SequentialValueService(ISequentialValueStore)
Service for generating new sequential values.
Declaration
public SequentialValueService(ISequentialValueStore sequentialValueStore)
Parameters
| Type | Name | Description |
|---|---|---|
| ISequentialValueStore | sequentialValueStore | The store used for generating new sequential values. |
Remarks
Constructor for SequentialValueService.
Methods
GetNewValueAsync(string, CancellationToken)
Gets a new sequential value for the given name.
Declaration
public Task<int> GetNewValueAsync(string name, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the sequential value to get. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<int> | The new sequential value. |
Exceptions
| Type | Condition |
|---|---|
| Exception | Thrown when the name parameter is null or empty. |