示例#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);