Skip to main content

NameGenerator.IsUniqueName Method

Containing Type: NameGenerator

Assembly: Roslynator.Core.dll

Overloads​

MethodSummary
IsUniqueName(String, IEnumerable<String>, Boolean)Returns true if the name is not contained in the specified list.
IsUniqueName(String, ImmutableArray<ISymbol>, Boolean)Returns true if the name is not contained in the specified list. ISymbol.Name is used to compare names.

IsUniqueName(String, IEnumerable<String>, Boolean)​

Returns true if the name is not contained in the specified list.

public static bool IsUniqueName(string name, System.Collections.Generic.IEnumerable<string> reservedNames, bool isCaseSensitive = true)

Parameters​

name   String

reservedNames   IEnumerable<String>

isCaseSensitive   Boolean

Returns​

Boolean

IsUniqueName(String, ImmutableArray<ISymbol>, Boolean)​

Returns true if the name is not contained in the specified list. ISymbol.Name is used to compare names.

public static bool IsUniqueName(string name, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ISymbol> symbols, bool isCaseSensitive = true)

Parameters​

name   String

symbols   ImmutableArray<ISymbol>

isCaseSensitive   Boolean

Returns​

Boolean