111 references to OperatorKind
Microsoft.CodeAnalysis.CSharp.Workspaces (30)
CodeGeneration\CSharpSyntaxGenerator.cs (30)
267
public override SyntaxNode OperatorDeclaration(
OperatorKind
kind, IEnumerable<SyntaxNode>? parameters = null, SyntaxNode? returnType = null, Accessibility accessibility = Accessibility.NotApplicable, DeclarationModifiers modifiers = default, IEnumerable<SyntaxNode>? statements = null)
269
return OperatorDeclaration(GetOperatorName(kind), isImplicitConversion: kind ==
OperatorKind
.ImplicitConversion, parameters, returnType, accessibility, modifiers, statements);
317
private static string GetOperatorName(
OperatorKind
kind)
320
OperatorKind
.ImplicitConversion => WellKnownMemberNames.ImplicitConversionName,
321
OperatorKind
.ExplicitConversion => WellKnownMemberNames.ExplicitConversionName,
322
OperatorKind
.Addition => WellKnownMemberNames.AdditionOperatorName,
323
OperatorKind
.BitwiseAnd => WellKnownMemberNames.BitwiseAndOperatorName,
324
OperatorKind
.BitwiseOr => WellKnownMemberNames.BitwiseOrOperatorName,
325
OperatorKind
.Decrement => WellKnownMemberNames.DecrementOperatorName,
326
OperatorKind
.Division => WellKnownMemberNames.DivisionOperatorName,
327
OperatorKind
.Equality => WellKnownMemberNames.EqualityOperatorName,
328
OperatorKind
.ExclusiveOr => WellKnownMemberNames.ExclusiveOrOperatorName,
329
OperatorKind
.False => WellKnownMemberNames.FalseOperatorName,
330
OperatorKind
.GreaterThan => WellKnownMemberNames.GreaterThanOperatorName,
331
OperatorKind
.GreaterThanOrEqual => WellKnownMemberNames.GreaterThanOrEqualOperatorName,
332
OperatorKind
.Increment => WellKnownMemberNames.IncrementOperatorName,
333
OperatorKind
.Inequality => WellKnownMemberNames.InequalityOperatorName,
334
OperatorKind
.LeftShift => WellKnownMemberNames.LeftShiftOperatorName,
335
OperatorKind
.LessThan => WellKnownMemberNames.LessThanOperatorName,
336
OperatorKind
.LessThanOrEqual => WellKnownMemberNames.LessThanOrEqualOperatorName,
337
OperatorKind
.LogicalNot => WellKnownMemberNames.LogicalNotOperatorName,
338
OperatorKind
.Modulus => WellKnownMemberNames.ModulusOperatorName,
339
OperatorKind
.Multiply => WellKnownMemberNames.MultiplyOperatorName,
340
OperatorKind
.OnesComplement => WellKnownMemberNames.OnesComplementOperatorName,
341
OperatorKind
.RightShift => WellKnownMemberNames.RightShiftOperatorName,
342
OperatorKind
.UnsignedRightShift => WellKnownMemberNames.UnsignedRightShiftOperatorName,
343
OperatorKind
.Subtraction => WellKnownMemberNames.SubtractionOperatorName,
344
OperatorKind
.True => WellKnownMemberNames.TrueOperatorName,
345
OperatorKind
.UnaryNegation => WellKnownMemberNames.UnaryNegationOperatorName,
346
OperatorKind
.UnaryPlus => WellKnownMemberNames.UnaryPlusOperatorName,
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (31)
CodeGeneration\SyntaxGeneratorTests.cs (31)
861
Generator.OperatorDeclaration(
OperatorKind
.Addition, parameters, returnType),
865
Generator.OperatorDeclaration(
OperatorKind
.BitwiseAnd, parameters, returnType),
869
Generator.OperatorDeclaration(
OperatorKind
.BitwiseOr, parameters, returnType),
873
Generator.OperatorDeclaration(
OperatorKind
.Decrement, parameters, returnType),
877
Generator.OperatorDeclaration(
OperatorKind
.Division, parameters, returnType),
881
Generator.OperatorDeclaration(
OperatorKind
.Equality, parameters, returnType),
885
Generator.OperatorDeclaration(
OperatorKind
.ExclusiveOr, parameters, returnType),
889
Generator.OperatorDeclaration(
OperatorKind
.False, parameters, returnType),
893
Generator.OperatorDeclaration(
OperatorKind
.GreaterThan, parameters, returnType),
897
Generator.OperatorDeclaration(
OperatorKind
.GreaterThanOrEqual, parameters, returnType),
901
Generator.OperatorDeclaration(
OperatorKind
.Increment, parameters, returnType),
905
Generator.OperatorDeclaration(
OperatorKind
.Inequality, parameters, returnType),
909
Generator.OperatorDeclaration(
OperatorKind
.LeftShift, parameters, returnType),
913
Generator.OperatorDeclaration(
OperatorKind
.LessThan, parameters, returnType),
917
Generator.OperatorDeclaration(
OperatorKind
.LessThanOrEqual, parameters, returnType),
921
Generator.OperatorDeclaration(
OperatorKind
.LogicalNot, parameters, returnType),
925
Generator.OperatorDeclaration(
OperatorKind
.Modulus, parameters, returnType),
929
Generator.OperatorDeclaration(
OperatorKind
.Multiply, parameters, returnType),
933
Generator.OperatorDeclaration(
OperatorKind
.OnesComplement, parameters, returnType),
937
Generator.OperatorDeclaration(
OperatorKind
.RightShift, parameters, returnType),
941
Generator.OperatorDeclaration(
OperatorKind
.UnsignedRightShift, parameters, returnType),
945
Generator.OperatorDeclaration(
OperatorKind
.Subtraction, parameters, returnType),
949
Generator.OperatorDeclaration(
OperatorKind
.True, parameters, returnType),
953
Generator.OperatorDeclaration(
OperatorKind
.UnaryNegation, parameters, returnType),
957
Generator.OperatorDeclaration(
OperatorKind
.UnaryPlus, parameters, returnType),
963
Generator.OperatorDeclaration(
OperatorKind
.ImplicitConversion, parameters, returnType),
967
Generator.OperatorDeclaration(
OperatorKind
.ExplicitConversion, parameters, returnType),
2752
AssertMemberNamesEqual("", Generator.AddMembers(Generator.InterfaceDeclaration("i"), [Generator.OperatorDeclaration(
OperatorKind
.Addition)]));
2769
[Generator.OperatorDeclaration(
OperatorKind
.Addition)]),
2778
[Generator.OperatorDeclaration(
OperatorKind
.Addition, modifiers: DeclarationModifiers.Abstract)]),
2787
[Generator.OperatorDeclaration(
OperatorKind
.Addition, modifiers: DeclarationModifiers.Virtual)]),
Microsoft.CodeAnalysis.VisualBasic.Workspaces (26)
CodeGeneration\VisualBasicSyntaxGenerator.vb (26)
717
Public Overrides Function OperatorDeclaration(kind As
OperatorKind
,
724
Return OperatorDeclaration(GetOperatorName(kind), isImplicitConversion:=kind =
OperatorKind
.ImplicitConversion, parameters, returnType, accessibility, modifiers, statements)
758
Private Shared Function GetOperatorName(kind As
OperatorKind
) As String
760
Case
OperatorKind
.ImplicitConversion
762
Case
OperatorKind
.ExplicitConversion
764
Case
OperatorKind
.Addition
766
Case
OperatorKind
.BitwiseAnd
768
Case
OperatorKind
.BitwiseOr
770
Case
OperatorKind
.Division
772
Case
OperatorKind
.Equality
774
Case
OperatorKind
.ExclusiveOr
776
Case
OperatorKind
.False
778
Case
OperatorKind
.GreaterThan
780
Case
OperatorKind
.GreaterThanOrEqual
782
Case
OperatorKind
.Inequality
784
Case
OperatorKind
.LeftShift
786
Case
OperatorKind
.LessThan
788
Case
OperatorKind
.LessThanOrEqual
790
Case
OperatorKind
.LogicalNot
792
Case
OperatorKind
.Modulus
794
Case
OperatorKind
.Multiply
796
Case
OperatorKind
.RightShift
798
Case
OperatorKind
.Subtraction
800
Case
OperatorKind
.True
802
Case
OperatorKind
.UnaryNegation
804
Case
OperatorKind
.UnaryPlus
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (23)
CodeGeneration\SyntaxGeneratorTests.vb (23)
946
Generator.OperatorDeclaration(
OperatorKind
.Addition, parameters, returnType),
951
Generator.OperatorDeclaration(
OperatorKind
.BitwiseAnd, parameters, returnType),
956
Generator.OperatorDeclaration(
OperatorKind
.BitwiseOr, parameters, returnType),
961
Generator.OperatorDeclaration(
OperatorKind
.Division, parameters, returnType),
966
Generator.OperatorDeclaration(
OperatorKind
.Equality, parameters, returnType),
971
Generator.OperatorDeclaration(
OperatorKind
.ExclusiveOr, parameters, returnType),
976
Generator.OperatorDeclaration(
OperatorKind
.False, parameters, returnType),
981
Generator.OperatorDeclaration(
OperatorKind
.GreaterThan, parameters, returnType),
986
Generator.OperatorDeclaration(
OperatorKind
.GreaterThanOrEqual, parameters, returnType),
991
Generator.OperatorDeclaration(
OperatorKind
.Inequality, parameters, returnType),
996
Generator.OperatorDeclaration(
OperatorKind
.LeftShift, parameters, returnType),
1001
Generator.OperatorDeclaration(
OperatorKind
.LessThan, parameters, returnType),
1006
Generator.OperatorDeclaration(
OperatorKind
.LessThanOrEqual, parameters, returnType),
1011
Generator.OperatorDeclaration(
OperatorKind
.LogicalNot, parameters, returnType),
1016
Generator.OperatorDeclaration(
OperatorKind
.Modulus, parameters, returnType),
1021
Generator.OperatorDeclaration(
OperatorKind
.Multiply, parameters, returnType),
1026
Generator.OperatorDeclaration(
OperatorKind
.RightShift, parameters, returnType),
1031
Generator.OperatorDeclaration(
OperatorKind
.Subtraction, parameters, returnType),
1036
Generator.OperatorDeclaration(
OperatorKind
.True, parameters, returnType),
1041
Generator.OperatorDeclaration(
OperatorKind
.UnaryNegation, parameters, returnType),
1046
Generator.OperatorDeclaration(
OperatorKind
.UnaryPlus, parameters, returnType),
1053
Generator.OperatorDeclaration(
OperatorKind
.ImplicitConversion, parameters, returnType),
1058
Generator.OperatorDeclaration(
OperatorKind
.ExplicitConversion, parameters, returnType),
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SyntaxGenerator.cs (1)
256
OperatorKind
kind,