SimpleName Class
Represents a simple name with optional type arguments, which is a component of an IQualifiedName.
public class SimpleName : ISimpleName
- Inheritance:
- object object
- Implements:
- ISimpleName
Constructors
SimpleName(SimpleName)
Initializes a new instance of the SimpleName class.
public SimpleName(SimpleName simpleName)
| Parameter | Type | Description |
|---|---|---|
| simpleName | SimpleName | The AST simple name to examine. |
SimpleName(string, params IQualifiedName[])
Initializes a new instance of the SimpleName class.
public SimpleName(string text, params IQualifiedName[] typeArguments)
| Parameter | Type | Description |
|---|---|---|
| text | string | The text value of the identifier. |
| typeArguments | IQualifiedName[] | The collection of optional generic type arguments for the identifier. |
Properties
HasTypeArguments
Gets whether the identifier has at least one type argument.
public bool HasTypeArguments { get; }
Property Value
- bool:
trueif the identifier has at least one type argument; otherwise,false.
Text
Gets the text value of the identifier.
TypeArguments
Gets the collection of optional generic type arguments for the identifier.
public IList<IQualifiedName> TypeArguments { get; }
Property Value
- IList<IQualifiedName>:
The collection of optional generic type arguments for the identifier.
Methods
Clone()
Returns a deep clone of the object.
Equals(object)
Determines whether the specified Object is equal to the current Object.
public override bool Equals(object obj)
| Parameter | Type | Description |
|---|---|---|
| obj | object | The |
Returns
- bool:
trueif the specifiedObjectis equal to the currentObject; otherwise,false.
GetHashCode()
Returns a hash code for this object.
public override int GetHashCode()
Returns
- int:
An integer value that specifies a hash value for this object.
ToString()
Returns a String that represents the current Object.