private async Task <CommandResponseMessage> AutoDecryptFieldsIfNecessaryAsync(CommandResponseMessage encryptedResponseMessage, CancellationToken cancellationToken)
 {
     if (_documentFieldDecryptor == null)
     {
         return(encryptedResponseMessage);
     }
     else
     {
         var messageFieldDecryptor = new CommandMessageFieldDecryptor(_documentFieldDecryptor, _messageEncoderSettings);
         return(await messageFieldDecryptor.DecryptFieldsAsync(encryptedResponseMessage, cancellationToken).ConfigureAwait(false));
     }
 }
 private CommandResponseMessage AutoDecryptFieldsIfNecessary(CommandResponseMessage encryptedResponseMessage, CancellationToken cancellationToken)
 {
     if (_documentFieldDecryptor == null)
     {
         return(encryptedResponseMessage);
     }
     else
     {
         var messageFieldDecryptor = new CommandMessageFieldDecryptor(_documentFieldDecryptor, _messageEncoderSettings);
         return(messageFieldDecryptor.DecryptFields(encryptedResponseMessage, cancellationToken));
     }
 }