Class DaprPublicationStateStore
IPublicationStateStore over the Dapr state API.
public sealed class DaprPublicationStateStore : IPublicationStateStore
- Inheritance
-
DaprPublicationStateStore
- Implements
- Inherited Members
Constructors
DaprPublicationStateStore(DaprClient, string)
IPublicationStateStore over the Dapr state API.
public DaprPublicationStateStore(DaprClient dapr, string storeName)
Parameters
daprDaprClientstoreNamestring
Properties
StoreName
public string StoreName { get; }
Property Value
Methods
GetAsync(IReadOnlyList<string>, CancellationToken)
Reads keys; the result has one item per key, in the same order.
public Task<IReadOnlyList<StoredItem>> GetAsync(IReadOnlyList<string> keys, CancellationToken cancellationToken)
Parameters
keysIReadOnlyList<string>cancellationTokenCancellationToken
Returns
TryCreateAsync(string, string, CancellationToken)
Writes key only if it does not exist; false if it does.
public Task<bool> TryCreateAsync(string key, string json, CancellationToken cancellationToken)
Parameters
keystringjsonstringcancellationTokenCancellationToken
Returns
TryTransactAsync(IReadOnlyList<StoredWrite>, CancellationToken)
Applies all writes or none; false if a guarded key's ETag no longer matches.
public Task<bool> TryTransactAsync(IReadOnlyList<StoredWrite> writes, CancellationToken cancellationToken)
Parameters
writesIReadOnlyList<StoredWrite>cancellationTokenCancellationToken