C# Class Woopsa.WoopsaTypeUtils

显示文件 Open project: woopsa-protocol/Woopsa Class Usage Examples

Public Methods

Method Description
GetGenericEnumerableItemType ( Type type, Type &itemsType ) : bool
InferWoopsaType ( Type targetType, WoopsaValueType &resultType ) : bool

Determines the WoopsaValueType based on a .NET type.

IsWoopsaReferenceType ( Type type ) : bool

Determines if the .net type matches a Woopsa reference type (object) Some value types of .net have no corresponding Woopsa type, and are not reference type.

IsWoopsaValueType ( Type type ) : bool

Determines if the .net type matches a WoopsaValueType Some .net reference types (like string) are WoopsaValueType

Method Details

GetGenericEnumerableItemType() public static method

public static GetGenericEnumerableItemType ( Type type, Type &itemsType ) : bool
type System.Type
itemsType System.Type
return bool

InferWoopsaType() public static method

Determines the WoopsaValueType based on a .NET type.
public static InferWoopsaType ( Type targetType, WoopsaValueType &resultType ) : bool
targetType System.Type The .NET type to try to get the WoopsaValueType from
resultType WoopsaValueType The inferred WoopsaValueType. If the type cannot be inferred, this value will be WoopsaValueType.Null
return bool

IsWoopsaReferenceType() public static method

Determines if the .net type matches a Woopsa reference type (object) Some value types of .net have no corresponding Woopsa type, and are not reference type.
public static IsWoopsaReferenceType ( Type type ) : bool
type System.Type The .NET type to test
return bool

IsWoopsaValueType() public static method

Determines if the .net type matches a WoopsaValueType Some .net reference types (like string) are WoopsaValueType
public static IsWoopsaValueType ( Type type ) : bool
type System.Type The .NET type to test
return bool