C# Class System.Dynamic.Utils.TypeExtensions

Afficher le fichier Open project: dotnet/corefx

Méthodes publiques

Méthode Description
GetAnyStaticMethodValidated ( this type, string name, Type types ) : MethodInfo

Returns the matching method if the parameter types are reference assignable from the provided type arguments, otherwise null.

GetReturnType ( this mi ) : Type
GetTypeCode ( this type ) : TypeCode

Private Methods

Méthode Description
GetParametersCached ( this method ) : System.Reflection.ParameterInfo[]
IsByRefParameter ( this pi ) : bool
MatchesArgumentTypes ( this mi, Type argTypes ) : bool

Returns true if the method's parameter types are reference assignable from the argument types, otherwise false. An example that can make the method return false is that typeof(double).GetMethod("op_Equality", ..., new[] { typeof(double), typeof(int) }) returns a method with two double parameters, which doesn't match the provided argument types.

Method Details

GetAnyStaticMethodValidated() public static méthode

Returns the matching method if the parameter types are reference assignable from the provided type arguments, otherwise null.
public static GetAnyStaticMethodValidated ( this type, string name, Type types ) : MethodInfo
type this
name string
types Type
Résultat System.Reflection.MethodInfo

GetReturnType() public static méthode

public static GetReturnType ( this mi ) : Type
mi this
Résultat Type

GetTypeCode() public static méthode

public static GetTypeCode ( this type ) : TypeCode
type this
Résultat TypeCode