Пример #1
0
 // A non-public constructor to ensure the factory is used to create the object.
 // This will prevent memory leaks when handling the HttpResponseMessage.
 internal ClientEncryptionKeyResponse(
     HttpStatusCode httpStatusCode,
     Headers headers,
     ClientEncryptionKeyProperties keyProperties,
     ClientEncryptionKey key,
     CosmosDiagnostics diagnostics)
 {
     this.StatusCode          = httpStatusCode;
     this.Headers             = headers;
     this.Resource            = keyProperties;
     this.ClientEncryptionKey = key;
     this.Diagnostics         = diagnostics;
 }
Пример #2
0
 public override ClientEncryptionKeyResponse CreateClientEncryptionKeyResponse(
     ClientEncryptionKey clientEncryptionKey,
     ResponseMessage responseMessage)
 {
     return(this.ProcessMessage(responseMessage, (cosmosResponseMessage) =>
     {
         ClientEncryptionKeyProperties cekProperties = this.ToObjectpublic <ClientEncryptionKeyProperties>(cosmosResponseMessage);
         return new ClientEncryptionKeyResponse(
             cosmosResponseMessage.StatusCode,
             cosmosResponseMessage.Headers,
             cekProperties,
             clientEncryptionKey,
             cosmosResponseMessage.Diagnostics);
     }));
 }
Пример #3
0
 public abstract ClientEncryptionKeyResponse CreateClientEncryptionKeyResponse(
     ClientEncryptionKey clientEncryptionKey,
     ResponseMessage responseMessage);