Skip to main content

ModifierList.GetInsertIndex Method

Containing Type: ModifierList

Assembly: Roslynator.CSharp.dll

Overloads​

MethodSummary
GetInsertIndex(SyntaxTokenList, SyntaxKind, IComparer<SyntaxKind>)Returns an index a token with the specified kind should be inserted at.
GetInsertIndex(SyntaxTokenList, SyntaxToken, IComparer<SyntaxToken>)Returns an index the specified token should be inserted at.

GetInsertIndex(SyntaxTokenList, SyntaxKind, IComparer<SyntaxKind>)​

Returns an index a token with the specified kind should be inserted at.

public static int GetInsertIndex(Microsoft.CodeAnalysis.SyntaxTokenList tokens, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, System.Collections.Generic.IComparer<Microsoft.CodeAnalysis.CSharp.SyntaxKind>? comparer = null)

Parameters​

tokens   SyntaxTokenList

kind   SyntaxKind

comparer   IComparer<SyntaxKind>

Returns​

Int32

GetInsertIndex(SyntaxTokenList, SyntaxToken, IComparer<SyntaxToken>)​

Returns an index the specified token should be inserted at.

public static int GetInsertIndex(Microsoft.CodeAnalysis.SyntaxTokenList tokens, Microsoft.CodeAnalysis.SyntaxToken token, System.Collections.Generic.IComparer<Microsoft.CodeAnalysis.SyntaxToken>? comparer = null)

Parameters​

tokens   SyntaxTokenList

token   SyntaxToken

comparer   IComparer<SyntaxToken>

Returns​

Int32