Struct ReadOnlyTypeResolver
A read-only view of a type resolver.
Inherited Members
Namespace: Flame.TypeSystem
Assembly: Flame.dll
Syntax
public struct ReadOnlyTypeResolver
Constructors
| Improve this Doc View SourceReadOnlyTypeResolver(IAssembly)
Creates a read-only type resolver that resolves types from a particular assembly.
Declaration
public ReadOnlyTypeResolver(IAssembly assembly)
Parameters
Type | Name | Description |
---|---|---|
IAssembly | assembly | The assembly to resolve types from. |
ReadOnlyTypeResolver(TypeResolver)
Creates a read-only view of a type resolver from a type resolver.
Declaration
public ReadOnlyTypeResolver(TypeResolver resolver)
Parameters
Type | Name | Description |
---|---|---|
TypeResolver | resolver | The type resolver to create a read-only view of. |
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> |
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 SourceCreateMutableCopy()
Creates a mutable copy of this read-only view of a type resolver.
Declaration
public TypeResolver CreateMutableCopy()
Returns
Type | Description |
---|---|
TypeResolver | A mutable copy. |
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 |
|
WithAssembly(IAssembly)
Creates a new read-only type resolver that includes a particular assembly.
Declaration
public ReadOnlyTypeResolver WithAssembly(IAssembly assembly)
Parameters
Type | Name | Description |
---|---|---|
IAssembly | assembly | The assembly to include. |
Returns
Type | Description |
---|---|
ReadOnlyTypeResolver | A new read-only type resolver. |