53 references to PredefinedOperator
Microsoft.CodeAnalysis.Workspaces (53)
FindSymbols\FindReferences\Finders\OperatorSymbolReferenceFinder.cs (6)
30var op = symbol.GetPredefinedOperator(); 38PredefinedOperator op, 43if (op == PredefinedOperator.None) 58var op = symbol.GetPredefinedOperator(); 73PredefinedOperator op, 76return syntaxFacts.TryGetPredefinedOperator(token, out var actualOperator) && actualOperator == op;
FindSymbols\SyntaxTree\SyntaxTreeIndex.ContextInfo.cs (1)
121public bool ContainsPredefinedOperator(PredefinedOperator op)
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (2)
80var predefinedOperators = (int)PredefinedOperator.None; 138if (syntaxFacts.TryGetPredefinedOperator(token, out var predefinedOperator))
FindSymbols\SyntaxTree\SyntaxTreeIndex_Forwarders.cs (1)
19public bool ContainsPredefinedOperator(PredefinedOperator op) => _contextInfo.ContainsPredefinedOperator(op);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IMethodSymbolExtensions.cs (34)
48public static bool TryGetPredefinedComparisonOperator(this IMethodSymbol symbol, out PredefinedOperator op) 55case PredefinedOperator.Equality: 56case PredefinedOperator.Inequality: 57case PredefinedOperator.GreaterThanOrEqual: 58case PredefinedOperator.LessThanOrEqual: 59case PredefinedOperator.GreaterThan: 60case PredefinedOperator.LessThan: 66op = PredefinedOperator.None; 72public static PredefinedOperator GetPredefinedOperator(this IMethodSymbol symbol) 75WellKnownMemberNames.AdditionOperatorName or WellKnownMemberNames.CheckedAdditionOperatorName or WellKnownMemberNames.UnaryPlusOperatorName => PredefinedOperator.Addition, 76WellKnownMemberNames.BitwiseAndOperatorName => PredefinedOperator.BitwiseAnd, 77WellKnownMemberNames.BitwiseOrOperatorName => PredefinedOperator.BitwiseOr, 78WellKnownMemberNames.ConcatenateOperatorName => PredefinedOperator.Concatenate, 79WellKnownMemberNames.DecrementOperatorName or WellKnownMemberNames.CheckedDecrementOperatorName => PredefinedOperator.Decrement, 80WellKnownMemberNames.DivisionOperatorName or WellKnownMemberNames.CheckedDivisionOperatorName => PredefinedOperator.Division, 81WellKnownMemberNames.EqualityOperatorName => PredefinedOperator.Equality, 82WellKnownMemberNames.ExclusiveOrOperatorName => PredefinedOperator.ExclusiveOr, 83WellKnownMemberNames.ExponentOperatorName => PredefinedOperator.Exponent, 84WellKnownMemberNames.GreaterThanOperatorName => PredefinedOperator.GreaterThan, 85WellKnownMemberNames.GreaterThanOrEqualOperatorName => PredefinedOperator.GreaterThanOrEqual, 86WellKnownMemberNames.IncrementOperatorName or WellKnownMemberNames.CheckedIncrementOperatorName => PredefinedOperator.Increment, 87WellKnownMemberNames.InequalityOperatorName => PredefinedOperator.Inequality, 88WellKnownMemberNames.IntegerDivisionOperatorName => PredefinedOperator.IntegerDivision, 89WellKnownMemberNames.LeftShiftOperatorName => PredefinedOperator.LeftShift, 90WellKnownMemberNames.LessThanOperatorName => PredefinedOperator.LessThan, 91WellKnownMemberNames.LessThanOrEqualOperatorName => PredefinedOperator.LessThanOrEqual, 92WellKnownMemberNames.LikeOperatorName => PredefinedOperator.Like, 93WellKnownMemberNames.LogicalNotOperatorName or WellKnownMemberNames.OnesComplementOperatorName => PredefinedOperator.Complement, 94WellKnownMemberNames.ModulusOperatorName => PredefinedOperator.Modulus, 95WellKnownMemberNames.MultiplyOperatorName or WellKnownMemberNames.CheckedMultiplyOperatorName => PredefinedOperator.Multiplication, 96WellKnownMemberNames.RightShiftOperatorName => PredefinedOperator.RightShift, 97WellKnownMemberNames.UnsignedRightShiftOperatorName => PredefinedOperator.UnsignedRightShift, 98WellKnownMemberNames.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)
113bool IsPredefinedOperator(SyntaxToken token, PredefinedOperator op); 192bool TryGetPredefinedOperator(SyntaxToken token, out PredefinedOperator op);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (2)
412if (methodSymbol.TryGetPredefinedComparisonOperator(out var originalOp) && 413newMethodSymbol.TryGetPredefinedComparisonOperator(out var newOp) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (5)
317syntaxFacts.TryGetPredefinedOperator(operatorToken, out var predefinedOperator); 320PredefinedOperator.LessThan => generatorInternal.GreaterThanEqualsRelationalPattern(expression), 321PredefinedOperator.LessThanOrEqual => generatorInternal.GreaterThanRelationalPattern(expression), 322PredefinedOperator.GreaterThan => generatorInternal.LessThanEqualsRelationalPattern(expression), 323PredefinedOperator.GreaterThanOrEqual => generatorInternal.LessThanRelationalPattern(expression),