C# Class Microsoft.Protocols.TestSuites.MS_OXWSITEMID.MS_OXWSITEMIDAdapter

Adapter class of MS_OXWSITEMID.
Inheritance: Microsoft.Protocols.TestTools.ManagedAdapterBase, IMS_OXWSITEMIDAdapter
Show file Open project: OfficeDev/Interop-TestSuites

Public Methods

Method Description
Compress ( byte streamIn, byte compressorId ) : byte[]

Simple RLE compressor for item IDs. Bytes that do not repeat are written directly. Bytes that repeat more than once are written twice, followed by the number of additional times to write the byte (i.e., total run length minus two).

Decompress ( byte input, int maxLength ) : MemoryStream

Decompresses the passed byte array using RLE scheme.

Initialize ( ITestSite testSite ) : void

Initialize some variables overridden.

ParseItemId ( ItemIdType itemId ) : ItemIdId

Parse an ItemId's Id from a base64 string to a ItemIdId object according to the defined format

Method Details

Compress() public method

Simple RLE compressor for item IDs. Bytes that do not repeat are written directly. Bytes that repeat more than once are written twice, followed by the number of additional times to write the byte (i.e., total run length minus two).
public Compress ( byte streamIn, byte compressorId ) : byte[]
streamIn byte input stream to compress
compressorId byte id of the compressor
return byte[]

Decompress() public method

Decompresses the passed byte array using RLE scheme.
public Decompress ( byte input, int maxLength ) : MemoryStream
input byte Bytes to decompress
maxLength int Max allowed length for the byte array
return System.IO.MemoryStream

Initialize() public method

Initialize some variables overridden.
public Initialize ( ITestSite testSite ) : void
testSite ITestSite The instance of ITestSite Class.
return void

ParseItemId() public method

Parse an ItemId's Id from a base64 string to a ItemIdId object according to the defined format
public ParseItemId ( ItemIdType itemId ) : ItemIdId
itemId Microsoft.Protocols.TestSuites.Common.ItemIdType An ItemIdType object
return Microsoft.Protocols.TestSuites.Common.ItemIdId