38 references to PredefinedOperator
Microsoft.CodeAnalysis.CodeStyle (38)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IMethodSymbolExtensions.cs (34)
48
public static bool TryGetPredefinedComparisonOperator(this IMethodSymbol symbol, out
PredefinedOperator
op)
55
case
PredefinedOperator
.Equality:
56
case
PredefinedOperator
.Inequality:
57
case
PredefinedOperator
.GreaterThanOrEqual:
58
case
PredefinedOperator
.LessThanOrEqual:
59
case
PredefinedOperator
.GreaterThan:
60
case
PredefinedOperator
.LessThan:
66
op =
PredefinedOperator
.None;
72
public static
PredefinedOperator
GetPredefinedOperator(this IMethodSymbol symbol)
75
WellKnownMemberNames.AdditionOperatorName or WellKnownMemberNames.CheckedAdditionOperatorName or WellKnownMemberNames.UnaryPlusOperatorName =>
PredefinedOperator
.Addition,
76
WellKnownMemberNames.BitwiseAndOperatorName =>
PredefinedOperator
.BitwiseAnd,
77
WellKnownMemberNames.BitwiseOrOperatorName =>
PredefinedOperator
.BitwiseOr,
78
WellKnownMemberNames.ConcatenateOperatorName =>
PredefinedOperator
.Concatenate,
79
WellKnownMemberNames.DecrementOperatorName or WellKnownMemberNames.CheckedDecrementOperatorName =>
PredefinedOperator
.Decrement,
80
WellKnownMemberNames.DivisionOperatorName or WellKnownMemberNames.CheckedDivisionOperatorName =>
PredefinedOperator
.Division,
81
WellKnownMemberNames.EqualityOperatorName =>
PredefinedOperator
.Equality,
82
WellKnownMemberNames.ExclusiveOrOperatorName =>
PredefinedOperator
.ExclusiveOr,
83
WellKnownMemberNames.ExponentOperatorName =>
PredefinedOperator
.Exponent,
84
WellKnownMemberNames.GreaterThanOperatorName =>
PredefinedOperator
.GreaterThan,
85
WellKnownMemberNames.GreaterThanOrEqualOperatorName =>
PredefinedOperator
.GreaterThanOrEqual,
86
WellKnownMemberNames.IncrementOperatorName or WellKnownMemberNames.CheckedIncrementOperatorName =>
PredefinedOperator
.Increment,
87
WellKnownMemberNames.InequalityOperatorName =>
PredefinedOperator
.Inequality,
88
WellKnownMemberNames.IntegerDivisionOperatorName =>
PredefinedOperator
.IntegerDivision,
89
WellKnownMemberNames.LeftShiftOperatorName =>
PredefinedOperator
.LeftShift,
90
WellKnownMemberNames.LessThanOperatorName =>
PredefinedOperator
.LessThan,
91
WellKnownMemberNames.LessThanOrEqualOperatorName =>
PredefinedOperator
.LessThanOrEqual,
92
WellKnownMemberNames.LikeOperatorName =>
PredefinedOperator
.Like,
93
WellKnownMemberNames.LogicalNotOperatorName or WellKnownMemberNames.OnesComplementOperatorName =>
PredefinedOperator
.Complement,
94
WellKnownMemberNames.ModulusOperatorName =>
PredefinedOperator
.Modulus,
95
WellKnownMemberNames.MultiplyOperatorName or WellKnownMemberNames.CheckedMultiplyOperatorName =>
PredefinedOperator
.Multiplication,
96
WellKnownMemberNames.RightShiftOperatorName =>
PredefinedOperator
.RightShift,
97
WellKnownMemberNames.UnsignedRightShiftOperatorName =>
PredefinedOperator
.UnsignedRightShift,
98
WellKnownMemberNames.SubtractionOperatorName or WellKnownMemberNames.CheckedSubtractionOperatorName or WellKnownMemberNames.UnaryNegationOperatorName or WellKnownMemberNames.CheckedUnaryNegationOperatorName =>
PredefinedOperator
.Subtraction,
99
_ =>
PredefinedOperator
.None,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFacts.cs (2)
111
bool IsPredefinedOperator(SyntaxToken token,
PredefinedOperator
op);
188
bool TryGetPredefinedOperator(SyntaxToken token, out
PredefinedOperator
op);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (2)
412
if (methodSymbol.TryGetPredefinedComparisonOperator(out
var
originalOp) &&
413
newMethodSymbol.TryGetPredefinedComparisonOperator(out
var
newOp) &&