Skip to main content

UsingDirectiveListInfo Struct

Namespace: Roslynator.CSharp.Syntax

Assembly: Roslynator.CSharp.dll

Provides information about a list of using directives.

public readonly struct UsingDirectiveListInfo : System.Collections.Generic.IReadOnlyList<Microsoft.CodeAnalysis.CSharp.Syntax.UsingDirectiveSyntax>

Inheritance

Object ValueType UsingDirectiveListInfo

Implements

Indexers

IndexerSummary
Item[Int32]Gets the using directive at the specified index in the list. (Implements IReadOnlyList<UsingDirectiveSyntax>.Item)

Properties

PropertySummary
CountA number of usings in the list.
ParentThe declaration that contains the usings.
SuccessDetermines whether this struct was initialized with an actual syntax.
UsingsA list of usings.

Methods

MethodSummary
Add(UsingDirectiveSyntax)Creates a new UsingDirectiveListInfo with the specified using directive added at the end.
AddRange(IEnumerable<UsingDirectiveSyntax>)Creates a new UsingDirectiveListInfo with the specified usings added at the end.
Any()True if the list has at least one using directive.
Equals(Object)(Inherited from ValueType)
First()The first using directive in the list.
FirstOrDefault()The first using directive in the list or null if the list is empty.
GetEnumerator()Gets the enumerator for the list of usings.
GetHashCode()(Inherited from ValueType)
GetType()(Inherited from Object)
IndexOf(Func<UsingDirectiveSyntax, Boolean>)Searches for an using directive that matches the predicate and returns zero-based index of the first occurrence in the list.
IndexOf(UsingDirectiveSyntax)The index of the using directive in the list.
Insert(Int32, UsingDirectiveSyntax)Creates a new UsingDirectiveListInfo with the specified using directive inserted at the index.
InsertRange(Int32, IEnumerable<UsingDirectiveSyntax>)Creates a new UsingDirectiveListInfo with the specified usings inserted at the index.
Last()The last using directive in the list.
LastIndexOf(Func<UsingDirectiveSyntax, Boolean>)Searches for an using directive that matches the predicate and returns zero-based index of the last occurrence in the list.
LastIndexOf(UsingDirectiveSyntax)Searches for an using directive and returns zero-based index of the last occurrence in the list.
LastOrDefault()The last using directive in the list or null if the list is empty.
MemberwiseClone()(Inherited from Object)
Remove(UsingDirectiveSyntax)Creates a new UsingDirectiveListInfo with the specified using directive removed.
RemoveAt(Int32)Creates a new UsingDirectiveListInfo with the using directive at the specified index removed.
RemoveNode(SyntaxNode, SyntaxRemoveOptions)Creates a new UsingDirectiveListInfo with the specified node removed.
Replace(UsingDirectiveSyntax, UsingDirectiveSyntax)Creates a new UsingDirectiveListInfo with the specified using directive replaced with the new using directive.
ReplaceAt(Int32, UsingDirectiveSyntax)Creates a new UsingDirectiveListInfo with the using directive at the specified index replaced with a new using directive.
ReplaceNode(SyntaxNode, SyntaxNode)Creates a new UsingDirectiveListInfo with the specified old node replaced with a new node.
ReplaceRange(UsingDirectiveSyntax, IEnumerable<UsingDirectiveSyntax>)Creates a new UsingDirectiveListInfo with the specified using directive replaced with new usings.
ToString()(Inherited from ValueType)
WithUsings(IEnumerable<UsingDirectiveSyntax>)Creates a new UsingDirectiveListInfo with the usings updated.
WithUsings(SyntaxList<UsingDirectiveSyntax>)Creates a new UsingDirectiveListInfo with the usings updated.

Explicit Interface Implementations

MemberSummary
IEnumerable.GetEnumerator()
IEnumerable<UsingDirectiveSyntax>.GetEnumerator()