ITypeLoaderclass
An implementation of this interface will wrap reflection calls, allowing custom access control. See `Facepunch.ActionGraphs.DefaultTypeLoader` for a default implementation with no access control.
Methods13
Showing 13 methods
public virtual System.Collections.Generic.IReadOnlyList`1<System.Reflection.ConstructorInfo> GetConstructors(System.Type declaringType)
Gets all constructors declared on the given type.
| Parameter | Type | Description |
|---|---|---|
| declaringType | Type | Declaring type that contains the constructors. |
IReadOnlyList<ConstructorInfo>—public virtual System.Reflection.FieldInfo GetField(System.Type declaringType, string name)
Gets a named field declared on the given type. Should return null if the field isn't found, or if it isn't allowed to be accessed.
| Parameter | Type | Description |
|---|---|---|
| declaringType | Type | Declaring type that contains the field. |
| name | string | Field name. |
FieldInfo—public virtual System.Collections.Generic.IReadOnlyList`1<System.Reflection.MethodInfo> GetMethods(System.Type declaringType, string name)
Gets all methods with the given name declared on the given type.
| Parameter | Type | Description |
|---|---|---|
| declaringType | Type | Declaring type that contains the methods. |
| name | string | Method name. |
IReadOnlyList<MethodInfo>—public virtual System.Type GetNestedType(System.Type declaringType, string name)
Gets a nested type from its name and the containing type. Should return null if the type isn't found, or if it isn't allowed to be accessed.
| Parameter | Type | Description |
|---|---|---|
| declaringType | Type | Declaring type that contains the nested type. |
| name | string | Short name of the nested type, not the fully qualified name. |
public virtual System.Reflection.PropertyInfo GetProperty(System.Type declaringType, string name)
Gets a named property declared on the given type. Should return null if the property isn't found, or if it isn't allowed to be accessed.
| Parameter | Type | Description |
|---|---|---|
| declaringType | Type | Declaring type that contains the property. |
| name | string | Property name. |
PropertyInfo—public virtual System.Type MakeArrayType(System.Type elementType, System.Nullable`1<int> rank)
| Parameter | Type | Description |
|---|---|---|
| elementType | Type | — |
| rank | Nullable<int> | — |
public virtual System.Type MakeGenericType(System.Type genericTypeDefinition, System.Type[] genericArguments)
Makes a generic instance type from the given generic type definition and type arguments. Should throw an exception if the arguments aren't valid for the generic type definition, or if creating such a type is forbidden.
| Parameter | Type | Description |
|---|---|---|
| genericTypeDefinition | Type | Generic type definition with one or more open type parameters. |
| genericArguments | Type[] | Type arguments to use when creating the generic instance type. |
public virtual System.Type TypeFromIdentifier(string value)
Load a type from an identifier, as produced by `Facepunch.ActionGraphs.ITypeLoader.TypeToIdentifier(System.Type)`.
| Parameter | Type | Description |
|---|---|---|
| value | string | — |
No results match this filter.