144 references to EventDeclarationSyntax
ILLink.CodeFixProvider (2)
BaseAttributeCodeFixProvider.cs (2)
102 case EventDeclarationSyntax when targets.HasFlag (AttributeableParentTargets.Event): 105 case EventDeclarationSyntax:
Microsoft.CodeAnalysis.CSharp (27)
Binder\BinderFactory.BinderFactoryVisitor.cs (5)
303var eventSymbol = GetEventSymbol((EventDeclarationSyntax)propertyOrEventDecl, resultBinder); 378public override Binder VisitEventDeclaration(EventDeclarationSyntax parent) 499var eventDecl = (EventDeclarationSyntax)basePropertyDeclarationSyntax; 543private SourceEventSymbol GetEventSymbol(EventDeclarationSyntax eventDeclarationSyntax, Binder outerBinder)
Compilation\CSharpSemanticModel.cs (1)
3040public abstract IEventSymbol GetDeclaredSymbol(EventDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
Compilation\MemberSemanticModel.cs (1)
662public override IEventSymbol GetDeclaredSymbol(EventDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
315public override IEventSymbol GetDeclaredSymbol(EventDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (3)
1552public override IEventSymbol GetDeclaredSymbol(EventDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1646var eventDecl = (EventDeclarationSyntax)declaration;
CSharpExtensions.cs (1)
1445public static IEventSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, EventDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Parser\LanguageParser.cs (1)
4795private EventDeclarationSyntax ParseEventDeclarationWithAccessors(
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (2)
171var t = (EventDeclarationSyntax)node;
Symbols\Source\ModifierUtils.cs (1)
29if (readonlyToken.Parent is MethodDeclarationSyntax or AccessorDeclarationSyntax or BasePropertyDeclarationSyntax or EventDeclarationSyntax)
Symbols\Source\SourceCustomEventSymbol.cs (2)
26internal SourceCustomEventSymbol(SourceMemberContainerTypeSymbol containingType, Binder binder, EventDeclarationSyntax syntax, BindingDiagnosticBag diagnostics) : 200get { return ((EventDeclarationSyntax)this.CSharpSyntaxNode).ExplicitInterfaceSpecifier; }
Symbols\Source\SourceEventSymbol.cs (2)
148return ((EventDeclarationSyntax)syntax).AttributeLists; 591else if (!this.IsNoMoreVisibleThan(this.Type, ref useSiteInfo) && (CSharpSyntaxNode as EventDeclarationSyntax)?.ExplicitInterfaceSpecifier == null)
Symbols\Source\SourceMemberContainerSymbol.cs (2)
5120var eventSyntax = (EventDeclarationSyntax)m;
Syntax\EventDeclarationSyntax.cs (2)
13public EventDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken eventKeyword, TypeSyntax type, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier, SyntaxToken identifier, AccessorListSyntax accessorList) 18public EventDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken eventKeyword, TypeSyntax type, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier, SyntaxToken identifier, SyntaxToken semicolonToken)
Syntax\SyntaxFactory.cs (2)
2709public static EventDeclarationSyntax EventDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken eventKeyword, TypeSyntax type, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier, SyntaxToken identifier, AccessorListSyntax accessorList) 2715public static EventDeclarationSyntax EventDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken eventKeyword, TypeSyntax type, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier, SyntaxToken identifier, SyntaxToken semicolonToken)
Syntax\SyntaxFacts.cs (1)
185return ((EventDeclarationSyntax)parent).Type == node;
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (2)
50return ((EventDeclarationSyntax)member).Identifier; 155return ((EventDeclarationSyntax)member).Type;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
349case BaseMethodDeclarationSyntax or IndexerDeclarationSyntax or EventDeclarationSyntax:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
86return ((EventDeclarationSyntax)declaration).ExplicitInterfaceSpecifier == null;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
804var eventDeclarationSyntax = (EventDeclarationSyntax)syntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (4)
124return Compare((EventDeclarationSyntax)x, (EventDeclarationSyntax)y); 235private int Compare(EventDeclarationSyntax x, EventDeclarationSyntax y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (1)
39var lastEvent = members.LastOrDefault(m => m is EventDeclarationSyntax);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
521return targetToken.IsAccessorDeclarationContext<EventDeclarationSyntax>(position, kind) ||
Microsoft.CodeAnalysis.CSharp.EditorFeatures (4)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (4)
780EventDeclarationSyntax eventDeclarationNode => ShouldRemoveBraceForEventDeclaration(eventDeclarationNode, caretPosition), 821private static bool ShouldRemoveBraceForEventDeclaration(EventDeclarationSyntax eventDeclarationNode, int caretPosition) 973EventDeclarationSyntax eventDeclarationNode => ConvertEventDeclarationToEventFieldDeclaration(eventDeclarationNode), 1018EventDeclarationSyntax eventDeclarationNode)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Structure\EventDeclarationStructureTests.cs (1)
15public class EventDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<EventDeclarationSyntax>
Structure\MetadataAsSource\EventDeclarationStructureTests.cs (1)
14public class EventDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<EventDeclarationSyntax>
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\GetDiagnosticsTests.cs (1)
1020EventDeclarationSyntax eventDecl => eventDecl.Identifier.GetLocation(),
Microsoft.CodeAnalysis.CSharp.Features (27)
CodeLens\CSharpCodeLensMemberFinder.cs (1)
114public override void VisitEventDeclaration(EventDeclarationSyntax node)
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
37?? token.GetAncestor<EventDeclarationSyntax>()
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
57?? token.GetAncestor<EventDeclarationSyntax>()
Completion\KeywordRecommenders\AddKeywordRecommender.cs (1)
19=> context.TargetToken.IsAccessorDeclarationContext<EventDeclarationSyntax>(position, SyntaxKind.AddKeyword);
Completion\KeywordRecommenders\MethodKeywordRecommender.cs (1)
27or EventDeclarationSyntax
Completion\KeywordRecommenders\ParamKeywordRecommender.cs (1)
32token.GetAncestor<EventDeclarationSyntax>() != null)
Completion\KeywordRecommenders\RemoveKeywordRecommender.cs (1)
19=> context.TargetToken.IsAccessorDeclarationContext<EventDeclarationSyntax>(position, SyntaxKind.RemoveKeyword);
EditAndContinue\BreakpointSpans.cs (2)
375var @event = (EventDeclarationSyntax)node;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (2)
1710var eventDeclaration = (EventDeclarationSyntax)node;
EditAndContinue\SyntaxComparer.cs (1)
1471return ((EventDeclarationSyntax)node).Identifier;
GenerateType\CSharpGenerateTypeService.cs (2)
302nameOrMemberAccessExpression.GetAncestors<EventDeclarationSyntax>().Any()) 706if (node is EventDeclarationSyntax or EventFieldDeclarationSyntax &&
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
163EventDeclarationSyntax member => (member, member.ExplicitInterfaceSpecifier, member.Identifier),
ImplementInterface\CSharpImplementImplicitlyCodeRefactoringProvider.cs (1)
60EventDeclarationSyntax member => member.WithExplicitInterfaceSpecifier(null),
InheritanceMargin\CSharpInheritanceMarginService.cs (1)
70EventDeclarationSyntax eventDeclarationNode => eventDeclarationNode.Identifier,
LineSeparators\CSharpLineSeparatorService.cs (1)
146=> IsBadAccessorList(node as EventDeclarationSyntax);
Organizing\Organizers\EventDeclarationOrganizer.cs (3)
17internal class EventDeclarationOrganizer : AbstractSyntaxNodeOrganizer<EventDeclarationSyntax> 25protected override EventDeclarationSyntax Organize( 26EventDeclarationSyntax syntax,
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (2)
171var t = (EventDeclarationSyntax)node;
Structure\CSharpBlockStructureProvider.cs (1)
33builder.Add<EventDeclarationSyntax, EventDeclarationStructureProvider>();
Structure\CSharpStructureHelpers.cs (1)
276EventDeclarationSyntax eventDeclaration => eventDeclaration.Modifiers.FirstOrNull() ?? eventDeclaration.EventKeyword,
Structure\Providers\EventDeclarationStructureProvider.cs (2)
12internal class EventDeclarationStructureProvider : AbstractSyntaxNodeStructureProvider<EventDeclarationSyntax> 16EventDeclarationSyntax eventDeclaration,
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
Diagnostics\Suppression\SuppressionTests.cs (2)
1100var e = (EventDeclarationSyntax)context.Node;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Compilation\SemanticModelAPITests.cs (2)
2531var eventDecl = (EventDeclarationSyntax)typeDecl.Members[0];
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (6)
381var eventDecl = (EventDeclarationSyntax)typeDecl.Members[0]; 499var node = (EventDeclarationSyntax)typeDecl.Members[0]; 4742var eventDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<EventDeclarationSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (17)
Generated\Syntax.Test.xml.Generated.cs (5)
10802private static EventDeclarationSyntax GenerateEventDeclaration() 13396var node = GenerateEventDeclaration(); 13406var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithEventKeyword(node.EventKeyword).WithType(node.Type).WithExplicitInterfaceSpecifier(node.ExplicitInterfaceSpecifier).WithIdentifier(node.Identifier).WithAccessorList(node.AccessorList).WithSemicolonToken(node.SemicolonToken); 19065var oldNode = GenerateEventDeclaration(); 19081var oldNode = GenerateEventDeclaration();
IncrementalParsing\TypeChanges.cs (4)
125var propertyType = classType.Members[0] as EventDeclarationSyntax; 141var propertyType = classType.Members[0] as EventDeclarationSyntax;
Parsing\DeclarationParsingTests.cs (8)
4560var es = (EventDeclarationSyntax)cs.Members[0]; 4756var es = (EventDeclarationSyntax)cs.Members[0]; 4810var es = (EventDeclarationSyntax)cs.Members[0]; 4893var es = (EventDeclarationSyntax)cs.Members[0];
Microsoft.CodeAnalysis.CSharp.Workspaces (24)
Classification\ClassificationHelpers.cs (1)
260else if (token.Parent is EventDeclarationSyntax eventDeclarationSyntax && eventDeclarationSyntax.Identifier == token)
CodeGeneration\CSharpSyntaxGenerator.cs (9)
633SyntaxKind.EventDeclaration => ((EventDeclarationSyntax)declaration).WithExplicitInterfaceSpecifier(specifier), 664var ev = (EventDeclarationSyntax)declaration; 850var ev = (EventDeclarationSyntax)member; 1909EventDeclarationSyntax eventDeclaration => eventDeclaration.Identifier.ValueText, 1939EventDeclarationSyntax eventDeclaration => ReplaceWithTrivia(declaration, eventDeclaration.Identifier, id), 1979return ((EventDeclarationSyntax)declaration).Type; 2013SyntaxKind.EventDeclaration => ((EventDeclarationSyntax)declaration).WithType((TypeSyntax)type),
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
323var eventDecl = (EventDeclarationSyntax)node;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (2)
50return ((EventDeclarationSyntax)member).Identifier; 155return ((EventDeclarationSyntax)member).Type;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
349case BaseMethodDeclarationSyntax or IndexerDeclarationSyntax or EventDeclarationSyntax:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
86return ((EventDeclarationSyntax)declaration).ExplicitInterfaceSpecifier == null;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
804var eventDeclarationSyntax = (EventDeclarationSyntax)syntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (4)
124return Compare((EventDeclarationSyntax)x, (EventDeclarationSyntax)y); 235private int Compare(EventDeclarationSyntax x, EventDeclarationSyntax y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (1)
39var lastEvent = members.LastOrDefault(m => m is EventDeclarationSyntax);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
521return targetToken.IsAccessorDeclarationContext<EventDeclarationSyntax>(position, kind) ||
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (7)
CodeGeneration\SyntaxGeneratorTests.cs (7)
1149VerifySyntax<EventDeclarationSyntax>( 1153VerifySyntax<EventDeclarationSyntax>( 1157VerifySyntax<EventDeclarationSyntax>( 1161VerifySyntax<EventDeclarationSyntax>( 1437VerifySyntax<EventDeclarationSyntax>( 1490VerifySyntax<EventDeclarationSyntax>( 1880VerifySyntax<EventDeclarationSyntax>(
Microsoft.DotNet.GenFacades (2)
NotSupportedAssemblyGenerator.cs (2)
141public override SyntaxNode VisitEventDeclaration(EventDeclarationSyntax node) 219private string GetEventDefinition(EventDeclarationSyntax node) => GetFullyQualifiedName((TypeDeclarationSyntax)node.Parent) + "." + node.Identifier.ValueText;
Microsoft.ML.InternalCodeAnalyzer (1)
NameAnalyzer.cs (1)
101=> CheckPascal(((EventDeclarationSyntax)context.Node).Identifier, context);
Microsoft.VisualStudio.LanguageServices.CSharp (8)
CodeModel\CSharpCodeModelService.cs (6)
824return ((EventDeclarationSyntax)node).ExplicitInterfaceSpecifier?.ToString() + 825((EventDeclarationSyntax)node).Identifier.ToString(); 900return ((EventDeclarationSyntax)node).WithIdentifier(newIdentifier); 2635EventDeclarationSyntax); 2637return eventNode is EventDeclarationSyntax; 3414else if (container is EventDeclarationSyntax eventDeclaration)
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (2)
245var eventDeclaration = (EventDeclarationSyntax)node;