System.Net.SecPkgContext_ConnectionInfo.SecPkgContext_ConnectionInfo C# (CSharp) Метод

SecPkgContext_ConnectionInfo() приватный Метод

private SecPkgContext_ConnectionInfo ( byte nativeBuffer ) : System.Diagnostics
nativeBuffer byte
Результат System.Diagnostics
        internal unsafe SecPkgContext_ConnectionInfo(byte[] nativeBuffer)
        {
            fixed (void* voidPtr = nativeBuffer)
            {
                try
                {
                    // TODO (Issue #3114): replace with Marshal.PtrToStructure.
                    IntPtr unmanagedAddress = new IntPtr(voidPtr);
                    Protocol = Marshal.ReadInt32(unmanagedAddress);
                    DataCipherAlg = Marshal.ReadInt32(unmanagedAddress, 4);
                    DataKeySize = Marshal.ReadInt32(unmanagedAddress, 8);
                    DataHashAlg = Marshal.ReadInt32(unmanagedAddress, 12);
                    DataHashKeySize = Marshal.ReadInt32(unmanagedAddress, 16);
                    KeyExchangeAlg = Marshal.ReadInt32(unmanagedAddress, 20);
                    KeyExchKeySize = Marshal.ReadInt32(unmanagedAddress, 24);
                }
                catch (OverflowException)
                {
                    NetEventSource.Fail(this, "Negative size");
                    throw;
                }
            }
        }
    }
SecPkgContext_ConnectionInfo