86 references to EventAdd
Microsoft.Analyzers.Local (1)
ApiLifecycle\AssemblyAnalysis.cs (1)
211and not MethodKind.EventAdd
Microsoft.CodeAnalysis (1)
Symbols\IMethodSymbol.cs (1)
235/// If this method has <see cref="MethodKind"/> of <see cref="MethodKind.EventAdd"/> or <see cref="MethodKind.EventRemove"/>,
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
553=> symbol is IMethodSymbol { MethodKind: MethodKind.EventAdd or MethodKind.EventRaise or MethodKind.EventRemove };
Microsoft.CodeAnalysis.CSharp (18)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (2)
445case MethodKind.EventAdd: 456AddKeyword(symbol.MethodKind == MethodKind.EventAdd ? SyntaxKind.AddKeyword : SyntaxKind.RemoveKeyword);
Symbols\Metadata\PE\PEEventSymbol.cs (1)
125_addMethod.SetAssociatedEvent(this, MethodKind.EventAdd);
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
796Debug.Assert((methodKind == MethodKind.EventAdd) || (methodKind == MethodKind.EventRemove));
Symbols\MethodSymbol.cs (1)
613case MethodKind.EventAdd:
Symbols\MethodSymbolExtensions.cs (1)
135case MethodKind.EventAdd:
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
338bool accessorIsAdder = accessor.MethodKind == MethodKind.EventAdd;
Symbols\PublicModel\MethodSymbol.cs (2)
49case MethodKind.EventAdd: 50return MethodKind.EventAdd;
Symbols\Source\SourceEventAccessorSymbol.cs (2)
36isAdder ? MethodKind.EventAdd : MethodKind.EventRemove, 118if (this.MethodKind == MethodKind.EventAdd)
Symbols\Source\SourceMemberContainerSymbol.cs (1)
4072case MethodKind.EventAdd:
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
163case MethodKind.EventAdd: 1661case MethodKind.EventAdd:
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
128if (accessor.MethodKind == MethodKind.EventAdd)
Symbols\Synthesized\SynthesizedEventAccessorSymbol.cs (2)
53return this.MethodKind == MethodKind.EventAdd 130BoundBlock body = CSharp.MethodBodySynthesizer.ConstructFieldLikeEventAccessorBody(fieldLikeEvent, isAddMethod: MethodKind == MethodKind.EventAdd, compilationState.Compilation, diagnostics);
Symbols\TypeSymbol.cs (1)
1569case MethodKind.EventAdd:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\EventTests.cs (1)
216Assert.Equal(MethodKind.EventAdd, addMethod.MethodKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (17)
Compilation\GetSemanticInfoTests.cs (1)
1172Assert.Equal(MethodKind.EventAdd, ((IMethodSymbol)parameterSymbol.ContainingSymbol).MethodKind);
Symbols\InterfaceImplementationTests.cs (1)
2221Single(m => m.ExplicitInterfaceImplementations.Single().MethodKind == MethodKind.EventAdd);
Symbols\Metadata\PE\LoadingEvents.cs (1)
98case MethodKind.EventAdd:
Symbols\Source\EventTests.cs (4)
89Assert.Equal(MethodKind.EventAdd, addMethod.MethodKind); 127Assert.Equal(MethodKind.EventAdd, addMethod.MethodKind); 166Assert.Equal(MethodKind.EventAdd, addMethod.MethodKind); 201Assert.Equal(MethodKind.EventAdd, addMethod.MethodKind);
Symbols\StaticAbstractMembersInInterfacesTests.cs (10)
25735Assert.Equal(MethodKind.EventAdd, cM01Add.MethodKind); 25830Assert.Equal(MethodKind.EventAdd, cM01Add.MethodKind); 26378Assert.Equal(MethodKind.EventAdd, cM01Add.MethodKind); 26664Assert.Equal(MethodKind.EventAdd, cM01Add.MethodKind); 26975Assert.Equal(MethodKind.EventAdd, c1M01Add.MethodKind); 27000Assert.Equal(MethodKind.EventAdd, c2M01Add.MethodKind); 27136Assert.Equal(MethodKind.EventAdd, c1M01Add.MethodKind); 27213Assert.Equal(MethodKind.EventAdd, c2M01Add.MethodKind); 27247Assert.Equal(MethodKind.EventAdd, c3M02Add.MethodKind); 27326Assert.Equal(MethodKind.EventAdd, c4M02Add.MethodKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Extensions.cs (1)
575case MethodKind.EventAdd:
Microsoft.CodeAnalysis.Features (4)
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
147case MethodKind.EventAdd:
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
359MethodKind.EventAdd or MethodKind.EventRaise or MethodKind.EventRemove => FeaturesResources.event_accessor,
RQName\RQNodeBuilder.cs (1)
202MethodKind.EventAdd or
Shared\Extensions\ISymbolExtensions_2.cs (1)
250case MethodKind.EventAdd:
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\TrackingDiagnosticAnalyzer.cs (1)
122new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.EventAdd, ReturnsVoid = true },
Microsoft.CodeAnalysis.VisualBasic (27)
Analysis\FlowAnalysis\DataFlowPass.vb (2)
1231(Me.MethodSymbol.MethodKind = MethodKind.EventAdd AndAlso DirectCast(Me.MethodSymbol.AssociatedSymbol, EventSymbol).IsWindowsRuntimeEvent) Then 1290Case MethodKind.EventAdd
Binding\Binder_Utils.vb (2)
1530Case MethodKind.EventAdd 1652MethodKindEventAdd = CUInt(MethodKind.EventAdd) << MethodKindShift
Compilation\ClsComplianceChecker.vb (1)
232Case MethodKind.EventAdd, MethodKind.EventRemove
SymbolDisplay\SymbolDisplayVisitor.Members.vb (3)
223Case MethodKind.EventAdd, 233symbol.MethodKind = MethodKind.EventAdd, 321MethodKind.EventAdd,
Symbols\Metadata\PE\PEEventSymbol.vb (1)
90Me._addMethod.SetAssociatedEvent(Me, MethodKind.EventAdd)
Symbols\Metadata\PE\PEMethodSymbol.vb (1)
984Debug.Assert((methodKind = MethodKind.EventAdd) OrElse (methodKind = MethodKind.EventRemove) OrElse (methodKind = MethodKind.EventRaise))
Symbols\MethodKindExtensions.vb (1)
16Case MethodKind.EventAdd
Symbols\Source\CustomEventAccessorSymbol.vb (2)
143Return Not (Me.MethodKind = MethodKind.EventAdd AndAlso _event.IsWindowsRuntimeEvent) 214If Me.MethodKind = MethodKind.EventAdd Then
Symbols\Source\OverrideHidingHelper.vb (1)
500MethodKind.EventAdd, MethodKind.EventRaise, MethodKind.EventRemove,
Symbols\Source\SourceEventSymbol.vb (2)
104Case MethodKind.EventAdd 402Case MethodKind.EventAdd
Symbols\Source\SourceMemberContainerTypeSymbol.vb (1)
961Case MethodKind.EventAdd, MethodKind.EventRemove, MethodKind.PropertyGet, MethodKind.PropertySet
Symbols\Source\SourceMethodSymbol.vb (4)
1274Debug.Assert(Me.MethodKind <> MethodKind.EventAdd, 1783Case MethodKind.EventAdd, MethodKind.EventRaise, MethodKind.EventRemove 1962MethodKind.EventAdd, 2261Case MethodKind.EventAdd
Symbols\Source\SourceParameterSymbol.vb (1)
210MethodKind.EventAdd,
Symbols\Source\SynthesizedEventAccessorSymbol.vb (3)
104Return Not (Me.MethodKind = MethodKind.EventAdd AndAlso m_propertyOrEvent.IsWindowsRuntimeEvent) 110Return ConstructFieldLikeEventAccessorBody(Me.m_propertyOrEvent, Me.MethodKind = MethodKind.EventAdd, compilation, diagnostics) 543Return MethodKind.EventAdd
Symbols\SubstitutedNamedType.vb (1)
462Case MethodKind.EventAdd
Symbols\Symbol_Attributes.vb (1)
84MethodKind.EventAdd,
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (3)
SymbolsTests\Metadata\PE\LoadingEvents.vb (1)
105Case MethodKind.EventAdd
SymbolsTests\Source\EventTests.vb (1)
1732Assert.Equal(MethodKind.EventAdd, DirectCast(mems(2), MethodSymbol).MethodKind)
SymbolsTests\Source\ImplementsTests.vb (1)
3813Single(Function(m) m.ExplicitInterfaceImplementations.Single().MethodKind = MethodKind.EventAdd)
Microsoft.CodeAnalysis.Workspaces (3)
Recommendations\AbstractRecommendationService.cs (1)
89case MethodKind.EventAdd:
Shared\Extensions\ISymbolExtensions_2.cs (1)
17if (method.MethodKind is MethodKind.EventAdd or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
553=> symbol is IMethodSymbol { MethodKind: MethodKind.EventAdd or MethodKind.EventRaise or MethodKind.EventRemove };
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (4)
998MethodKind.EventAdd or 1496SyntaxKind.AddAccessorDeclaration => MethodKind.EventAdd, 1506MethodKind.EventAdd => SyntaxKind.AddAccessorDeclaration, 2210case MethodKind.EventAdd:
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
CodeModel\VisualBasicCodeModelService.vb (4)
1103Return MethodKind.EventAdd 1119Case MethodKind.EventAdd 1389methodSymbol.MethodKind = MethodKind.EventAdd OrElse 2560Case MethodKind.EventAdd