C# Class CSE.Exps.MethRes

A set of static methods and members for use in method resolution.
Datei anzeigen Open project: kcherr1/CSharp-Eval Class Usage Examples

Public Methods

Method Description
CanConvertType ( CseObject fromArg, Type to ) : bool

A holistic method to use for testing coercion of objects

CrawlThatShit ( int target, Type current, List visitedTypes ) : bool

Recursive method to traverse through the class hierarchy in an attempt to determine if the current object may be converted to the target type, based on it's hash code.

GetApplicableMembers ( MethResSettings mrSettings ) : List

Returns all matching members, according to the C# specification, for a given MethResSettings object.

GetBestInvocableMember ( MethResSettings mrSettings ) : MethResObject

Returns the best applicable and invokable member for a given MethResSettings object.

GetBestMember ( MethResSettings mrSettings ) : MethResObject

Returns the best matching member for a given MethResSettings object.

GetCandidateMembers ( MethResSettings mrSettings ) : List

Returns all members that match the name (candidates) of the given MethResSettings object.

GetMethodInfos ( Type env, MethResSettings mrSettings ) : List

Returns a list of MethResObject objects, within the given environment and MethResSettings object, according to the C# specification.

ImpEnumConv ( CseObject data, Type t ) : bool

Tests for an implicit enum conversion, given a CseObject and a type.

ImpRefConv ( CseObject fromArg, Type to ) : bool?

Tests for an implicit reference conversion, given a CseObject and a type.

IsBoxingConversion ( CseObject fromArg, Type to ) : bool

Determines if a boxing conversion exists between the passed object and the type

IsNullableType ( Type t ) : bool

Determines if the passed type is a nullable type

Method Details

CanConvertType() public static method

A holistic method to use for testing coercion of objects
public static CanConvertType ( CseObject fromArg, Type to ) : bool
fromArg CseObject The object to be coerced
to System.Type The type to convert the object to.
return bool

CrawlThatShit() public static method

Recursive method to traverse through the class hierarchy in an attempt to determine if the current object may be converted to the target type, based on it's hash code.
public static CrawlThatShit ( int target, Type current, List visitedTypes ) : bool
target int The hashCode value of the target object
current System.Type The object to be converted.
visitedTypes List The list of visited types. This is an optimization parameter.
return bool

GetApplicableMembers() public static method

Returns all matching members, according to the C# specification, for a given MethResSettings object.
public static GetApplicableMembers ( MethResSettings mrSettings ) : List
mrSettings MethResSettings The object to match when invoking
return List

GetBestInvocableMember() public static method

Returns the best applicable and invokable member for a given MethResSettings object.
public static GetBestInvocableMember ( MethResSettings mrSettings ) : MethResObject
mrSettings MethResSettings The object to match when invoking
return MethResObject

GetBestMember() public static method

Returns the best matching member for a given MethResSettings object.
public static GetBestMember ( MethResSettings mrSettings ) : MethResObject
mrSettings MethResSettings The object to match when invoking
return MethResObject

GetCandidateMembers() public static method

Returns all members that match the name (candidates) of the given MethResSettings object.
public static GetCandidateMembers ( MethResSettings mrSettings ) : List
mrSettings MethResSettings The object to match when invoking
return List

GetMethodInfos() public static method

Returns a list of MethResObject objects, within the given environment and MethResSettings object, according to the C# specification.
public static GetMethodInfos ( Type env, MethResSettings mrSettings ) : List
env System.Type The environment to use when locating the desired MethResObject objects.
mrSettings MethResSettings The object to match when invoking
return List

ImpEnumConv() public static method

Tests for an implicit enum conversion, given a CseObject and a type.
public static ImpEnumConv ( CseObject data, Type t ) : bool
data CseObject The object to test converting
t System.Type The type to attempt to convert the object to
return bool

ImpRefConv() public static method

Tests for an implicit reference conversion, given a CseObject and a type.
public static ImpRefConv ( CseObject fromArg, Type to ) : bool?
fromArg CseObject
to System.Type
return bool?

IsBoxingConversion() public static method

Determines if a boxing conversion exists between the passed object and the type
public static IsBoxingConversion ( CseObject fromArg, Type to ) : bool
fromArg CseObject The object to convert
to System.Type The type to attempt to convert the object to.
return bool

IsNullableType() public static method

Determines if the passed type is a nullable type
public static IsNullableType ( Type t ) : bool
t System.Type The type to check
return bool