C# Class ArtemisComm.Utility

显示文件 Open project: russjudge/ArtemisSBS-ProtocolSharp

Public Methods

Method Description
BytesToDebugString ( byte byteArray ) : string
BytesToDebugString ( byte byteArray, int index ) : string
CopyTo ( this sourceStream, Stream targetStream, int sourceIndex, long length ) : void
DisposeProperties ( this disposableObject ) : void
GetBuffer ( Stream stream, int index ) : byte[]
GetMemoryStream ( this stream, int index ) : MemoryStream
LoadProperties ( object baseObject, Stream stream, int index, Collection errors ) : int
SetRawData ( this package ) : MemoryStream
ToInt16 ( this me ) : short
ToInt32 ( this me ) : int
ToInt64 ( this me ) : long
ToSingle ( this me ) : float
Write ( this me, ArtemisString data ) : void
Write ( this me, Enum enumeration ) : void
Write ( this me, byte data ) : void
Write ( this me, float data ) : void
Write ( this me, int data ) : void
Write ( this me, long data ) : void
Write ( this me, short data ) : void

Private Methods

Method Description
GetIntermediateType ( Type CastType, int index, Stream stream ) : object>.KeyValuePair
LoadProperty ( object baseObject, MemoryStream stream, PropertyInfo prop, Collection errors ) : int
SetProperty ( Type toType, object baseObject, object intermediateObject, PropertyInfo prop ) : void
WriteToStream ( Type targetType, object item, MemoryStream stream ) : void

Method Details

BytesToDebugString() public static method

public static BytesToDebugString ( byte byteArray ) : string
byteArray byte
return string

BytesToDebugString() public static method

public static BytesToDebugString ( byte byteArray, int index ) : string
byteArray byte
index int
return string

CopyTo() public static method

public static CopyTo ( this sourceStream, Stream targetStream, int sourceIndex, long length ) : void
sourceStream this
targetStream Stream
sourceIndex int
length long
return void

DisposeProperties() public static method

public static DisposeProperties ( this disposableObject ) : void
disposableObject this
return void

GetBuffer() public static method

public static GetBuffer ( Stream stream, int index ) : byte[]
stream Stream
index int
return byte[]

GetMemoryStream() public static method

public static GetMemoryStream ( this stream, int index ) : MemoryStream
stream this
index int
return System.IO.MemoryStream

LoadProperties() public static method

public static LoadProperties ( object baseObject, Stream stream, int index, Collection errors ) : int
baseObject object
stream Stream
index int
errors Collection
return int

SetRawData() public static method

public static SetRawData ( this package ) : MemoryStream
package this
return System.IO.MemoryStream

ToInt16() public static method

public static ToInt16 ( this me ) : short
me this
return short

ToInt32() public static method

public static ToInt32 ( this me ) : int
me this
return int

ToInt64() public static method

public static ToInt64 ( this me ) : long
me this
return long

ToSingle() public static method

public static ToSingle ( this me ) : float
me this
return float

Write() public static method

public static Write ( this me, ArtemisString data ) : void
me this
data ArtemisString
return void

Write() public static method

public static Write ( this me, Enum enumeration ) : void
me this
enumeration System.Enum
return void

Write() public static method

public static Write ( this me, byte data ) : void
me this
data byte
return void

Write() public static method

public static Write ( this me, float data ) : void
me this
data float
return void

Write() public static method

public static Write ( this me, int data ) : void
me this
data int
return void

Write() public static method

public static Write ( this me, long data ) : void
me this
data long
return void

Write() public static method

public static Write ( this me, short data ) : void
me this
data short
return void