Show / Hide Table of Contents

    Class TypeMappingVisitor

    A type visitor that replaces types according to a dictionary.

    Inheritance
    System.Object
    TypeVisitor
    TypeMappingVisitor
    Inherited Members
    TypeVisitor.VisitUninteresting(IType)
    TypeVisitor.Visit(IType)
    TypeVisitor.VisitAll(IReadOnlyList<IType>)
    TypeVisitor.Visit(Parameter)
    TypeVisitor.VisitAll(IReadOnlyList<Parameter>)
    TypeVisitor.Visit(IMethod)
    TypeVisitor.VisitAll(IReadOnlyList<IMethod>)
    TypeVisitor.Visit(IField)
    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 Source

    TypeMappingVisitor(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 Source

    Mapping

    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 Source

    IsOfInterest(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

    true if the type is interesting; otherwise, false.

    Overrides
    TypeVisitor.IsOfInterest(IType)
    | Improve this Doc View Source

    VisitInteresting(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.

    Overrides
    TypeVisitor.VisitInteresting(IType)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX