190 references to DelegateDeclarationSyntax
Microsoft.CodeAnalysis.CSharp (42)
Binder\BinderFactory.BinderFactoryVisitor.cs (3)
662public override Binder VisitDelegateDeclaration(DelegateDeclarationSyntax parent) 1288SourceNamedTypeSymbol delegateType = ((NamespaceOrTypeSymbol)outerBinder.ContainingMemberOrLambda).GetSourceTypeMember((DelegateDeclarationSyntax)memberSyntax); 1344SourceNamedTypeSymbol delegateType = ((NamespaceOrTypeSymbol)outerBinder.ContainingMemberOrLambda).GetSourceTypeMember((DelegateDeclarationSyntax)memberSyntax);
Compilation\CSharpSemanticModel.cs (1)
2987public abstract INamedTypeSymbol GetDeclaredSymbol(DelegateDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
Compilation\MemberSemanticModel.cs (1)
609public override INamedTypeSymbol GetDeclaredSymbol(DelegateDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\PublicSemanticModel.cs (1)
44DelegateDeclarationSyntax => GetDeclaredSymbolForNode(targetSyntax).GetSymbol(),
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
270public override INamedTypeSymbol GetDeclaredSymbol(DelegateDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (7)
1370public override INamedTypeSymbol GetDeclaredSymbol(DelegateDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)) 1385private NamedTypeSymbol GetDeclaredType(DelegateDeclarationSyntax declarationSyntax) 1418var delegateDeclarationSyntax = declarationSyntax as DelegateDeclarationSyntax; 1651return ((DelegateDeclarationSyntax)declaration).Identifier.ValueText; 2082var memberDecl = paramList.Parent as DelegateDeclarationSyntax;
Compiler\UnprocessedDocumentationCommentFinder.cs (1)
64node is DelegateDeclarationSyntax ||
CSharpExtensions.cs (1)
1391public static INamedTypeSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, DelegateDeclarationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Declarations\DeclarationTreeBuilder.cs (1)
800public override SingleNamespaceOrTypeDeclaration VisitDelegateDeclaration(DelegateDeclarationSyntax node)
Declarations\MergedTypeDeclaration.cs (1)
85attributesSyntaxList = ((DelegateDeclarationSyntax)typeDecl).AttributeLists;
Parser\LanguageParser.cs (2)
5144return ((CSharp.Syntax.DelegateDeclarationSyntax)decl).Modifiers; 5493private DelegateDeclarationSyntax ParseDelegateDeclaration(SyntaxList<AttributeListSyntax> attributes, SyntaxListBuilder modifiers)
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (2)
161var t = (DelegateDeclarationSyntax)node;
Symbols\NamespaceOrTypeSymbol.cs (1)
196internal SourceNamedTypeSymbol? GetSourceTypeMember(DelegateDeclarationSyntax syntax)
Symbols\Source\SourceDelegateMethodSymbol.cs (8)
25DelegateDeclarationSyntax syntax, 48DelegateDeclarationSyntax syntax, 216DelegateDeclarationSyntax syntax) 259DelegateDeclarationSyntax syntax, 311var syntax = (DelegateDeclarationSyntax)SyntaxRef.GetSyntax(); 354DelegateDeclarationSyntax syntax) 392DelegateDeclarationSyntax syntax)
Symbols\Source\SourceMemberContainerSymbol.cs (2)
1864DelegateDeclarationSyntax delegateDecl => delegateDecl.Identifier, 3540SourceDelegateMethodSymbol.AddDelegateMembers(this, builder.NonTypeMembers, (DelegateDeclarationSyntax)syntax, diagnostics);
Symbols\Source\SourceNamedTypeSymbol.cs (4)
116return ((DelegateDeclarationSyntax)node).Identifier; 168tpl = ((DelegateDeclarationSyntax)typeDecl).TypeParameterList; 477var delegateDeclaration = (DelegateDeclarationSyntax)node;
Symbols\VarianceSafety.cs (2)
128var syntax = m.GetDeclaringSyntax<DelegateDeclarationSyntax>();
Syntax\LookupPosition.cs (1)
149internal static bool IsInDelegateDeclaration(int position, DelegateDeclarationSyntax delegateDecl)
Syntax\SyntaxFacts.cs (1)
182return ((DelegateDeclarationSyntax)parent).ReturnType == node;
Syntax\SyntaxNodeExtensions.cs (1)
270(current.Parent is DelegateDeclarationSyntax delegateDeclaration && delegateDeclaration.ReturnType == current) ||
Microsoft.CodeAnalysis.CSharp.CodeStyle (9)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (5)
42return ((DelegateDeclarationSyntax)member).Identifier; 81return ((DelegateDeclarationSyntax)member).Arity; 103return ((DelegateDeclarationSyntax)member).TypeParameterList; 121return ((DelegateDeclarationSyntax)member).WithParameterList((ParameterListSyntax)parameterList); 145return ((DelegateDeclarationSyntax)member).ReturnType;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
147DelegateDeclarationSyntax delegateDeclaration => delegateDeclaration.ParameterList,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
636.FirstOrDefault(n => n is BaseTypeDeclarationSyntax or DelegateDeclarationSyntax); 1341DelegateDeclarationSyntax delegateDecl => delegateDecl.Identifier,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
121DelegateDeclarationSyntax or
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (10)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
788var delegateDeclarationSyntax = (DelegateDeclarationSyntax)syntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (4)
104return Compare((DelegateDeclarationSyntax)x, (DelegateDeclarationSyntax)y); 156private int Compare(DelegateDeclarationSyntax x, DelegateDeclarationSyntax y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
225private static DelegateDeclarationSyntax GenerateDelegateDeclaration(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
620else if (node?.Parent is DelegateDeclarationSyntax delegateDecl)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1130MethodDeclarationSyntax or LocalFunctionStatementSyntax or ConstructorDeclarationSyntax or DelegateDeclarationSyntax or TypeDeclarationSyntax => true,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
253public override SyntaxNode VisitDelegateDeclaration(DelegateDeclarationSyntax node)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Structure\DelegateDeclarationStructureTests.cs (1)
14public class DelegateDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<DelegateDeclarationSyntax>
Structure\MetadataAsSource\DelegateDeclarationStructureTests.cs (1)
15public class DelegateDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<DelegateDeclarationSyntax>
Microsoft.CodeAnalysis.CSharp.Features (15)
ChangeSignature\CSharpChangeSignatureService.cs (1)
350if (updatedNode is DelegateDeclarationSyntax delegateDeclaration)
CodeLens\CSharpCodeLensMemberFinder.cs (1)
88public override void VisitDelegateDeclaration(DelegateDeclarationSyntax node)
Completion\KeywordRecommenders\TypeVarKeywordRecommender.cs (1)
34var @delegate = typeParameters.GetAncestorOrThis<DelegateDeclarationSyntax>();
Completion\KeywordRecommenders\WhereKeywordRecommender.cs (1)
61var decl = token.GetAncestor<DelegateDeclarationSyntax>();
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (3)
547=> node is BaseTypeDeclarationSyntax or DelegateDeclarationSyntax; 1664var delegateDeclaration = (DelegateDeclarationSyntax)node;
EditAndContinue\SyntaxComparer.cs (1)
1436return ((DelegateDeclarationSyntax)node).Identifier;
NavigationBar\CSharpNavigationBarItemService.cs (1)
175DelegateDeclarationSyntax d => semanticModel.GetDeclaredSymbol(d, cancellationToken),
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (2)
161var t = (DelegateDeclarationSyntax)node;
Structure\CSharpBlockStructureProvider.cs (1)
28builder.Add<DelegateDeclarationSyntax, DelegateDeclarationStructureProvider>();
Structure\CSharpStructureHelpers.cs (1)
272DelegateDeclarationSyntax delegateDeclaration => delegateDeclaration.Modifiers.FirstOrNull() ?? delegateDeclaration.DelegateKeyword,
Structure\Providers\DelegateDeclarationStructureProvider.cs (2)
12internal class DelegateDeclarationStructureProvider : AbstractSyntaxNodeStructureProvider<DelegateDeclarationSyntax> 16DelegateDeclarationSyntax delegateDeclaration,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\InitOnlyMemberTests.cs (2)
4148var delegateSyntax = tree.GetRoot().DescendantNodes().OfType<DelegateDeclarationSyntax>().Single();
SourceGeneration\GeneratorDriverTests_Attributes_SimpleName.cs (2)
103var input = ctx.ForAttributeWithSimpleName<DelegateDeclarationSyntax>("XAttribute"); 128var input = ctx.ForAttributeWithSimpleName<DelegateDeclarationSyntax>("YAttribute");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
837var delegateDecl = (DelegateDeclarationSyntax)(tree.GetCompilationUnitRoot().Members[0]);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (38)
Generated\Syntax.Test.xml.Generated.cs (5)
10733private static DelegateDeclarationSyntax GenerateDelegateDeclaration() 13082var node = GenerateDelegateDeclaration(); 13093var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithDelegateKeyword(node.DelegateKeyword).WithReturnType(node.ReturnType).WithIdentifier(node.Identifier).WithTypeParameterList(node.TypeParameterList).WithParameterList(node.ParameterList).WithConstraintClauses(node.ConstraintClauses).WithSemicolonToken(node.SemicolonToken); 18467var oldNode = GenerateDelegateDeclaration(); 18483var oldNode = GenerateDelegateDeclaration();
Parsing\DeclarationParsingTests.cs (26)
2004var ds = (DelegateDeclarationSyntax)file.Members[0]; 2031var ds = (DelegateDeclarationSyntax)file.Members[0]; 2059var ds = (DelegateDeclarationSyntax)file.Members[0]; 2106var ds = (DelegateDeclarationSyntax)file.Members[0]; 2152var ds = (DelegateDeclarationSyntax)file.Members[0]; 2187var ds = (DelegateDeclarationSyntax)file.Members[0]; 2222var ds = (DelegateDeclarationSyntax)file.Members[0]; 2264var ds = (DelegateDeclarationSyntax)file.Members[0]; 2300var ds = (DelegateDeclarationSyntax)file.Members[0]; 2336var ds = (DelegateDeclarationSyntax)file.Members[0]; 2373var ds = (DelegateDeclarationSyntax)file.Members[0]; 2406var ds = (DelegateDeclarationSyntax)file.Members[0]; 2457var ds = (DelegateDeclarationSyntax)cs.Members[0];
Parsing\ParserErrorMessageTests.cs (3)
3770var delegateDeclaration = (DelegateDeclarationSyntax)tree.GetRoot().DescendantNodes().Single(node => node is DelegateDeclarationSyntax);
Parsing\ParsingErrorRecoveryTests.cs (2)
2009var agg = (DelegateDeclarationSyntax)file.Members[0];
Syntax\SyntaxNodeTests.cs (2)
3476var delegateDecl = (DelegateDeclarationSyntax)compilationUnit.Members[0];
Microsoft.CodeAnalysis.CSharp.Workspaces (29)
Classification\ClassificationHelpers.cs (1)
198else if (token.Parent is DelegateDeclarationSyntax delegateDecl && delegateDecl.Identifier == token)
CodeGeneration\CSharpSyntaxGenerator.cs (7)
1758DelegateDeclarationSyntax @delegate => @delegate.WithTypeParameterList(typeParameterList), 1812DelegateDeclarationSyntax @delegate => @delegate.WithConstraintClauses(WithTypeConstraints(@delegate.ConstraintClauses, typeParameterName, kinds, isUnmanagedType, types)), 1881DelegateDeclarationSyntax delegateDeclaration => delegateDeclaration.Identifier.ValueText, 1908DelegateDeclarationSyntax delegateDeclaration => ReplaceWithTrivia(declaration, delegateDeclaration.Identifier, id), 1944return NotVoid(((DelegateDeclarationSyntax)declaration).ReturnType); 1984SyntaxKind.DelegateDeclaration => ((DelegateDeclarationSyntax)declaration).WithReturnType((TypeSyntax)type), 2208return ((DelegateDeclarationSyntax)declaration).WithParameterList(list);
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
294var delegateDecl = (DelegateDeclarationSyntax)node;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (5)
42return ((DelegateDeclarationSyntax)member).Identifier; 81return ((DelegateDeclarationSyntax)member).Arity; 103return ((DelegateDeclarationSyntax)member).TypeParameterList; 121return ((DelegateDeclarationSyntax)member).WithParameterList((ParameterListSyntax)parameterList); 145return ((DelegateDeclarationSyntax)member).ReturnType;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
147DelegateDeclarationSyntax delegateDeclaration => delegateDeclaration.ParameterList,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
636.FirstOrDefault(n => n is BaseTypeDeclarationSyntax or DelegateDeclarationSyntax); 1341DelegateDeclarationSyntax delegateDecl => delegateDecl.Identifier,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
121DelegateDeclarationSyntax or
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
788var delegateDeclarationSyntax = (DelegateDeclarationSyntax)syntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (4)
104return Compare((DelegateDeclarationSyntax)x, (DelegateDeclarationSyntax)y); 156private int Compare(DelegateDeclarationSyntax x, DelegateDeclarationSyntax y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
225private static DelegateDeclarationSyntax GenerateDelegateDeclaration(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
620else if (node?.Parent is DelegateDeclarationSyntax delegateDecl)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1130MethodDeclarationSyntax or LocalFunctionStatementSyntax or ConstructorDeclarationSyntax or DelegateDeclarationSyntax or TypeDeclarationSyntax => true,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
253public override SyntaxNode VisitDelegateDeclaration(DelegateDeclarationSyntax node)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (11)
CodeGeneration\SyntaxGeneratorTests.cs (11)
1703VerifySyntax<DelegateDeclarationSyntax>( 1707VerifySyntax<DelegateDeclarationSyntax>( 1711VerifySyntax<DelegateDeclarationSyntax>( 1715VerifySyntax<DelegateDeclarationSyntax>( 1719VerifySyntax<DelegateDeclarationSyntax>( 1723VerifySyntax<DelegateDeclarationSyntax>( 1727VerifySyntax<DelegateDeclarationSyntax>( 1910VerifySyntax<DelegateDeclarationSyntax>( 2040VerifySyntax<DelegateDeclarationSyntax>( 2143VerifySyntax<DelegateDeclarationSyntax>( 2211VerifySyntax<DelegateDeclarationSyntax>(Generator.Declaration(type), """
Microsoft.DotNet.GenFacades (4)
TypeParser.cs (4)
73var allPublicTypes = root.DescendantNodes().OfType<DelegateDeclarationSyntax>() 76foreach (var item in allPublicTypes) 117private static string GetDelegateTypeName(DelegateDeclarationSyntax type) 161private static bool HasPublicModifier(DelegateDeclarationSyntax token)
Microsoft.VisualStudio.LanguageServices.CSharp (24)
CodeModel\CSharpCodeModelService.CodeModelEventCollector.cs (7)
246DelegateDeclarationSyntax) 515Debug.Assert(oldMember is BaseTypeDeclarationSyntax or DelegateDeclarationSyntax); 516Debug.Assert(newMember is BaseTypeDeclarationSyntax or DelegateDeclarationSyntax); 588else if (oldMember is DelegateDeclarationSyntax oldDelegate) 590var newDelegate = (DelegateDeclarationSyntax)newMember; 666DelegateDeclarationSyntax)
CodeModel\CSharpCodeModelService.cs (8)
323else if (parent is DelegateDeclarationSyntax delegateDecl) 381DelegateDeclarationSyntax; 809return ((DelegateDeclarationSyntax)node).Identifier.ToString(); 890return ((DelegateDeclarationSyntax)node).WithIdentifier(newIdentifier); 1131DelegateDeclarationSyntax) 1460else if (parentNode is DelegateDeclarationSyntax delegateDecl) 3434else if (container is DelegateDeclarationSyntax delegateDeclaration) 3482else if (container is DelegateDeclarationSyntax delegateDeclaration)
CodeModel\CSharpCodeModelService.NodeLocator.cs (4)
66return GetStartPoint(text, (DelegateDeclarationSyntax)node, part); 117return GetEndPoint(text, (DelegateDeclarationSyntax)node, part); 605private static VirtualTreePoint GetStartPoint(SourceText text, DelegateDeclarationSyntax node, EnvDTE.vsCMPart part) 1094private static VirtualTreePoint GetEndPoint(SourceText text, DelegateDeclarationSyntax node, EnvDTE.vsCMPart part)
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (2)
187var delegateDeclaration = (DelegateDeclarationSyntax)node;
CodeModel\CSharpCodeModelService_Prototype.cs (2)
63case DelegateDeclarationSyntax delegateDeclaration: 97private string GetDelegatePrototype(DelegateDeclarationSyntax node, INamedTypeSymbol symbol, PrototypeFlags flags)
CodeModel\SyntaxNodeExtensions.cs (1)
41else if (node is DelegateDeclarationSyntax delegateDeclaration)