Class RealType
- Namespace
- Dynamitey.DynamicObjects
- Assembly
- Dynamitey.Community.dll
A Fake Type that represents a real type
public class RealType : FauxType
- Inheritance
-
RealType
- Inherited Members
Constructors
RealType(Type)
Initializes a new instance of the RealType class.
public RealType(Type type)
Parameters
typeTypeThe type.
Fields
TargetType
The target type
protected readonly Type TargetType
Field Value
Methods
FromType(Type)
Named alternate for the implicit conversion from Type above, for callers in a language that cannot consume operator overloads.
public static RealType FromType(Type type)
Parameters
typeTypeThe type.
Returns
GetContainedTypes()
Gets the contained types.
public override Type[] GetContainedTypes()
Returns
- Type[]
GetMember(string)
Gets the members.
[RequiresUnreferencedCode("Reflects over TargetType's members by name; trimming can remove the member being resolved.")]
public override IEnumerable<MemberInfo> GetMember(string binderName)
Parameters
binderNamestringName of the binder.
Returns
GetMemberNames()
Gets the names of the wrapped type's members, reflected from the type itself.
[RequiresUnreferencedCode("Reflects over TargetType's members; trimming can remove members it would otherwise report.")]
public override IEnumerable<string> GetMemberNames()
Returns
- IEnumerable<string>
The member names reported by the underlying CLR type.
ToType()
Named alternate for the implicit conversion to Type above, for callers in a language that cannot consume operator overloads. TargetType is protected, so this is the only way an external caller reads the wrapped Type back out.
public Type ToType()
Returns
Operators
implicit operator Type(RealType)
RealType implicitly converts to an actual Type
public static implicit operator Type(RealType type)
Parameters
typeRealTypeThe type.
Returns
implicit operator RealType(Type)
An actual Type implicitly converts to a RealType
public static implicit operator RealType(Type type)
Parameters
typeTypeThe type.