68 references to ERR_EventNeedsBothAccessors
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
680
or ErrorCode.
ERR_EventNeedsBothAccessors
Symbols\Source\SourceCustomEventSymbol.cs (1)
139
diagnostics.Add(ErrorCode.
ERR_EventNeedsBothAccessors
, this.GetFirstLocation(), this);
Symbols\Source\SourceFieldLikeEventSymbol.cs (1)
120
diagnostics.Add(ErrorCode.
ERR_EventNeedsBothAccessors
, this.GetFirstLocation(), this);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
PartialEventsAndConstructorsTests.cs (4)
546
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E").WithArguments("C.E").WithLocation(5, 26),
549
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E").WithArguments("C.E").WithLocation(6, 26),
650
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E").WithArguments("C.E").WithLocation(4, 33),
653
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "F").WithArguments("C.F").WithLocation(5, 33));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\InitOnlyMemberTests.cs (1)
2422
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "Event").WithArguments("C.Event").WithLocation(4, 32),
Semantics\SemanticErrorTests.cs (2)
2242
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I.E1").WithLocation(4, 25),
2245
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E2").WithArguments("I.E2").WithLocation(5, 25));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (58)
SymbolDisplay\SymbolDisplayTests.cs (2)
7283
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("X.E1").WithLocation(6, 34),
7286
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E2").WithArguments("X.E2").WithLocation(7, 34));
Symbols\DefaultInterfaceImplementationTests.cs (35)
6347
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 25 + declModifiers.Length)
6663
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 25 + declModifiers.Length)
6695
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 25 + declModifiers.Length)
6727
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 25 + declModifiers.Length)
6751
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 25)
6821
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1")
26803
compilation1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
ERR_EventNeedsBothAccessors
).Verify(
27137
compilation1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
ERR_EventNeedsBothAccessors
).Verify(
27227
compilation2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.
ERR_EventNeedsBothAccessors
).Verify(
27377
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27399
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27418
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27437
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27459
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27478
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27497
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40)
27536
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40),
27558
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("I1.E1").WithLocation(4, 40),
28205
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P2").WithArguments("I1.P2").WithLocation(6, 41),
28220
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P4").WithArguments("I1.P4").WithLocation(14, 33),
29669
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P1").WithArguments("I1.P1").WithLocation(4, 39),
29944
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P1").WithArguments("Test1.I1.P1").WithLocation(54, 28),
29947
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P3").WithArguments("Test1.I3.P3").WithLocation(63, 28),
29950
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P4").WithArguments("Test1.I4.P4").WithLocation(67, 28),
29953
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P6").WithArguments("Test1.I6.P6").WithLocation(76, 28),
29956
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P7").WithArguments("Test1.I7.P7").WithLocation(80, 28),
29959
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P8").WithArguments("Test1.I8.P8").WithLocation(84, 28),
40937
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M1").WithArguments("I2.I1.M1").WithLocation(10, 28 + implModifiers.Length),
40940
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M2").WithArguments("I2.I1.M2").WithLocation(14, 28 + implModifiers.Length),
45490
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "F1").WithArguments("I1.F1").WithLocation(4, 33),
45496
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "F5").WithArguments("I1.F5").WithLocation(5, 33),
59082
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P1").WithArguments("I1.P1").WithLocation(4, 25 + modifiers.Length),
59122
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P1").WithArguments("I1.P1").WithLocation(4, 25 + modifiers.Length),
59161
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "P1").WithArguments("I1.P1").WithLocation(4, 25 + modifiers.Length),
59201
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)
26861
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.I1.M01").WithLocation(4, 34)
26989
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.M01").WithLocation(4, 38)
27019
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.M01").WithLocation(4, 38)
27049
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.I1.M01").WithLocation(4, 34)
27135
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.I1.M01").WithLocation(4, 34)
27263
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.M01").WithLocation(4, 38)
27293
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.M01").WithLocation(4, 38)
27323
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "M01").WithArguments("C1.I1.M01").WithLocation(4, 34)
Symbols\SymbolErrorTests.cs (5)
802
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E1").WithArguments("MyClass.E1"),
805
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E2").WithArguments("MyClass.E2"),
808
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "E3").WithArguments("MyClass.E3"));
824
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "myevent").WithArguments("i1.myevent"));
905
Diagnostic(ErrorCode.
ERR_EventNeedsBothAccessors
, "myevent").WithArguments("i1.myevent").WithLocation(5, 22)