2 instantiations of SymbolNamesWithValueOption
Roslyn.Diagnostics.Analyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
28
public static readonly SymbolNamesWithValueOption<TValue> Empty =
new
();
136
return new
SymbolNamesWithValueOption
<TValue>(namesBuilder.ToImmutableDictionaryAndFree(),
52 references to SymbolNamesWithValueOption
Roslyn.Diagnostics.Analyzers (52)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (45)
237
public static
SymbolNamesWithValueOption
<Unit> GetNullCheckValidationMethodsOption(
242
=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.NullCheckValidationMethods, rule, tree, compilation, static name => new
SymbolNamesWithValueOption
<Unit>.NameParts(name, Unit.Default), namePrefix: "M:");
244
public static
SymbolNamesWithValueOption
<Unit> GetAdditionalStringFormattingMethodsOption(
249
=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.AdditionalStringFormattingMethods, rule, tree, compilation, static name => new
SymbolNamesWithValueOption
<Unit>.NameParts(name, Unit.Default), namePrefix: "M:");
265
var
excludedSymbols = GetExcludedSymbolNamesWithValueOption(options, rule, containingContextSymbol, compilation);
266
var
excludedTypeNamesWithDerivedTypes = GetExcludedTypeNamesWithDerivedTypesOption(options, rule, containingContextSymbol, compilation);
295
static
SymbolNamesWithValueOption
<Unit> GetExcludedSymbolNamesWithValueOption(
301
? options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.ExcludedSymbolNames, rule, tree, compilation, static name => new
SymbolNamesWithValueOption
<Unit>.NameParts(name, Unit.Default))
302
:
SymbolNamesWithValueOption
<Unit>.Empty;
304
static
SymbolNamesWithValueOption
<Unit> GetExcludedTypeNamesWithDerivedTypesOption(
310
? options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.ExcludedTypeNamesWithDerivedTypes, rule, tree, compilation, static name => new
SymbolNamesWithValueOption
<Unit>.NameParts(name, Unit.Default), namePrefix: "T:")
311
:
SymbolNamesWithValueOption
<Unit>.Empty;
314
public static
SymbolNamesWithValueOption
<Unit> GetDisallowedSymbolNamesWithValueOption(
321
private static
SymbolNamesWithValueOption
<Unit> GetDisallowedSymbolNamesWithValueOption(
326
=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.DisallowedSymbolNames, rule, tree, compilation, static name => new
SymbolNamesWithValueOption
<Unit>.NameParts(name, Unit.Default));
328
public static
SymbolNamesWithValueOption
<string?> GetAdditionalRequiredSuffixesOption(
335
private static
SymbolNamesWithValueOption
<string?> GetAdditionalRequiredSuffixesOption(
343
static
SymbolNamesWithValueOption
<string?>.NameParts GetParts(string name)
350
return new
SymbolNamesWithValueOption
<string?>.NameParts(name, null);
365
return new
SymbolNamesWithValueOption
<string?>.NameParts(split[0], trimmedSuffix);
370
return new
SymbolNamesWithValueOption
<string?>.NameParts(split[0], string.Empty);
373
return new
SymbolNamesWithValueOption
<string?>.NameParts(split[0], trimmedSuffix);
377
public static
SymbolNamesWithValueOption
<INamedTypeSymbol?> GetAdditionalRequiredGenericInterfaces(
384
private static
SymbolNamesWithValueOption
<INamedTypeSymbol?> GetAdditionalRequiredGenericInterfaces(
392
static
SymbolNamesWithValueOption
<INamedTypeSymbol?>.NameParts GetParts(string name, Compilation compilation)
399
return new
SymbolNamesWithValueOption
<INamedTypeSymbol?>.NameParts(name, null);
416
return new
SymbolNamesWithValueOption
<INamedTypeSymbol?>.NameParts(split[0], null);
419
return new
SymbolNamesWithValueOption
<INamedTypeSymbol?>.NameParts(split[0], namedType);
423
public static
SymbolNamesWithValueOption
<Unit> GetInheritanceExcludedSymbolNamesOption(
429
=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.AdditionalInheritanceExcludedSymbolNames, rule, tree, compilation, static name => new
SymbolNamesWithValueOption
<Unit>.NameParts(name, Unit.Default), optionForcedValue: defaultForcedValue);
431
public static
SymbolNamesWithValueOption
<Unit> GetAdditionalUseResultsMethodsOption(
436
=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.AdditionalUseResultsMethods, rule, tree, compilation, static name => new
SymbolNamesWithValueOption
<Unit>.NameParts(name, Unit.Default), namePrefix: "M:");
438
public static
SymbolNamesWithValueOption
<Unit> GetEnumerationMethodsOption(
443
=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.EnumerationMethods, rule, tree, compilation, static name => new
SymbolNamesWithValueOption
<Unit>.NameParts(name, Unit.Default), namePrefix: "M:");
445
public static
SymbolNamesWithValueOption
<Unit> GetLinqChainMethodsOption(
450
=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.LinqChainMethods, rule, tree, compilation, static name => new
SymbolNamesWithValueOption
<Unit>.NameParts(name, Unit.Default), namePrefix: "M:");
452
private static
SymbolNamesWithValueOption
<TValue> GetSymbolNamesWithValueOption<TValue>(
458
Func<string,
SymbolNamesWithValueOption
<TValue>.NameParts> getTypeAndSuffixFunc,
473
static bool TryParse(string s, (Compilation compilation, Func<string,
SymbolNamesWithValueOption
<TValue>.NameParts> getTypeAndSuffixFunc, string? namePrefix, string? optionForcedValue) arg, out
SymbolNamesWithValueOption
<TValue> option)
485
option =
SymbolNamesWithValueOption
<TValue>.Empty;
490
option =
SymbolNamesWithValueOption
<TValue>.Create(names, arg.compilation, arg.namePrefix, arg.getTypeAndSuffixFunc);
494
SymbolNamesWithValueOption
<TValue> GetDefaultValue()
512
return TryParse(optionValue, (compilation, getTypeAndSuffixFunc, namePrefix, optionForcedValue), out
var
option)
514
:
SymbolNamesWithValueOption
<TValue>.Empty;
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (7)
23
: IEquatable<
SymbolNamesWithValueOption
<TValue>?>
28
public static readonly
SymbolNamesWithValueOption
<TValue> Empty = new();
80
public static
SymbolNamesWithValueOption
<TValue> Create(ImmutableArray<string> symbolNames, Compilation compilation, string? optionalPrefix,
252
public override bool Equals(object? obj) => Equals(obj as
SymbolNamesWithValueOption
<TValue>);
254
public bool Equals(
SymbolNamesWithValueOption
<TValue>? other)
365
private readonly
SymbolNamesWithValueOption
<TValue> _symbolNamesWithValueOption;
367
internal TestAccessor(
SymbolNamesWithValueOption
<TValue> symbolNamesWithValueOption)