Skip to main content

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

ConstructorSummary
IfStatementOrElseClause(ElseClauseSyntax)
IfStatementOrElseClause(IfStatementSyntax)

Properties

PropertySummary
FullSpanThe absolute span of this node in characters, including its leading and trailing trivia.
IsElseDetermines whether this IfStatementOrElseClause is wrapping an else clause.
IsIfDetermines whether this IfStatementOrElseClause is wrapping an if statement.
KindGets an underlying node kind.
ParentThe node that contains the underlying node in its SyntaxNode.ChildNodes collection.
SpanThe absolute span of this node in characters, not including its leading and trailing trivia.
StatementGets IfStatementSyntax.Statement or ElseClauseSyntax.Statement.

Methods

MethodSummary
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)

Operators

OperatorSummary
Equality(IfStatementOrElseClause, IfStatementOrElseClause)
Implicit(ElseClauseSyntax to IfStatementOrElseClause)
Implicit(IfStatementOrElseClause to ElseClauseSyntax)
Implicit(IfStatementOrElseClause to IfStatementSyntax)
Implicit(IfStatementSyntax to IfStatementOrElseClause)
Inequality(IfStatementOrElseClause, IfStatementOrElseClause)