Click or drag to resize

SyntaxTriviaList Class



Represents a read-only list of SyntaxTrivia.
Inheritance Hierarchy
SystemValueType
  Microsoft.CodeAnalysisSyntaxTriviaList

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public sealed class SyntaxTriviaList : ValueType, 
	IEquatable, IReadOnlyList, IEnumerable, IEnumerable, IReadOnlyCollection

The SyntaxTriviaList type exposes the following members.

Properties
  NameDescription
Public propertyCount
Public propertyStatic memberEmpty
Public propertyFullSpan
The absolute span of the list elements in characters, including the leading and trailing trivia of the first and last elements.
Public propertyItem
Gets the trivia at the specified index.
Public propertySpan
The absolute span of the list elements in characters, not including the leading and trailing trivia of the first and last elements.
Top
Methods
  NameDescription
Public methodAdd
Creates a new SyntaxTriviaList with the specified trivia added to the end.
Public methodAddRange
Public methodAny
Does this list have any items.
Public methodStatic memberCreate
Public methodElementAt
Public methodEquals(Object)
Public methodEquals(SyntaxTriviaList)
Public methodFirst
Returns the first trivia in the list.
Public methodGetEnumerator
Public methodGetHashCode
Public methodIndexOf
Public methodInsert
Creates a new SyntaxTriviaList with the specified trivia inserted at the index.
Public methodInsertRange
Public methodLast
Returns the last trivia in the list.
Public methodRemove
Creates a new SyntaxTriviaList with the specified element removed.
Public methodRemoveAt
Creates a new SyntaxTriviaList with the element at the specified index removed.
Public methodReplace
Creates a new SyntaxTriviaList with the specified element replaced with new trivia.
Public methodReplaceRange
Public methodReverse
Returns a list which contains all elements of SyntaxTriviaList in reversed order.
Public methodToFullString
Public methodToString
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Public operatorStatic memberInequality
Top
Extension Methods
  NameDescription
Public Extension MethodAny(SyntaxKind)Overloaded.
Tests whether a list contains trivia of a particular kind.
(Defined by VisualBasicExtensions.)
Public Extension MethodAny(SyntaxKind)Overloaded.
True if the list has at least one trivia of the specified kind.
(Defined by CSharpExtensions.)
Public Extension MethodIndexOf(SyntaxKind)Overloaded.
Returns the index of the first trivia of a specified kind in the trivia list.
(Defined by VisualBasicExtensions.)
Public Extension MethodIndexOf(SyntaxKind)Overloaded.
Returns the index of the first trivia of a specified kind in the trivia list.
(Defined by CSharpExtensions.)
Public Extension MethodNormalizeWhitespace(String, Boolean)Overloaded.
Creates a new syntax trivia list with all whitespace and end of line trivia replaced with regularly formatted trivia.
(Defined by SyntaxExtensions.)
Public Extension MethodNormalizeWhitespace(String, String, Boolean)Overloaded.
Creates a new syntax trivia list with all whitespace and end of line trivia replaced with regularly formatted trivia.
(Defined by SyntaxExtensions.)
Public Extension MethodNormalizeWhitespace(String, String, Boolean, Boolean)Overloaded. (Defined by SyntaxExtensions.)
Top
See Also