C# Class ProtoBuf.Helpers

Not all frameworks are created equal (fx1.1 vs fx2.0, micro-framework, compact-framework, silverlight, etc). This class simply wraps up a few things that would otherwise make the real code unnecessarily messy, providing fallback implementations if necessary.
Show file Open project: wpszz/CSLightForUnity Class Usage Examples

Public Properties

Property Type Description
EmptyTypes System.Type[]

Public Methods

Method Description
AppendLine ( System builder ) : System.Text.StringBuilder
BlockCopy ( byte from, int fromIndex, byte to, int toIndex, int count ) : void
IsInfinity ( double value ) : bool
IsInfinity ( float value ) : bool
IsNullOrEmpty ( string value ) : bool
Sort ( int keys, object values ) : void

Private Methods

Method Description
DebugAssert ( bool condition ) : void
DebugAssert ( bool condition, string message ) : void
DebugWriteLine ( string message ) : void
DebugWriteLine ( string message, object obj ) : void
GetInstanceMember ( TypeInfo declaringType, string name ) : MemberInfo
GetInstanceMethod ( Type declaringType, string name ) : MethodInfo
GetInstanceMethod ( Type declaringType, string name, Type types ) : MethodInfo
GetInstanceMethod ( TypeInfo declaringType, string name ) : MethodInfo
GetInstanceMethod ( TypeInfo declaringType, string name, Type types ) : MethodInfo
GetStaticMethod ( Type declaringType, string name ) : MethodInfo
GetStaticMethod ( TypeInfo declaringType, string name ) : MethodInfo
Helpers ( ) : System
IsSubclassOf ( Type type, Type baseClass ) : bool
TraceWriteLine ( string message ) : void

Method Details

AppendLine() public static method

public static AppendLine ( System builder ) : System.Text.StringBuilder
builder System
return System.Text.StringBuilder

BlockCopy() public static method

public static BlockCopy ( byte from, int fromIndex, byte to, int toIndex, int count ) : void
from byte
fromIndex int
to byte
toIndex int
count int
return void

IsInfinity() public static method

public static IsInfinity ( double value ) : bool
value double
return bool

IsInfinity() public static method

public static IsInfinity ( float value ) : bool
value float
return bool

IsNullOrEmpty() public static method

public static IsNullOrEmpty ( string value ) : bool
value string
return bool

Sort() public static method

public static Sort ( int keys, object values ) : void
keys int
values object
return void

Property Details

EmptyTypes public static property

public static Type[],System EmptyTypes
return System.Type[]