Struct ChildSyntaxList
A list containing all children of a syntax node.
Inherited Members
Namespace: Loretta.CodeAnalysis
Assembly: Loretta.CodeAnalysis.dll
Syntax
public readonly struct ChildSyntaxList
Properties
| Improve this Doc View SourceCount
Gets the number of children contained in the ChildSyntaxList.
Declaration
public readonly int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Int32]
Gets the child at the specified index.
Declaration
public readonly SyntaxNodeOrToken this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the child to get. |
Property Value
Type | Description |
---|---|
SyntaxNodeOrToken |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|
Methods
| Improve this Doc View SourceAny()
Checks whether this list contains any elements.
Declaration
public readonly bool Any()
Returns
Type | Description |
---|---|
System.Boolean |
Equals(ChildSyntaxList)
Determines whether the specified ChildSyntaxList structure is equal to the current instance.
Declaration
public readonly bool Equals(ChildSyntaxList other)
Parameters
Type | Name | Description |
---|---|---|
ChildSyntaxList | other | The ChildSyntaxList structure to be compared with the current instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified ChildSyntaxList structure is equal to the current instance; otherwise, false. |
Equals(Object)
Determines whether the specified object is equal to the current instance.
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to be compared with the current instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified object is a ChildSyntaxList structure and is equal to the current instance; otherwise, false. |
Overrides
First()
Returns the first child in the list.
Declaration
public readonly SyntaxNodeOrToken First()
Returns
Type | Description |
---|---|
SyntaxNodeOrToken | The first child in the list. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The list is empty. |
GetEnumerator()
Returns an enumerator that iterates through the ChildSyntaxList.
Declaration
public readonly ChildSyntaxList.Enumerator GetEnumerator()
Returns
Type | Description |
---|---|
ChildSyntaxList.Enumerator | A ChildSyntaxList.Enumerator for the ChildSyntaxList. |
GetHashCode()
Returns the hash code for the current instance.
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer hash code. |
Overrides
Last()
Returns the last child in the list.
Declaration
public readonly SyntaxNodeOrToken Last()
Returns
Type | Description |
---|---|
SyntaxNodeOrToken | The last child in the list. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The list is empty. |
Reverse()
Returns a list which contains all children of ChildSyntaxList in reversed order.
Declaration
public readonly ChildSyntaxList.Reversed Reverse()
Returns
Type | Description |
---|---|
ChildSyntaxList.Reversed | ChildSyntaxList.Reversed which contains all children of ChildSyntaxList in reversed order |
Operators
| Improve this Doc View SourceEquality(ChildSyntaxList, ChildSyntaxList)
Indicates whether two ChildSyntaxList structures are equal.
Declaration
public static bool operator ==(ChildSyntaxList list1, ChildSyntaxList list2)
Parameters
Type | Name | Description |
---|---|---|
ChildSyntaxList | list1 | The ChildSyntaxList structure on the left side of the equality operator. |
ChildSyntaxList | list2 | The ChildSyntaxList structure on the right side of the equality operator. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
Inequality(ChildSyntaxList, ChildSyntaxList)
Indicates whether two ChildSyntaxList structures are unequal.
Declaration
public static bool operator !=(ChildSyntaxList list1, ChildSyntaxList list2)
Parameters
Type | Name | Description |
---|---|---|
ChildSyntaxList | list1 | The ChildSyntaxList structure on the left side of the inequality operator. |
ChildSyntaxList | list2 | The ChildSyntaxList structure on the right side of the inequality operator. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Declaration
readonly IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |