38 references to PredefinedOperator
Microsoft.CodeAnalysis.CodeStyle (38)
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)
111bool IsPredefinedOperator(SyntaxToken token, PredefinedOperator op); 188bool 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) &&