31 references to Unit
Microsoft.CodeAnalysis.PublicApiAnalyzers (31)
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>
28
public 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>
35
public 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>
58
public 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>
69
public static bool operator !=(
Unit
first,
Unit
second) => false;
72
/// Gets the single <see cref="
Unit
"/> value.
74
public static
Unit
Default => default;