64 references to ERR_EventNeedsBothAccessors
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
619
case ErrorCode.
ERR_EventNeedsBothAccessors
:
Symbols\Source\SourceCustomEventSymbol.cs (1)
139
diagnostics.Add(ErrorCode.
ERR_EventNeedsBothAccessors
, this.Locations[0], this);
Symbols\Source\SourceFieldLikeEventSymbol.cs (1)
112
diagnostics.Add(ErrorCode.
ERR_EventNeedsBothAccessors
, this.Locations[0], this);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\InitOnlyMemberTests.cs (1)
2417
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "Event").WithArguments("C.Event").WithLocation(4, 32),
Semantics\SemanticErrorTests.cs (2)
2244
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I.E1").WithLocation(4, 25),
2247
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E2").WithArguments("I.E2").WithLocation(5, 25));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (58)
SymbolDisplay\SymbolDisplayTests.cs (2)
6860
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("X.E1").WithLocation(6, 34),
6863
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E2").WithArguments("X.E2").WithLocation(7, 34));
Symbols\DefaultInterfaceImplementationTests.cs (35)
6162
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 25 + declModifiers.Length)
6478
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 25 + declModifiers.Length)
6510
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 25 + declModifiers.Length)
6542
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 25 + declModifiers.Length)
6566
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 25)
6636
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1")
26618
compilation1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
ERR_EventNeedsBothAccessors
).Verify(
26952
compilation1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
ERR_EventNeedsBothAccessors
).Verify(
27042
compilation2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
ERR_EventNeedsBothAccessors
).Verify(
27192
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27214
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27233
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27252
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27274
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27293
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27312
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27351
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40),
27373
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40),
28020
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P2").WithArguments("I1.P2").WithLocation(6, 41),
28035
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P4").WithArguments("I1.P4").WithLocation(14, 33),
29484
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P1").WithArguments("I1.P1").WithLocation(4, 39),
29759
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P1").WithArguments("Test1.I1.P1").WithLocation(54, 28),
29762
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P3").WithArguments("Test1.I3.P3").WithLocation(63, 28),
29765
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P4").WithArguments("Test1.I4.P4").WithLocation(67, 28),
29768
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P6").WithArguments("Test1.I6.P6").WithLocation(76, 28),
29771
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P7").WithArguments("Test1.I7.P7").WithLocation(80, 28),
29774
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P8").WithArguments("Test1.I8.P8").WithLocation(84, 28),
40752
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M1").WithArguments("I2.I1.M1").WithLocation(10, 28 + implModifiers.Length),
40755
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M2").WithArguments("I2.I1.M2").WithLocation(14, 28 + implModifiers.Length),
45299
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "F1").WithArguments("I1.F1").WithLocation(4, 33),
45305
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "F5").WithArguments("I1.F5").WithLocation(5, 33),
58891
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P1").WithArguments("I1.P1").WithLocation(4, 25 + modifiers.Length),
58931
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P1").WithArguments("I1.P1").WithLocation(4, 25 + modifiers.Length),
58970
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P1").WithArguments("I1.P1").WithLocation(4, 25 + modifiers.Length),
59010
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P1").WithArguments("I1.P1").WithLocation(4, 25 + modifiers.Length),
Symbols\OverriddenOrHiddenMembersTests.cs (1)
1755
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "AbstractSealed").WithArguments("Derived.AbstractSealed"),
Symbols\Source\EventTests.cs (7)
1455
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E").WithArguments("C.E")
1476
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "myevent").WithArguments("i1.myevent"));
2139
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "").WithArguments("<invalid-global-code>."));
2153
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E").WithArguments("<invalid-global-code>.E"));
2167
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "").WithArguments("<invalid-global-code>."));
2181
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "").WithArguments("<invalid-global-code>."));
2381
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E").WithArguments("Base.E"),
Symbols\StaticAbstractMembersInInterfacesTests.cs (8)
26347
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.I1.M01").WithLocation(4, 34)
26475
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.M01").WithLocation(4, 38)
26505
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.M01").WithLocation(4, 38)
26535
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.I1.M01").WithLocation(4, 34)
26621
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.I1.M01").WithLocation(4, 34)
26749
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.M01").WithLocation(4, 38)
26779
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.M01").WithLocation(4, 38)
26809
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.I1.M01").WithLocation(4, 34)
Symbols\SymbolErrorTests.cs (5)
801
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("MyClass.E1"),
804
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E2").WithArguments("MyClass.E2"),
807
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E3").WithArguments("MyClass.E3"));
823
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "myevent").WithArguments("i1.myevent"));
904
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "myevent").WithArguments("i1.myevent").WithLocation(5, 22)