Class fsReflectionUtility
Namespace: Unity.VisualScripting.FullSerializer
Syntax
public static class fsReflectionUtility
Methods
GetInterface(Type, Type)
Searches for a particular implementation of the given interface type inside of the type. This is particularly useful if the interface type is an open type, ie, typeof(IFace{}), because this method will then return IFace{} but with appropriate type parameters inserted.
Declaration
public static Type GetInterface(Type type, Type interfaceType)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The base type to search for interface |
Type | interfaceType | The interface type to search for. Can be an open generic type. |
Returns
Type | Description |
---|---|
Type | The actual interface type that the type contains, or null if there is no implementation of the given interfaceType on type. |