Class TypeMappingVisitor
A type visitor that replaces types according to a dictionary.
Inherited Members
Namespace: Flame.TypeSystem
Assembly: Flame.dll
Syntax
public sealed class TypeMappingVisitor : TypeVisitor
Constructors
| Edit this page View SourceTypeMappingVisitor(IReadOnlyDictionary<IType, IType>)
Creates a type mapping visitor from a dictionary.
Declaration
public TypeMappingVisitor(IReadOnlyDictionary<IType, IType> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyDictionary<IType, IType> | mapping | A mapping of source types to target types. |
Properties
| Edit this page View SourceMapping
Gets a mapping of source types to target types for this type mapping visitor.
Declaration
public IReadOnlyDictionary<IType, IType> Mapping { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyDictionary<IType, IType> | A mapping. |
Methods
| Edit this page View SourceIsOfInterest(IType)
Tells if a type is of interest to this visitor. Visitors always specify custom behavior for interesting types, whereas uninteresting composite types are usually treated the same: the visitor simply visits the types they are composed of.
Declaration
protected override bool IsOfInterest(IType type)
Parameters
| Type | Name | Description |
|---|---|---|
| IType | type | A type. |
Returns
| Type | Description |
|---|---|
| bool |
|
Overrides
| Edit this page View SourceVisitInteresting(IType)
Visits a type that has been marked as interesting.
Declaration
protected override IType VisitInteresting(IType type)
Parameters
| Type | Name | Description |
|---|---|---|
| IType | type | A type to visit. |
Returns
| Type | Description |
|---|---|
| IType | A visited type. |