コード例 #1
0
 internal void EnsurePartitionKeyInEntityMatchesPartitionKey <T>(T entity, PartitionKey partitionKey)
     where T : CosmosEntity
 {
     if (!partitionKey.Equals(new PartitionKey(entity.PartitionKey)))
     {
         throw CreateCosmosClientException(
                   $"Partition key extracted from entity {entity.PartitionKey} does not match given partition key {partitionKey}",
                   HttpStatusCode.BadRequest);
     }
 }
コード例 #2
0
 public bool Equals(PartitionObjectKeyString other)
 {
     return(PartitionKey.Equals(other.PartitionKey) && Key == other.Key);
 }