Show / Hide Table of Contents

Class TypeSpace

A container for mappings from types to slim types and members to slim members.

Inheritance
System.Object
TypeSpace
DataModelTypeSpace
Namespace: System.Reflection
Assembly: Nuqleon.Linq.Expressions.Bonsai.dll
Syntax
public class TypeSpace : Object

Constructors

TypeSpace()

Creates the type space.

Declaration
public TypeSpace()

Properties

TypeConverter

Gets the type conversion instance used for this type space.

Declaration
protected virtual TypeToTypeSlimConverter TypeConverter { get; }
Property Value
Type Description
TypeToTypeSlimConverter

Methods

ConvertType(Type)

Gets a slim type from a CLR type.

Declaration
public virtual TypeSlim ConvertType(Type type)
Parameters
Type Name Description
System.Type type

The CLR type.

Returns
Type Description
TypeSlim

A slim representation of the CLR type.

GetConstructor(ConstructorInfo)

Gets a slim version of a constructor.

Declaration
public ConstructorInfoSlim GetConstructor(ConstructorInfo constructor)
Parameters
Type Name Description
System.Reflection.ConstructorInfo constructor

The original constructor.

Returns
Type Description
ConstructorInfoSlim

The slim representation of the constructor.

GetConstructorCore(ConstructorInfo, TypeSlim, ReadOnlyCollection<TypeSlim>)

Creates a slim constructor from the original constructor.

Declaration
protected virtual ConstructorInfoSlim GetConstructorCore(ConstructorInfo originalConstructor, TypeSlim declaringTypeSlim, ReadOnlyCollection<TypeSlim> parameterTypeSlims)
Parameters
Type Name Description
System.Reflection.ConstructorInfo originalConstructor

The original constructor.

TypeSlim declaringTypeSlim

The slim version of the declaring type.

System.Collections.ObjectModel.ReadOnlyCollection<TypeSlim> parameterTypeSlims

The slim versions of the constructor parameter types.

Returns
Type Description
ConstructorInfoSlim

The slim representation of the constructor.

GetField(FieldInfo)

Gets a slim version of a field.

Declaration
public FieldInfoSlim GetField(FieldInfo field)
Parameters
Type Name Description
System.Reflection.FieldInfo field

The original field.

Returns
Type Description
FieldInfoSlim

The slim representation of the field.

GetFieldCore(FieldInfo, TypeSlim, TypeSlim)

Creates a slim field from the original field.

Declaration
protected virtual FieldInfoSlim GetFieldCore(FieldInfo originalField, TypeSlim declaringTypeSlim, TypeSlim fieldTypeSlim)
Parameters
Type Name Description
System.Reflection.FieldInfo originalField

The original field.

TypeSlim declaringTypeSlim

The slim version of the declaring type.

TypeSlim fieldTypeSlim

The slim version of the field type.

Returns
Type Description
FieldInfoSlim

The slim representation of the field.

GetGenericDefinitionMethodCore(MethodInfo, TypeSlim, ReadOnlyCollection<TypeSlim>, ReadOnlyCollection<TypeSlim>, TypeSlim)

Creates a slim generic definition method from the original method.

Declaration
protected virtual MethodInfoSlim GetGenericDefinitionMethodCore(MethodInfo originalMethod, TypeSlim declaringTypeSlim, ReadOnlyCollection<TypeSlim> genericParameterTypeSlims, ReadOnlyCollection<TypeSlim> parameterTypeSlims, TypeSlim returnTypeSlim)
Parameters
Type Name Description
System.Reflection.MethodInfo originalMethod

The original method.

TypeSlim declaringTypeSlim

The slim version of the declaring type.

System.Collections.ObjectModel.ReadOnlyCollection<TypeSlim> genericParameterTypeSlims

The slim versions of the generic parameter types.

System.Collections.ObjectModel.ReadOnlyCollection<TypeSlim> parameterTypeSlims

The slim versions of the method parameter types.

TypeSlim returnTypeSlim

The slim version of the return type.

Returns
Type Description
MethodInfoSlim

The slim representation of the method.

GetGenericMethodCore(MethodInfo, GenericDefinitionMethodInfoSlim, ReadOnlyCollection<TypeSlim>)

Creates a slim generic method from the original method.

Declaration
protected virtual MethodInfoSlim GetGenericMethodCore(MethodInfo originalMethod, GenericDefinitionMethodInfoSlim methodDefinitionSlim, ReadOnlyCollection<TypeSlim> genericParameterTypeSlims)
Parameters
Type Name Description
System.Reflection.MethodInfo originalMethod

The original method.

GenericDefinitionMethodInfoSlim methodDefinitionSlim

The slim version of the generic method definition.

System.Collections.ObjectModel.ReadOnlyCollection<TypeSlim> genericParameterTypeSlims

The slim versions of the generic parameter types.

Returns
Type Description
MethodInfoSlim

The slim representation of the method.

GetMember(MemberInfo)

Gets a slim version of a member.

Declaration
public MemberInfoSlim GetMember(MemberInfo member)
Parameters
Type Name Description
System.Reflection.MemberInfo member

The original member.

Returns
Type Description
MemberInfoSlim

The slim representation of the member.

GetMethod(MethodInfo)

Gets a slim version of a method.

Declaration
public MethodInfoSlim GetMethod(MethodInfo method)
Parameters
Type Name Description
System.Reflection.MethodInfo method

The original method.

Returns
Type Description
MethodInfoSlim

The slim representation of the method.

GetProperty(PropertyInfo)

Gets a slim version of a property.

Declaration
public PropertyInfoSlim GetProperty(PropertyInfo property)
Parameters
Type Name Description
System.Reflection.PropertyInfo property

The original property.

Returns
Type Description
PropertyInfoSlim

The slim representation of the property.

GetPropertyCore(PropertyInfo, TypeSlim, TypeSlim, ReadOnlyCollection<TypeSlim>)

Creates a slim property from the original property.

Declaration
protected virtual PropertyInfoSlim GetPropertyCore(PropertyInfo originalProperty, TypeSlim declaringTypeSlim, TypeSlim propertyTypeSlim, ReadOnlyCollection<TypeSlim> indexParameterTypeSlims)
Parameters
Type Name Description
System.Reflection.PropertyInfo originalProperty

The original property.

TypeSlim declaringTypeSlim

The slim version of the declaring type.

TypeSlim propertyTypeSlim

The slim version of the property type.

System.Collections.ObjectModel.ReadOnlyCollection<TypeSlim> indexParameterTypeSlims

The slim versions of the index parameter types.

Returns
Type Description
PropertyInfoSlim

The slim representation of the property.

GetSimpleMethodCore(MethodInfo, TypeSlim, ReadOnlyCollection<TypeSlim>, TypeSlim)

Creates a slim simple method from the original simple method.

Declaration
protected virtual MethodInfoSlim GetSimpleMethodCore(MethodInfo originalMethod, TypeSlim declaringTypeSlim, ReadOnlyCollection<TypeSlim> parameterTypeSlims, TypeSlim returnTypeSlim)
Parameters
Type Name Description
System.Reflection.MethodInfo originalMethod

The original method.

TypeSlim declaringTypeSlim

The slim version of the declaring type.

System.Collections.ObjectModel.ReadOnlyCollection<TypeSlim> parameterTypeSlims

The slim versions of the method parameter types.

TypeSlim returnTypeSlim

The slim version of the return type.

Returns
Type Description
MethodInfoSlim

The slim representation of the method.

MapType(Type, TypeSlim)

Manually adds mapping from a CLR type to a slim type

Declaration
public virtual void MapType(Type type, TypeSlim typeSlim)
Parameters
Type Name Description
System.Type type

The CLR type.

TypeSlim typeSlim

The slim type.

In This Article
Back to top Generated by DocFX