Class DataTypeVisitor
Visitor of the structure of a data model type.
Inheritance
Namespace: Nuqleon.DataModel.TypeSystem
Assembly: Nuqleon.DataModel.CompilerServices.dll
Syntax
public class DataTypeVisitor : Object
Constructors
DataTypeVisitor()
Declaration
public DataTypeVisitor()
Methods
ChangeField(FieldInfo)
Changes the CLR field during a rewrite of properties.
Declaration
protected virtual MemberInfo ChangeField(FieldInfo field)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Reflection.FieldInfo | field | CLR field to change. |
Returns
| Type | Description |
|---|---|
| System.Reflection.MemberInfo | Result of changing the CLR field. |
ChangeProperty(PropertyInfo)
Changes the CLR property during a rewrite of properties.
Declaration
protected virtual MemberInfo ChangeProperty(PropertyInfo property)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Reflection.PropertyInfo | property | CLR property to change. |
Returns
| Type | Description |
|---|---|
| System.Reflection.MemberInfo | Result of changing the CLR property. |
ChangeUnderlyingType(Type)
Changes the underlying CLR type of a data type during a rewrite of data types.
Declaration
protected virtual Type ChangeUnderlyingType(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | CLR type to change. |
Returns
| Type | Description |
|---|---|
| System.Type | Result of changing the CLR type. |
Visit(DataType)
Visits a data type.
Declaration
public virtual DataType Visit(DataType type)
Parameters
| Type | Name | Description |
|---|---|---|
| DataType | type | Data type to visit. |
Returns
| Type | Description |
|---|---|
| DataType | Result of visiting the data type, or the original data type if nothing changed. |
Visit<T>(ReadOnlyCollection<T>, Func<T, T>)
Visits a collection of objects using the specified visit function.
Declaration
public static ReadOnlyCollection<T> Visit<T>(ReadOnlyCollection<T> nodes, Func<T, T> elementVisitor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.ObjectModel.ReadOnlyCollection<T> | nodes | Nodes to visit. |
| System.Func<T, T> | elementVisitor | Function to visit each of the elements in the collection. |
Returns
| Type | Description |
|---|---|
| System.Collections.ObjectModel.ReadOnlyCollection<T> | Result of visiting the nodes. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the objects in the collection. |
VisitAndConvert<T>(DataType)
Visits and converts a data type.
Declaration
protected T VisitAndConvert<T>(DataType type)
where T : DataType
Parameters
| Type | Name | Description |
|---|---|---|
| DataType | type | Data type to visit. |
Returns
| Type | Description |
|---|---|
| T | Result of visiting and converting the type. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the data type to convert to. |
VisitArray(ArrayDataType)
Visits an array data type.
Declaration
protected virtual DataType VisitArray(ArrayDataType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ArrayDataType | type | Data type to visit. |
Returns
| Type | Description |
|---|---|
| DataType | Result of visiting the data type, or the original data type if nothing changed. |
VisitCustom(DataType)
Visits a custom data type.
Declaration
protected virtual DataType VisitCustom(DataType type)
Parameters
| Type | Name | Description |
|---|---|---|
| DataType | type | Data type to visit. |
Returns
| Type | Description |
|---|---|
| DataType | Result of visiting the data type, or the original data type if nothing changed. |
VisitExpression(ExpressionDataType)
Visits an expression data type.
Declaration
protected virtual DataType VisitExpression(ExpressionDataType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ExpressionDataType | type | Data type to visit. |
Returns
| Type | Description |
|---|---|
| DataType | Result of visiting the data type, or the original data type if nothing changed. |
VisitFunction(FunctionDataType)
Visits a function data type.
Declaration
protected virtual DataType VisitFunction(FunctionDataType type)
Parameters
| Type | Name | Description |
|---|---|---|
| FunctionDataType | type | Data type to visit. |
Returns
| Type | Description |
|---|---|
| DataType | Result of visiting the data type, or the original data type if nothing changed. |
VisitOpenGenericParameter(OpenGenericParameterDataType)
Visits an open generic parameter type.
Declaration
protected virtual DataType VisitOpenGenericParameter(OpenGenericParameterDataType type)
Parameters
| Type | Name | Description |
|---|---|---|
| OpenGenericParameterDataType | type | Data type to visit. |
Returns
| Type | Description |
|---|---|
| DataType | Result of visiting the data type, or the original data type if nothing changed. |
VisitPrimitive(PrimitiveDataType)
Visits a primitive data type.
Declaration
protected virtual DataType VisitPrimitive(PrimitiveDataType type)
Parameters
| Type | Name | Description |
|---|---|---|
| PrimitiveDataType | type | Data type to visit. |
Returns
| Type | Description |
|---|---|
| DataType | Result of visiting the data type, or the original data type if nothing changed. |
VisitProperty(DataProperty)
Visits a data model property.
Declaration
protected virtual DataProperty VisitProperty(DataProperty property)
Parameters
| Type | Name | Description |
|---|---|---|
| DataProperty | property | Property to visit. |
Returns
| Type | Description |
|---|---|
| DataProperty | Result of visiting the property, or the original property if nothing changed. |
VisitQuotation(QuotationDataType)
Visits a quotation data type.
Declaration
protected virtual DataType VisitQuotation(QuotationDataType type)
Parameters
| Type | Name | Description |
|---|---|---|
| QuotationDataType | type | Data type to visit. |
Returns
| Type | Description |
|---|---|
| DataType | Result of visiting the data type, or the original data type if nothing changed. |
VisitStructural(StructuralDataType)
Visits a structural data type.
Declaration
protected virtual DataType VisitStructural(StructuralDataType type)
Parameters
| Type | Name | Description |
|---|---|---|
| StructuralDataType | type | Data type to visit. |
Returns
| Type | Description |
|---|---|
| DataType | Result of visiting the data type, or the original data type if nothing changed. |