C# Class Microsoft.Protocols.TestSuites.MS_OXCFXICS.StreamHelper

A helper class for stream operations
Exibir arquivo Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Public Properties

Property Type Description
GuidLength int

Public Methods

Method Description
ReadGuid ( Stream stream ) : System.Guid

Read a GUID value from a stream and advances the position within the stream by 16.

ReadLongTermId ( Stream stream ) : LongTermId

Read a LongTermId from a stream and advances the position within the stream by 24.

ReadString8 ( Stream stream ) : string

Read an ASCII string value from a stream.

ReadUInt16 ( Stream stream ) : ushort

Read a ushort value from a stream and advances the position within the stream by 2.

ReadUInt32 ( Stream stream ) : uint

Read a uint value from a stream and advances the position within the stream by 4.

ReadUInt64 ( Stream stream ) : ulong

Read a ulong value from a stream and advances the position within the stream by 8.

ReadUInt8 ( Stream stream ) : byte

Read a byte from a stream and advances the position within the stream by 1.

WriteBuffer ( Stream stream, byte buffer ) : int

Write bytes to a stream and advances the position within the stream by 16.

WriteGuid ( Stream stream, System.Guid guid ) : int

Write a GUID value to a stream and advances the position within the stream by 16

WriteLongTermId ( Stream stream, LongTermId id ) : int

Write a LongTermId value to a stream and advances the position within the stream by 24.

WriteUInt16 ( Stream stream, ushort value ) : int

Write a ushort value to a stream and advances the position within the stream by 2.

WriteUInt32 ( Stream stream, uint value ) : int

Write a uint value to a stream and advances the position within the stream by 4.

WriteUInt64 ( Stream stream, ulong value ) : int

Write a ulong value to a stream and advances the position within the stream by 8.

Method Details

ReadGuid() public static method

Read a GUID value from a stream and advances the position within the stream by 16.
public static ReadGuid ( Stream stream ) : System.Guid
stream Stream The stream.
return System.Guid

ReadLongTermId() public static method

Read a LongTermId from a stream and advances the position within the stream by 24.
public static ReadLongTermId ( Stream stream ) : LongTermId
stream Stream The stream.
return Microsoft.Protocols.TestSuites.Common.LongTermId

ReadString8() public static method

Read an ASCII string value from a stream.
public static ReadString8 ( Stream stream ) : string
stream Stream The stream.
return string

ReadUInt16() public static method

Read a ushort value from a stream and advances the position within the stream by 2.
public static ReadUInt16 ( Stream stream ) : ushort
stream Stream The stream.
return ushort

ReadUInt32() public static method

Read a uint value from a stream and advances the position within the stream by 4.
public static ReadUInt32 ( Stream stream ) : uint
stream Stream The stream.
return uint

ReadUInt64() public static method

Read a ulong value from a stream and advances the position within the stream by 8.
public static ReadUInt64 ( Stream stream ) : ulong
stream Stream The stream.
return ulong

ReadUInt8() public static method

Read a byte from a stream and advances the position within the stream by 1.
public static ReadUInt8 ( Stream stream ) : byte
stream Stream The stream.
return byte

WriteBuffer() public static method

Write bytes to a stream and advances the position within the stream by 16.
public static WriteBuffer ( Stream stream, byte buffer ) : int
stream Stream The stream.
buffer byte A byte array.
return int

WriteGuid() public static method

Write a GUID value to a stream and advances the position within the stream by 16
public static WriteGuid ( Stream stream, System.Guid guid ) : int
stream Stream The stream.
guid System.Guid A GUID value.
return int

WriteLongTermId() public static method

Write a LongTermId value to a stream and advances the position within the stream by 24.
public static WriteLongTermId ( Stream stream, LongTermId id ) : int
stream Stream The stream.
id Microsoft.Protocols.TestSuites.Common.LongTermId A LongTermId value.
return int

WriteUInt16() public static method

Write a ushort value to a stream and advances the position within the stream by 2.
public static WriteUInt16 ( Stream stream, ushort value ) : int
stream Stream The stream.
value ushort A ushort value.
return int

WriteUInt32() public static method

Write a uint value to a stream and advances the position within the stream by 4.
public static WriteUInt32 ( Stream stream, uint value ) : int
stream Stream The stream.
value uint A uint value.
return int

WriteUInt64() public static method

Write a ulong value to a stream and advances the position within the stream by 8.
public static WriteUInt64 ( Stream stream, ulong value ) : int
stream Stream The stream.
value ulong A ulong value.
return int

Property Details

GuidLength public_oe static_oe property

The size of a GUID structure.
public static int GuidLength
return int