Skip to content

DefaultDocumentIdProvider Methods

The default implementation of IDocumentIdProvider.

GetDocumentIdentifiers(string, GrainId)

View source
public ValueTask<(string DocumentId, string PartitionKey)> DefaultDocumentIdProvider.GetDocumentIdentifiers(string grainType, GrainId grainId)
Gets the document identifier for the specified grain.

Parameters

grainTypestring
The grain type.
grainIdGrainId
The grain identifier.

Returns

The document id and partition key.

GetId(string, GrainId)

View source
public string GetId(string grainType, GrainId grainId)
Gets the id for the specified grain document.

Parameters

grainTypestring
The grain type.
grainIdGrainId
The grain id.

Returns

The document id.

GetPartitionKey(string, GrainId)

View source
public string GetPartitionKey(string grainType, GrainId grainId)
Gets the Cosmos DB partition key for the specified grain document.

Parameters

grainTypestring
The grain type.
grainIdGrainId
The grain id.

Returns

The document partition key.