/// <summary>
        /// Tries to parse an encrypted operation response.
        /// </summary>
        /// <param name="data">The data.</param>
        /// <param name="cryptoProvider">The crypto provider.</param>
        /// <param name="operationResponse">The operation response.</param>
        /// <returns> true if the operation response was parsed successfully; otherwise false.</returns>
        public bool TryParseOperationResponseEncrypted(byte[] data, ICryptoProvider cryptoProvider, out OperationResponse operationResponse)
        {
            object obj2;

            if (cryptoProvider == null)
            {
                operationResponse = null;
                return(false);
            }
            byte[] buffer = cryptoProvider.Decrypt(data, 2, data.Length - 2);
            if (buffer == null)
            {
                operationResponse = null;
                return(false);
            }
            if (operationDataLogger.IsDebugEnabled)
            {
                operationDataLogger.DebugFormat("Decrypted data: data=({0} bytes) {1}", new object[] { buffer.Length, BitConverter.ToString(buffer) });
            }
            int pos = 0;

            if (GpBinaryByteReaderV17.TryReadOperationResponse(buffer, ref pos, out obj2))
            {
                operationResponse = (OperationResponse)obj2;
                return(true);
            }
            operationResponse = null;
            return(false);
        }
        /// <summary>
        ///  Tries to parse an operation response.
        /// </summary>
        /// <param name="data">A byte array containing the binary operation response data.</param>
        /// <param name="operationResponse">Contains the parsed operation response, if the methods returns with success;
        ///otherwise, the parameter will be uninitialized. </param>
        /// <returns>true if the operation response was parsed successfully; otherwise false.</returns>
        public bool TryParseOperationResponse(byte[] data, out OperationResponse operationResponse)
        {
            object obj2;
            int    pos = 2;

            if (GpBinaryByteReaderV17.TryReadOperationResponse(data, ref pos, out obj2))
            {
                operationResponse = (OperationResponse)obj2;
                return(true);
            }
            operationResponse = null;
            return(false);
        }