Helper class for compatibility of reflection on WSA.
More...
|
| static IEnumerable< FieldInfo > | GetFields (Type type, BindingFlags bindingAttr=DefaultLookup) |
| | Searches for the fields defined for the current Type, using the specified binding constraints. More...
|
| |
| static Type [] | GetGenericArguments (Type type) |
| | Returns an array of Type objects that represent the type arguments of a generic type or the type parameters of a generic type definition. More...
|
| |
| static MemberInfo | GetMember (Type type, string name) |
| | Searches for the public members with the specified name. More...
|
| |
| static IEnumerable< MemberInfo > | GetMembers (Type type, BindingFlags bindingAttr=DefaultLookup) |
| | searches for the members defined for the current Type, using the specified binding constraints. More...
|
| |
| static MemberTypes | GetMemberType (MemberInfo member) |
| | Gets a MemberTypes value indicating the type of the member — method, constructor, event, and so on. More...
|
| |
| static MethodInfo | GetMethod (Type type, string name) |
| | Searches for the public method with the specified name. More...
|
| |
| static MethodInfo | GetMethod (Type type, string name, Type[] types) |
| | Searches for the specified public method whose parameters match the specified argument types. More...
|
| |
| static PropertyInfo [] | GetProperties (Type type) |
| | Returns all the public properties of the current Type. More...
|
| |
| static bool | IsClass (Type type) |
| | Gets a value indicating whether the Type is a class; that is, not a value type or interface. More...
|
| |
| static bool | IsGenericType (Type type) |
| | Gets a value indicating whether the current type is a generic type. More...
|
| |
| static bool | IsValueType (Type type) |
| | Gets a value indicating whether the Type is a value type. More...
|
| |
Helper class for compatibility of reflection on WSA.
◆ GetFields()
| static IEnumerable<FieldInfo> InfinityCode.RealWorldTerrain.Utils.RealWorldTerrainReflectionHelper.GetFields |
( |
Type |
type, |
|
|
BindingFlags |
bindingAttr = DefaultLookup |
|
) |
| |
|
static |
Searches for the fields defined for the current Type, using the specified binding constraints.
- Parameters
-
| type | Type |
| bindingAttr | A bitmask comprised of one or more BindingFlags that specify how the search is conducted. |
- Returns
- An array of FieldInfo objects representing all fields defined for the current Type that match the specified binding constraints.
◆ GetGenericArguments()
| static Type [] InfinityCode.RealWorldTerrain.Utils.RealWorldTerrainReflectionHelper.GetGenericArguments |
( |
Type |
type | ) |
|
|
static |
Returns an array of Type objects that represent the type arguments of a generic type or the type parameters of a generic type definition.
- Parameters
-
- Returns
- An array of Type objects that represent the type arguments of a generic type. Returns an empty array if the current type is not a generic type.
◆ GetMember()
| static MemberInfo InfinityCode.RealWorldTerrain.Utils.RealWorldTerrainReflectionHelper.GetMember |
( |
Type |
type, |
|
|
string |
name |
|
) |
| |
|
static |
Searches for the public members with the specified name.
- Parameters
-
| type | Type |
| name | The String containing the name of the public members to get. |
- Returns
- An array of MemberInfo objects representing the public members with the specified name, if found; otherwise, an empty array.
◆ GetMembers()
| static IEnumerable<MemberInfo> InfinityCode.RealWorldTerrain.Utils.RealWorldTerrainReflectionHelper.GetMembers |
( |
Type |
type, |
|
|
BindingFlags |
bindingAttr = DefaultLookup |
|
) |
| |
|
static |
searches for the members defined for the current Type, using the specified binding constraints.
- Parameters
-
| type | Type |
| bindingAttr | A bitmask comprised of one or more BindingFlags that specify how the search is conducted. |
- Returns
- An array of MemberInfo objects representing all members defined for the current Type that match the specified binding constraints.
◆ GetMemberType()
| static MemberTypes InfinityCode.RealWorldTerrain.Utils.RealWorldTerrainReflectionHelper.GetMemberType |
( |
MemberInfo |
member | ) |
|
|
static |
Gets a MemberTypes value indicating the type of the member — method, constructor, event, and so on.
- Parameters
-
- Returns
- MemberTypes value
◆ GetMethod() [1/2]
| static MethodInfo InfinityCode.RealWorldTerrain.Utils.RealWorldTerrainReflectionHelper.GetMethod |
( |
Type |
type, |
|
|
string |
name |
|
) |
| |
|
static |
Searches for the public method with the specified name.
- Parameters
-
| type | Type |
| name | The String containing the name of the public method to get. |
- Returns
- A MethodInfo object representing the public method with the specified name, if found; otherwise, null.
◆ GetMethod() [2/2]
| static MethodInfo InfinityCode.RealWorldTerrain.Utils.RealWorldTerrainReflectionHelper.GetMethod |
( |
Type |
type, |
|
|
string |
name, |
|
|
Type [] |
types |
|
) |
| |
|
static |
Searches for the specified public method whose parameters match the specified argument types.
- Parameters
-
| type | Type |
| name | The String containing the name of the public method to get. |
| types | An array of Type objects representing the number, order, and type of the parameters for the method to get. |
- Returns
- A MethodInfo object representing the public method whose parameters match the specified argument types, if found; otherwise, null.
◆ GetProperties()
| static PropertyInfo [] InfinityCode.RealWorldTerrain.Utils.RealWorldTerrainReflectionHelper.GetProperties |
( |
Type |
type | ) |
|
|
static |
Returns all the public properties of the current Type.
- Parameters
-
- Returns
- An array of PropertyInfo objects representing all public properties of the current Type.
◆ IsClass()
| static bool InfinityCode.RealWorldTerrain.Utils.RealWorldTerrainReflectionHelper.IsClass |
( |
Type |
type | ) |
|
|
static |
Gets a value indicating whether the Type is a class; that is, not a value type or interface.
- Parameters
-
- Returns
- True if the Type is a class; otherwise, false.
◆ IsGenericType()
| static bool InfinityCode.RealWorldTerrain.Utils.RealWorldTerrainReflectionHelper.IsGenericType |
( |
Type |
type | ) |
|
|
static |
Gets a value indicating whether the current type is a generic type.
- Parameters
-
- Returns
- True if the current type is a generic type; otherwise, false.
◆ IsValueType()
| static bool InfinityCode.RealWorldTerrain.Utils.RealWorldTerrainReflectionHelper.IsValueType |
( |
Type |
type | ) |
|
|
static |
Gets a value indicating whether the Type is a value type.
- Parameters
-
- Returns
- True if the Type is a value type; otherwise, false.