NDesk.DBus.MessageWriter.MarshalULong C# (CSharp) Method

MarshalULong() protected method

protected MarshalULong ( byte data ) : void
data byte
return void
        protected unsafe void MarshalULong(byte *data)
        {
            WritePad (8);
            byte[] dst = new byte[8];

            if (endianness == Connection.NativeEndianness) {
                for (int i = 0; i < 8; ++i)
                    dst[i] = data[i];
            } else {
                for (int i = 0; i < 8; ++i)
                    dst[i] = data[7 - i];
            }

            stream.Write (dst, 0, 8);
        }