Show / Hide Table of Contents

    Class TypeFuncVisitor

    A type visitor that uses a type-to-type mapping function under the hood.

    Inheritance
    System.Object
    TypeVisitor
    TypeFuncVisitor
    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 TypeFuncVisitor : TypeVisitor

    Constructors

    | Improve this Doc View Source

    TypeFuncVisitor(Func<IType, IType>)

    Creates a type visitor based on a type-to-type mapping function.

    Declaration
    public TypeFuncVisitor(Func<IType, IType> mapType)
    Parameters
    Type Name Description
    System.Func<IType, IType> mapType

    A type-to-type mapping function.

    Properties

    | Improve this Doc View Source

    MapType

    Gets the type-to-type mapping this visitor uses under the hood.

    Declaration
    public Func<IType, IType> MapType { get; }
    Property Value
    Type Description
    System.Func<IType, IType>

    A type-to-type 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