C# Class Prolog.TypeUtils

Afficher le fichier Open project: ianhorswill/UnityProlog

Méthodes publiques

Méthode Description
AddTypeSearchPath ( string namespacePrefix, string assembly ) : bool

Add a default namespace and assembly to search when looking for types

CreateGenericInstance ( this genericType, Type genericTypeParameters ) : object

Creates an instance of a generic type given its definition, type parameters, and constructor args.

FindType ( string name ) : Type

Makes a best effort to find the type object corresponding to the type with specified name.

GetPropertyOrField ( this value, string memberName ) : object

Returns the value of the object's specified field or property.

Private Methods

Méthode Description
CreateGenericInstance ( this genericType, Type genericTypeParameters, List constructorArguments ) : object
CreateInstance ( this type ) : object
CreateInstance ( this type, List constructorArguments ) : object
CreateInstanceWithInitializerKeywords ( this type, List constructorArguments ) : object
GenericTypeInstanceOf ( this t, Type genericTypeDefinition ) : Type
InvokeMethod ( this value, string methodName ) : object
SetPropertyOrField ( this obj, string mname, object value ) : void
TrySetPropertyOrField ( this objectToModify, string memberName, object value, bool errorOnMissing ) : bool

Method Details

AddTypeSearchPath() public static méthode

Add a default namespace and assembly to search when looking for types
public static AddTypeSearchPath ( string namespacePrefix, string assembly ) : bool
namespacePrefix string Namespace to search
assembly string Assembly to search
Résultat bool

CreateGenericInstance() public static méthode

Creates an instance of a generic type given its definition, type parameters, and constructor args.
public static CreateGenericInstance ( this genericType, Type genericTypeParameters ) : object
genericType this
genericTypeParameters System.Type
Résultat object

FindType() public static méthode

Makes a best effort to find the type object corresponding to the type with specified name.
public static FindType ( string name ) : Type
name string Name of the type
Résultat System.Type

GetPropertyOrField() public static méthode

Returns the value of the object's specified field or property.
public static GetPropertyOrField ( this value, string memberName ) : object
value this
memberName string
Résultat object