Class TypeSlimVisitor
Visitor over the structure of a lightweight representation of a type.
Namespace: System.Reflection
Assembly: Nuqleon.Linq.Expressions.Bonsai.dll
Syntax
public class TypeSlimVisitor : Object
Constructors
TypeSlimVisitor()
Instantiates a visitor for slim types.
Declaration
public TypeSlimVisitor()
Methods
Visit(ReadOnlyCollection<TypeSlim>)
Visits a collection of types.
Declaration
public ReadOnlyCollection<TypeSlim> Visit(ReadOnlyCollection<TypeSlim> types)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ObjectModel.ReadOnlyCollection<TypeSlim> | types | Types to visit. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<TypeSlim> | Result of visiting the types. |
Visit(TypeSlim)
Visits the specified type.
Declaration
public virtual TypeSlim Visit(TypeSlim type)
Parameters
Type | Name | Description |
---|---|---|
TypeSlim | type | Type to visit. |
Returns
Type | Description |
---|---|
TypeSlim | Result of the visit. |
VisitAndConvert<T>(T)
Visits and converts a type.
Declaration
public T VisitAndConvert<T>(T type)
where T : TypeSlim
Parameters
Type | Name | Description |
---|---|---|
T | type | Type to visit. |
Returns
Type | Description |
---|---|
T | Result of visiting and converting the type. |
Type Parameters
Name | Description |
---|---|
T | Type representing the kind of type to convert to. |
VisitArray(ArrayTypeSlim)
Visits an array type.
Declaration
protected virtual TypeSlim VisitArray(ArrayTypeSlim type)
Parameters
Type | Name | Description |
---|---|---|
ArrayTypeSlim | type | Type to visit. |
Returns
Type | Description |
---|---|
TypeSlim | Result of the visit. |
VisitGeneric(GenericTypeSlim)
Visits a close generic type.
Declaration
protected virtual TypeSlim VisitGeneric(GenericTypeSlim type)
Parameters
Type | Name | Description |
---|---|---|
GenericTypeSlim | type | Type to visit. |
Returns
Type | Description |
---|---|
TypeSlim | Result of the visit. |
VisitGenericDefinition(GenericDefinitionTypeSlim)
Visits an open generic type definition.
Declaration
protected virtual TypeSlim VisitGenericDefinition(GenericDefinitionTypeSlim type)
Parameters
Type | Name | Description |
---|---|---|
GenericDefinitionTypeSlim | type | Type to visit. |
Returns
Type | Description |
---|---|
TypeSlim | Result of the visit. |
VisitGenericParameter(GenericParameterTypeSlim)
Visits a generic parameter type.
Declaration
protected virtual TypeSlim VisitGenericParameter(GenericParameterTypeSlim type)
Parameters
Type | Name | Description |
---|---|---|
GenericParameterTypeSlim | type | Type to visit. |
Returns
Type | Description |
---|---|
TypeSlim | Result of the visit. |
VisitGenericTypeArguments(GenericTypeSlim)
Visits the generic type arguments of a generic type.
Declaration
protected TypeSlim[] VisitGenericTypeArguments(GenericTypeSlim genericType)
Parameters
Type | Name | Description |
---|---|---|
GenericTypeSlim | genericType | The generic type whose type arguments to visit. |
Returns
Type | Description |
---|---|
TypeSlim[] | Result of visiting the generic type arguments; null if no types changed. |
VisitSimple(SimpleTypeSlim)
Visits a simple type.
Declaration
protected virtual TypeSlim VisitSimple(SimpleTypeSlim type)
Parameters
Type | Name | Description |
---|---|---|
SimpleTypeSlim | type | Type to visit. |
Returns
Type | Description |
---|---|
TypeSlim | Result of the visit. |
VisitStructural(StructuralTypeSlim)
Visits a structural type.
Declaration
protected virtual TypeSlim VisitStructural(StructuralTypeSlim type)
Parameters
Type | Name | Description |
---|---|---|
StructuralTypeSlim | type | Type to visit. |
Returns
Type | Description |
---|---|
TypeSlim | Result of the visit. |