Class TypeMappingVisitor
A type visitor that replaces types according to a dictionary.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Flame.TypeSystem
Assembly: Flame.dll
Syntax
public sealed class TypeMappingVisitor : TypeVisitor
Constructors
| Improve this Doc View SourceTypeMappingVisitor(IReadOnlyDictionary<IType, IType>)
Creates a type mapping visitor from a dictionary.
Declaration
public TypeMappingVisitor(IReadOnlyDictionary<IType, IType> mapping)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyDictionary<IType, IType> | mapping | A mapping of source types to target types. |
Properties
| Improve this Doc 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 |
---|---|
System.Collections.Generic.IReadOnlyDictionary<IType, IType> | A mapping. |
Methods
| Improve this Doc 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 |
---|---|
System.Boolean |
|
Overrides
| Improve this Doc 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. |