Struct QualifiedName
A data structure that represents a qualified name.
Inherited Members
Namespace: Flame
Assembly: Flame.dll
Syntax
public struct QualifiedName
Constructors
| Improve this Doc View SourceQualifiedName(UnqualifiedName)
Creates a qualified name from an unqualified name.
Declaration
public QualifiedName(UnqualifiedName name)
Parameters
Type | Name | Description |
---|---|---|
UnqualifiedName | name | An unqualified name to qualify. |
QualifiedName(UnqualifiedName, QualifiedName)
Creates a qualified name by prepending a qualifier to another qualified name.
Declaration
public QualifiedName(UnqualifiedName qualifier, QualifiedName name)
Parameters
Type | Name | Description |
---|---|---|
UnqualifiedName | qualifier | A qualifier to prepend to a name. |
QualifiedName | name | A qualified name to prepend the qualifier to. |
QualifiedName(IReadOnlyList<UnqualifiedName>)
Creates a qualified name from a sequence of qualifiers.
Declaration
public QualifiedName(IReadOnlyList<UnqualifiedName> qualifiers)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyList<UnqualifiedName> | qualifiers | The qualified name's qualifiers. |
QualifiedName(IReadOnlyList<String>)
Creates a qualified name from a sequence of strings that are interpreted as simple names.
Declaration
public QualifiedName(IReadOnlyList<string> names)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyList<System.String> | names | A list of strings, each of which is interpreted as a simple name. |
QualifiedName(String)
Creates a qualified name from a string that is interpreted as a simple name.
Declaration
public QualifiedName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A string to create a simple name from, which is subsequently qualified. |
QualifiedName(String, QualifiedName)
Creates a qualified name from a qualifier and an unqualified name.
Declaration
public QualifiedName(string qualifier, QualifiedName name)
Parameters
Type | Name | Description |
---|---|---|
System.String | qualifier | A qualifier to prepend to the unqualified name. |
QualifiedName | name | An unqualified name to qualify. |
QualifiedName(String[])
Creates a qualified name from an array of strings that are interpreted as simple names.
Declaration
public QualifiedName(params string[] names)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | names | A list of strings, each of which is interpreted as a simple name. |
Properties
| Improve this Doc View SourceFullName
Gets this qualified name's full name.
Declaration
public string FullName { get; }
Property Value
Type | Description |
---|---|
System.String |
FullyUnqualifiedName
Gets the fully unqualified version of this qualified name, i.e., the last element in the qualifier path.
Declaration
public UnqualifiedName FullyUnqualifiedName { get; }
Property Value
Type | Description |
---|---|
UnqualifiedName | The fully unqualified name. |
IsEmpty
Gets a value indicating whether this name is empty: it is both unqualified, and its name null.
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsQualified
Gets a value indicating whether this name is a qualified name, rather than an unqualified name.
Declaration
public bool IsQualified { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Item[Int32]
Gets the unqualified name at the given index in this path representation of this qualified name.
Declaration
public UnqualifiedName this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
UnqualifiedName |
Name
Gets the name that is qualified by the qualifier. This corresponds to the tail of this qualified name's path representation.
Declaration
public QualifiedName Name { get; }
Property Value
Type | Description |
---|---|
QualifiedName |
Path
Describes this qualified name as a "path": a sequence of unqualified names that spell this qualified name.
Declaration
public IReadOnlyList<UnqualifiedName> Path { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<UnqualifiedName> |
PathLength
Gets the number of elements in the path representation of this qualified name.
Declaration
public int PathLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Qualifier
Gets this qualified name's qualifier, or the unqualified name, if this name is not qualified. This corresponds to the first element of the qualified name's path representation.
Declaration
public UnqualifiedName Qualifier { get; }
Property Value
Type | Description |
---|---|
UnqualifiedName |
Methods
| Improve this Doc View SourceDrop(Int32)
Drops the given number of qualifiers from this qualified name. If this drops all qualifiers, then the empty name is returned.
Declaration
public QualifiedName Drop(int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count |
Returns
Type | Description |
---|---|
QualifiedName |
Remarks
This is equivalent to accessing 'Name' multiple times.
Equals(QualifiedName)
Tests if this qualified name equals another qualified name.
Declaration
public bool Equals(QualifiedName other)
Parameters
Type | Name | Description |
---|---|---|
QualifiedName | other | A qualified name to compare this name to. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type | Name | Description |
---|---|---|
System.Object | other |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
Qualify(QualifiedName)
Qualifies this name with an additional qualifier. A new instance is returned that represents the concatenation of said qualifier and this qualified name.
Declaration
public QualifiedName Qualify(QualifiedName preQualifier)
Parameters
Type | Name | Description |
---|---|---|
QualifiedName | preQualifier |
Returns
Type | Description |
---|---|
QualifiedName |
Qualify(UnqualifiedName)
Qualifies this name with an additional qualifier. A new instance is returned that represents the concatenation of said qualifier and this qualified name.
Declaration
public QualifiedName Qualify(UnqualifiedName preQualifier)
Parameters
Type | Name | Description |
---|---|---|
UnqualifiedName | preQualifier |
Returns
Type | Description |
---|---|
QualifiedName |
Qualify(String)
Qualifies this name with an additional qualifier. A new instance is returned that represents the concatenation of said qualifier and this qualified name.
Declaration
public QualifiedName Qualify(string preQualifier)
Parameters
Type | Name | Description |
---|---|---|
System.String | preQualifier |
Returns
Type | Description |
---|---|
QualifiedName |
Slice(Int32)
Creates a slice of the path representation of this qualified name and returns that slice as a new qualified name. The slice starts at a particular offset and ends at the end of this qualified name.
Declaration
public QualifiedName Slice(int offset)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | offset | The offset in the path at which the slice begins. |
Returns
Type | Description |
---|---|
QualifiedName | A qualified name. |
Slice(Int32, Int32)
Creates a slice of the path representation of this qualified name and returns that slice as a new qualified name. Both the offset and length must be greater than zero, and will be clamped to this qualified name's bounds.
Declaration
public QualifiedName Slice(int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
QualifiedName |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |