IfStatementOrElseClause Struct
Namespace: Roslynator.CSharp
Assembly: Roslynator.CSharp.dll
A wrapper for either an IfStatementSyntax or an ElseClauseSyntax.
public readonly struct IfStatementOrElseClause : IEquatable<Roslynator.CSharp.IfStatementOrElseClause>
Inheritance
Object → ValueType → IfStatementOrElseClause
Implements
Constructors
| Constructor | Summary |
|---|---|
| IfStatementOrElseClause(ElseClauseSyntax) | |
| IfStatementOrElseClause(IfStatementSyntax) |
Properties
| Property | Summary |
|---|---|
| FullSpan | The absolute span of this node in characters, including its leading and trailing trivia. |
| IsElse | Determines whether this IfStatementOrElseClause is wrapping an else clause. |
| IsIf | Determines whether this IfStatementOrElseClause is wrapping an if statement. |
| Kind | Gets an underlying node kind. |
| Parent | The node that contains the underlying node in its SyntaxNode.ChildNodes collection. |
| Span | The absolute span of this node in characters, not including its leading and trailing trivia. |
| Statement | Gets IfStatementSyntax.Statement or ElseClauseSyntax.Statement. |
Methods
| Method | Summary |
|---|---|
| AsElse() | Returns the underlying else clause if this ElseClauseSyntax is wrapping else clause. |
| AsIf() | Returns the underlying if statement if this IfStatementOrElseClause is wrapping if statement. |
| Equals(IfStatementOrElseClause) | Determines whether this instance is equal to another object of the same type. (Implements IEquatable<IfStatementOrElseClause>.Equals) |
| Equals(Object) | Determines whether this instance and a specified object are equal. (Overrides ValueType.Equals) |
| GetHashCode() | Returns the hash code for this instance. (Overrides ValueType.GetHashCode) |
| GetType() | (Inherited from Object) |
| MemberwiseClone() | (Inherited from Object) |
| ToString() | Returns the string representation of the underlying node, not including its leading and trailing trivia. (Overrides ValueType.ToString) |