C# Class Telemachus.TypeCheckingExtensions

Contains extension methods for checking interface equivalence
ファイルを表示 Open project: KSP-Telemachus/Telemachus

Public Methods

Method Description
DoesMatchInterfaceOf ( this target, Type thisInterface ) : bool

Tests all members of the target against a supplied interface to determine if it implements it 'In spirit' if not physically.

IsEquivalentTo ( this first, MethodInfo second ) : bool

Tests two MethodInfo's for return, public and parameter list equivalence

IsEquivalentTo ( this first, ParameterInfo second ) : bool

Tests two lists of parameters for length and type equivalence

IsSupersetOf ( this target, PropertyInfo baseline ) : bool

Tests if a property is the superset of another one e.g. the same type and at least the same accessors

Method Details

DoesMatchInterfaceOf() public static method

Tests all members of the target against a supplied interface to determine if it implements it 'In spirit' if not physically.
public static DoesMatchInterfaceOf ( this target, Type thisInterface ) : bool
target this The type to test
thisInterface System.Type The interface to test against
return bool

IsEquivalentTo() public static method

Tests two MethodInfo's for return, public and parameter list equivalence
public static IsEquivalentTo ( this first, MethodInfo second ) : bool
first this
second System.Reflection.MethodInfo
return bool

IsEquivalentTo() public static method

Tests two lists of parameters for length and type equivalence
public static IsEquivalentTo ( this first, ParameterInfo second ) : bool
first this
second System.Reflection.ParameterInfo
return bool

IsSupersetOf() public static method

Tests if a property is the superset of another one e.g. the same type and at least the same accessors
public static IsSupersetOf ( this target, PropertyInfo baseline ) : bool
target this The property to test. This can have more accessible accessors than the baseline.
baseline System.Reflection.PropertyInfo The baseline, which specifies the type and minimum access levels.
return bool