70 references to Unit
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (70)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (39)
239public static SymbolNamesWithValueOption<Unit> GetNullCheckValidationMethodsOption( 244=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.NullCheckValidationMethods, rule, tree, compilation, static name => new SymbolNamesWithValueOption<Unit>.NameParts(name, Unit.Default), namePrefix: "M:"); 246public static SymbolNamesWithValueOption<Unit> GetAdditionalStringFormattingMethodsOption( 251=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.AdditionalStringFormattingMethods, rule, tree, compilation, static name => new SymbolNamesWithValueOption<Unit>.NameParts(name, Unit.Default), namePrefix: "M:"); 297static SymbolNamesWithValueOption<Unit> GetExcludedSymbolNamesWithValueOption( 303? options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.ExcludedSymbolNames, rule, tree, compilation, static name => new SymbolNamesWithValueOption<Unit>.NameParts(name, Unit.Default)) 304: SymbolNamesWithValueOption<Unit>.Empty; 306static SymbolNamesWithValueOption<Unit> GetExcludedTypeNamesWithDerivedTypesOption( 312? options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.ExcludedTypeNamesWithDerivedTypes, rule, tree, compilation, static name => new SymbolNamesWithValueOption<Unit>.NameParts(name, Unit.Default), namePrefix: "T:") 313: SymbolNamesWithValueOption<Unit>.Empty; 316public static SymbolNamesWithValueOption<Unit> GetDisallowedSymbolNamesWithValueOption( 323private static SymbolNamesWithValueOption<Unit> GetDisallowedSymbolNamesWithValueOption( 328=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.DisallowedSymbolNames, rule, tree, compilation, static name => new SymbolNamesWithValueOption<Unit>.NameParts(name, Unit.Default)); 425public static SymbolNamesWithValueOption<Unit> GetInheritanceExcludedSymbolNamesOption( 431=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.AdditionalInheritanceExcludedSymbolNames, rule, tree, compilation, static name => new SymbolNamesWithValueOption<Unit>.NameParts(name, Unit.Default), optionForcedValue: defaultForcedValue); 433public static SymbolNamesWithValueOption<Unit> GetAdditionalUseResultsMethodsOption( 438=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.AdditionalUseResultsMethods, rule, tree, compilation, static name => new SymbolNamesWithValueOption<Unit>.NameParts(name, Unit.Default), namePrefix: "M:"); 440public static SymbolNamesWithValueOption<Unit> GetEnumerationMethodsOption( 445=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.EnumerationMethods, rule, tree, compilation, static name => new SymbolNamesWithValueOption<Unit>.NameParts(name, Unit.Default), namePrefix: "M:"); 447public static SymbolNamesWithValueOption<Unit> GetLinqChainMethodsOption( 452=> options.GetSymbolNamesWithValueOption<Unit>(EditorConfigOptionNames.LinqChainMethods, rule, tree, compilation, static name => new SymbolNamesWithValueOption<Unit>.NameParts(name, Unit.Default), namePrefix: "M:");
src\RoslynAnalyzers\Utilities\Compiler\Options\Unit.cs (31)
21: IEquatable<Unit> 24/// Determines whether the specified <see cref="Unit"/> value is equal to the current <see cref="Unit"/>. Because <see cref="Unit"/> has a single value, this always returns <c>true</c>. 26/// <param name="other">An object to compare to the current <see cref="Unit"/> value.</param> 27/// <returns>Because <see cref="Unit"/> has a single value, this always returns <c>true</c>.</returns> 28public readonly bool Equals(Unit other) => true; 31/// Determines whether the specified System.Object is equal to the current <see cref="Unit"/>. 33/// <param name="obj">The System.Object to compare with the current <see cref="Unit"/>.</param> 34/// <returns><c>true</c> if the specified System.Object is a <see cref="Unit"/> value; otherwise, <c>false</c>.</returns> 35public override readonly bool Equals(object? obj) => obj is Unit; 38/// Returns the hash code for the current <see cref="Unit"/> value. 40/// <returns>A hash code for the current <see cref="Unit"/> value.</returns> 44/// Returns a string representation of the current <see cref="Unit"/> value. 46/// <returns>String representation of the current <see cref="Unit"/> value.</returns> 50/// Determines whether the two specified <see cref="Unit"/> values are equal. Because <see cref="Unit"/> has a single value, this always returns <c>true</c>. 52/// <param name="first">The first <see cref="Unit"/> value to compare.</param> 53/// <param name="second">The second <see cref="Unit"/> value to compare.</param> 54/// <returns>Because <see cref="Unit"/> has a single value, this always returns <c>true</c>.</returns> 58public static bool operator ==(Unit first, Unit second) => true; 61/// Determines whether the two specified <see cref="Unit"/> values are not equal. Because <see cref="Unit"/> has a single value, this always returns <c>false</c>. 63/// <param name="first">The first <see cref="Unit"/> value to compare.</param> 64/// <param name="second">The second <see cref="Unit"/> value to compare.</param> 65/// <returns>Because <see cref="Unit"/> has a single value, this always returns <c>false</c>.</returns> 69public static bool operator !=(Unit first, Unit second) => false; 72/// Gets the single <see cref="Unit"/> value. 74public static Unit Default => default;