DataWeb
Search Results for

    Show / Hide Table of Contents

    Class SequentialValueStore

    Cosmos DB implementation of ISequentialValueStore using atomic increment via patch API.

    Inheritance
    object
    SequentialValueStore
    Implements
    ISequentialValueStore
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Data.AzureCosmosDB
    Assembly: DataWeb.Data.AzureCosmosDB.dll
    Syntax
    public class SequentialValueStore : ISequentialValueStore

    Constructors

    SequentialValueStore(ICosmosHelper, IConfigurationService)

    Cosmos DB implementation of ISequentialValueStore using atomic increment via patch API.

    Declaration
    public SequentialValueStore(ICosmosHelper cosmosHelper, IConfigurationService configurationService)
    Parameters
    Type Name Description
    ICosmosHelper cosmosHelper
    IConfigurationService configurationService

    Properties

    Name

    Provider name identifier.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string

    Methods

    GetNewValueAsync(string, CancellationToken)

    Atomically increments the counter for name and returns the new value.

    Declaration
    public Task<int> GetNewValueAsync(string name, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string name
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<int>
    Exceptions
    Type Condition
    ArgumentException

    Thrown if name is null or empty.

    SeedValueAsync(string, CancellationToken)

    Creates or resets the counter document for name with value 0.

    Declaration
    public Task SeedValueAsync(string name, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string name
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    Exceptions
    Type Condition
    ArgumentException

    Thrown if name is null or empty.

    Implements

    ISequentialValueStore
    In this article
    Back to top Generated by DocFX