53 references to PredefinedOperator
Microsoft.CodeAnalysis.Workspaces (53)
FindSymbols\FindReferences\Finders\OperatorSymbolReferenceFinder.cs (6)
30
var
op = symbol.GetPredefinedOperator();
38
PredefinedOperator
op,
43
if (op ==
PredefinedOperator
.None)
58
var
op = symbol.GetPredefinedOperator();
73
PredefinedOperator
op,
76
return syntaxFacts.TryGetPredefinedOperator(token, out
var
actualOperator) && actualOperator == op;
FindSymbols\SyntaxTree\SyntaxTreeIndex.ContextInfo.cs (1)
113
public bool ContainsPredefinedOperator(
PredefinedOperator
op)
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (2)
78
var predefinedOperators = (int)
PredefinedOperator
.None;
135
if (syntaxFacts.TryGetPredefinedOperator(token, out
var
predefinedOperator))
FindSymbols\SyntaxTree\SyntaxTreeIndex_Forwarders.cs (1)
19
public bool ContainsPredefinedOperator(
PredefinedOperator
op) => _contextInfo.ContainsPredefinedOperator(op);
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);
187
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) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (5)
317
syntaxFacts.TryGetPredefinedOperator(operatorToken, out
var
predefinedOperator);
320
PredefinedOperator
.LessThan => generatorInternal.GreaterThanEqualsRelationalPattern(expression),
321
PredefinedOperator
.LessThanOrEqual => generatorInternal.GreaterThanRelationalPattern(expression),
322
PredefinedOperator
.GreaterThan => generatorInternal.LessThanEqualsRelationalPattern(expression),
323
PredefinedOperator
.GreaterThanOrEqual => generatorInternal.LessThanRelationalPattern(expression),