Show / Hide Table of Contents

Interface IReflectionTypeSystemProvider

Interface representing a reflection provider used to perform type system checks.

Namespace: System.Reflection
Assembly: Nuqleon.Reflection.Virtualization.dll
Syntax
public interface IReflectionTypeSystemProvider

Methods

IsAssignableFrom(Type, Type)

Determines whether an instance of the specified type can be assigned from an instance of the specified type c.

Declaration
bool IsAssignableFrom(Type type, Type c)
Parameters
Type Name Description
System.Type type

The type to check for assignment compatibility.

System.Type c

The type to compare with the specified type.

Returns
Type Description
System.Boolean

true if c and the specified type represent the same type, or if the specified type is in the inheritance hierarchy of c, or if the specified type is an interface that c implements, or if c is a generic type parameter and the specified type represents one of the constraints of c. false if none of these conditions are true, or if c is null.

IsEquivalentTo(Type, Type)

Determines whether two COM types have the same identity and are eligible for type equivalence.

Declaration
bool IsEquivalentTo(Type type, Type other)
Parameters
Type Name Description
System.Type type

The COM type that is tested for equivalence with the other type.

System.Type other

The COM type that is tested for equivalence with the specified type.

Returns
Type Description
System.Boolean

true if the COM types are equivalent; otherwise, false. This method also returns false if one type is in an assembly that is loaded for execution, and the other is in an assembly that is loaded into the reflection-only context.

IsInstanceOfType(Type, Object)

Determines whether the specified object is an instance of the specified type.

Declaration
bool IsInstanceOfType(Type type, object o)
Parameters
Type Name Description
System.Type type

The type to compare the object against.

System.Object o

The object to compare with the specified type.

Returns
Type Description
System.Boolean

true if the specified type is in the inheritance hierarchy of the object represented by o, or if the specified type is an interface that o supports. false if neither of these conditions is the case, or if o is null, or if the specified type is an open generic type (that is, System.Type.ContainsGenericParameters returns true).

IsSubclassOf(Type, Type)

Determines whether the class represented by the specified type derives from the class represented by the specified type c.

Declaration
bool IsSubclassOf(Type type, Type c)
Parameters
Type Name Description
System.Type type

The type to check for being a subclass.

System.Type c

The type to compare with the specified type.

Returns
Type Description
System.Boolean

true if the type represented by the c parameter and the specified type represent classes, and the class represented by the specified type derives from the class represented by c; otherwise, false. This method also returns false if c and the specified type represent the same class.

Extension Methods

ReflectionTypeSystemProviderExtensions.IsEnum(IReflectionTypeSystemProvider, Type)
In This Article
Back to top Generated by DocFX