Show / Hide Table of Contents

Class DataTypeVisitor<TType, TProperty>

Visitor of the structure of a data model type.

Inheritance
System.Object
DataTypeVisitor<TType, TProperty>
Namespace: Nuqleon.DataModel.TypeSystem
Assembly: Nuqleon.DataModel.CompilerServices.dll
Syntax
public abstract class DataTypeVisitor<TType, TProperty> : Object
Type Parameters
Name Description
TType

Type of the result of visiting a data type.

TProperty

Type of the result of visiting a property.

Constructors

DataTypeVisitor()

Declaration
protected DataTypeVisitor()

Methods

MakeArray(ArrayDataType, TType)

Makes an array type representation.

Declaration
protected abstract TType MakeArray(ArrayDataType type, TType elementType)
Parameters
Type Name Description
ArrayDataType type

Original array data type.

TType elementType

Element type of the array.

Returns
Type Description
TType

Representation of an array type.

MakeFunction(FunctionDataType, ReadOnlyCollection<TType>, TType)

Makes an function type representation.

Declaration
protected abstract TType MakeFunction(FunctionDataType type, ReadOnlyCollection<TType> parameterTypes, TType returnType)
Parameters
Type Name Description
FunctionDataType type

Original function data type.

System.Collections.ObjectModel.ReadOnlyCollection<TType> parameterTypes

Parameter types of the function.

TType returnType

Return type of the function.

Returns
Type Description
TType

Representation of a function type.

MakeProperty(DataProperty, TType)

Makes a property representation.

Declaration
protected abstract TProperty MakeProperty(DataProperty property, TType propertyType)
Parameters
Type Name Description
DataProperty property

Original property.

TType propertyType

Property type.

Returns
Type Description
TProperty

Representation of a property.

MakeQuotation(QuotationDataType, TType)

Makes a quotation type representation.

Declaration
protected abstract TType MakeQuotation(QuotationDataType type, TType functionType)
Parameters
Type Name Description
QuotationDataType type

Original quotation data type.

TType functionType

Type of the function.

Returns
Type Description
TType

Representation of a quotation type.

MakeStructural(StructuralDataType, ReadOnlyCollection<TProperty>)

Makes a structural type representation.

Declaration
protected abstract TType MakeStructural(StructuralDataType type, ReadOnlyCollection<TProperty> properties)
Parameters
Type Name Description
StructuralDataType type

Original structural data type.

System.Collections.ObjectModel.ReadOnlyCollection<TProperty> properties

Properties of the structural type.

Returns
Type Description
TType

Representation of a structural type.

Visit(DataType)

Visits a data type.

Declaration
public virtual TType Visit(DataType type)
Parameters
Type Name Description
DataType type

Data type to visit.

Returns
Type Description
TType

Result of visiting the data type.

VisitArray(ArrayDataType)

Visits an array data type.

Declaration
protected virtual TType VisitArray(ArrayDataType type)
Parameters
Type Name Description
ArrayDataType type

Data type to visit.

Returns
Type Description
TType

Result of visiting the data type.

VisitCustom(DataType)

Visits a custom data type.

Declaration
protected abstract TType VisitCustom(DataType type)
Parameters
Type Name Description
DataType type

Data type to visit.

Returns
Type Description
TType

Result of visiting the data type.

VisitExpression(ExpressionDataType)

Visits an expression data type.

Declaration
protected abstract TType VisitExpression(ExpressionDataType type)
Parameters
Type Name Description
ExpressionDataType type

Data type to visit.

Returns
Type Description
TType

Result of visiting the data type.

VisitFunction(FunctionDataType)

Visits a function data type.

Declaration
protected virtual TType VisitFunction(FunctionDataType type)
Parameters
Type Name Description
FunctionDataType type

Data type to visit.

Returns
Type Description
TType

Result of visiting the data type.

VisitOpenGenericParameter(OpenGenericParameterDataType)

Visits an open generic parameter data type.

Declaration
protected abstract TType VisitOpenGenericParameter(OpenGenericParameterDataType type)
Parameters
Type Name Description
OpenGenericParameterDataType type

Data type to visit.

Returns
Type Description
TType

Result of visiting the data type.

VisitPrimitive(PrimitiveDataType)

Visits a primitive data type.

Declaration
protected abstract TType VisitPrimitive(PrimitiveDataType type)
Parameters
Type Name Description
PrimitiveDataType type

Data type to visit.

Returns
Type Description
TType

Result of visiting the data type.

VisitProperty(DataProperty)

Visits a data model property.

Declaration
protected virtual TProperty VisitProperty(DataProperty property)
Parameters
Type Name Description
DataProperty property

Property to visit.

Returns
Type Description
TProperty

Result of visiting the property.

VisitQuotation(QuotationDataType)

Visits a quotation data type.

Declaration
protected virtual TType VisitQuotation(QuotationDataType type)
Parameters
Type Name Description
QuotationDataType type

Data type to visit.

Returns
Type Description
TType

Result of visiting the data type.

VisitStructural(StructuralDataType)

Visits a structural data type.

Declaration
protected virtual TType VisitStructural(StructuralDataType type)
Parameters
Type Name Description
StructuralDataType type

Data type to visit.

Returns
Type Description
TType

Result of visiting the data type.

In This Article
Back to top Generated by DocFX