Class TypeResolverNamespace
An artifical namespace introduced by a type resolver.
Inheritance
Inherited Members
Namespace: Flame.TypeSystem
Assembly: Flame.dll
Syntax
public sealed class TypeResolverNamespace
Properties
| Improve this Doc View SourceNamespaces
Gets a mapping of names to child namespaces defined in this namespace.
Declaration
public IReadOnlyDictionary<UnqualifiedName, TypeResolverNamespace> Namespaces { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<UnqualifiedName, TypeResolverNamespace> |
Types
Gets the set of all types defined by this resolver.
Declaration
public IEnumerable<IType> Types { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IType> |
Methods
| Improve this Doc View SourceResolveTypes(UnqualifiedName)
Gets all types in this namespace with a particular name.
Declaration
public IReadOnlyList<IType> ResolveTypes(UnqualifiedName name)
Parameters
Type | Name | Description |
---|---|---|
UnqualifiedName | name | The name to look for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<IType> | A list of all types with that name. |
ResolveTypes(String)
Gets all types in this namespace with a particular name.
Declaration
public IReadOnlyList<IType> ResolveTypes(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name to look for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<IType> | A list of all types with that name. This includes all simply
named types with name |
ToImpreciseName(UnqualifiedName)
Takes an unqualified name and turns it into an imprecise name by dropping the type parameter count of simple names and converting all other kinds of names into strings.
Declaration
public static string ToImpreciseName(UnqualifiedName name)
Parameters
Type | Name | Description |
---|---|---|
UnqualifiedName | name | The name to convert. |
Returns
Type | Description |
---|---|
System.String | An imprecise name. |
TryResolveNamespace(QualifiedName, out TypeResolverNamespace)
Tries to find a child whose full name corresponds to the concatenation of this namespace's full name and a given qualified 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 whose name equals the concatenation of this namespace's
full name and |
Returns
Type | Description |
---|---|
System.Boolean |
|