Class TypeResolver
Indexes assemblies and resolves types based on their names.
Inheritance
Inherited Members
Namespace: Flame.TypeSystem
Assembly: Flame.dll
Syntax
public sealed class TypeResolver
Constructors
| Improve this Doc View SourceTypeResolver()
Creates an empty type resolver.
Declaration
public TypeResolver()
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 SourceAssemblies
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> |
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. |
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 SourceAddAssembly(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 |
|
Clone()
Creates a clone of this type resolver.
Declaration
public TypeResolver Clone()
Returns
Type | Description |
---|---|
TypeResolver | The cloned type resolver. |
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 |
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 |
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 |
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 |
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 |
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 |
Returns
Type | Description |
---|---|
System.Boolean |
|