Show / Hide Table of Contents

    Class TypeResolver

    Indexes assemblies and resolves types based on their names.

    Inheritance
    System.Object
    TypeResolver
    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 TypeResolver

    Constructors

    | Improve this Doc View Source

    TypeResolver()

    Creates an empty type resolver.

    Declaration
    public TypeResolver()
    | Improve this Doc View Source

    TypeResolver(IAssembly)

    Creates a type resolver and immediately adds an assembly to it.

    Declaration
    public TypeResolver(IAssembly assembly)
    Parameters
    Type Name Description
    IAssembly assembly

    The assembly to add to the type resolver.

    Properties

    | Improve this Doc View Source

    Assemblies

    Gets a list of all assemblies that are taken into consideration by this type resolver when resolving a type name.

    Declaration
    public IEnumerable<IAssembly> Assemblies { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IAssembly>
    | Improve this Doc View Source

    ReadOnlyView

    Gets a read-only view of this type resolver.

    Declaration
    public ReadOnlyTypeResolver ReadOnlyView { get; }
    Property Value
    Type Description
    ReadOnlyTypeResolver

    A read-only view of this type resolver.

    | Improve this Doc View Source

    RootNamespace

    Gets the root namespace for this type resolver.

    Declaration
    public TypeResolverNamespace RootNamespace { get; }
    Property Value
    Type Description
    TypeResolverNamespace

    The root namespace.

    Methods

    | Improve this Doc View Source

    AddAssembly(IAssembly)

    Adds an assembly to this type resolver.

    Declaration
    public bool AddAssembly(IAssembly assembly)
    Parameters
    Type Name Description
    IAssembly assembly

    The assembly to add.

    Returns
    Type Description
    System.Boolean

    true if the assembly was just added; false if it has already been added before.

    | Improve this Doc View Source

    Clone()

    Creates a clone of this type resolver.

    Declaration
    public TypeResolver Clone()
    Returns
    Type Description
    TypeResolver

    The cloned type resolver.

    | Improve this Doc View Source

    ResolveGenericParameters(IGenericMember, UnqualifiedName)

    Finds all generic parameters defined by a particular member that have a specific unqualified name.

    Declaration
    public IReadOnlyList<IType> ResolveGenericParameters(IGenericMember parentMember, UnqualifiedName name)
    Parameters
    Type Name Description
    IGenericMember parentMember

    The generic member that defines the generic parameters.

    UnqualifiedName name

    The unqualified name to look for.

    Returns
    Type Description
    System.Collections.Generic.IReadOnlyList<IType>

    A list of generic parameters that are defined by parentMember and have name name.

    | Improve this Doc View Source

    ResolveGenericParameters(IGenericMember, String)

    Finds all generic parameters defined by a particular member that have a specific imprecise unqualified name.

    Declaration
    public IReadOnlyList<IType> ResolveGenericParameters(IGenericMember parentMember, string name)
    Parameters
    Type Name Description
    IGenericMember parentMember

    The generic member that defines the generic parameters.

    System.String name

    The imprecise unqualified name to look for.

    Returns
    Type Description
    System.Collections.Generic.IReadOnlyList<IType>

    A list of generic parameters that are defined by parentMember and have name name. This includes all simply named types with name name, regardless of the number of type parameters in the type's name.

    | Improve this Doc View Source

    ResolveNestedTypes(IType, UnqualifiedName)

    Finds all nested types defined by a particular type that have a specific unqualified name.

    Declaration
    public IReadOnlyList<IType> ResolveNestedTypes(IType parentType, UnqualifiedName name)
    Parameters
    Type Name Description
    IType parentType

    The type that defines the nested types.

    UnqualifiedName name

    The unqualified name to look for.

    Returns
    Type Description
    System.Collections.Generic.IReadOnlyList<IType>

    A list of types that are defined by parentType and have name name.

    | Improve this Doc View Source

    ResolveNestedTypes(IType, String)

    Finds all nested types defined by a particular type that have a specific imprecise unqualified name.

    Declaration
    public IReadOnlyList<IType> ResolveNestedTypes(IType parentType, string name)
    Parameters
    Type Name Description
    IType parentType

    The type that defines the nested types.

    System.String name

    The imprecise unqualified name to look for.

    Returns
    Type Description
    System.Collections.Generic.IReadOnlyList<IType>

    A list of types that are defined by parentType and have name name. This includes all simply named types with name name, regardless of the number of type parameters in the type's name.

    | Improve this Doc View Source

    ResolveTypes(QualifiedName)

    Resolves all types with a particular full name.

    Declaration
    public IReadOnlyList<IType> ResolveTypes(QualifiedName fullName)
    Parameters
    Type Name Description
    QualifiedName fullName

    The full name of the types to look for.

    Returns
    Type Description
    System.Collections.Generic.IReadOnlyList<IType>

    A list of types with name fullName.

    | Improve this Doc View Source

    TryResolveNamespace(QualifiedName, out TypeResolverNamespace)

    Tries to find a namespace with a particular full name.

    Declaration
    public bool TryResolveNamespace(QualifiedName fullName, out TypeResolverNamespace result)
    Parameters
    Type Name Description
    QualifiedName fullName

    The name to look for.

    TypeResolverNamespace result

    A namespace with name fullName, if one can be found.

    Returns
    Type Description
    System.Boolean

    true if a (non-empty) namespace with name fullName can be found; otherwise, false.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX