5 implementations of DelegateInvokeMethod
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
81public abstract IMethodSymbol DelegateInvokeMethod { get; }
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\NamedTypeSymbol.cs (1)
107IMethodSymbol INamedTypeSymbol.DelegateInvokeMethod
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
71public IMethodSymbol DelegateInvokeMethod => _symbol.DelegateInvokeMethod;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamedTypeSymbol.vb (1)
1327Private ReadOnly Property INamedTypeSymbol_DelegateInvokeMethod As IMethodSymbol Implements INamedTypeSymbol.DelegateInvokeMethod
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
81public abstract IMethodSymbol DelegateInvokeMethod { get; }
111 references to DelegateInvokeMethod
Microsoft.CodeAnalysis.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ParameterSymbolKey.cs (1)
65var delegateInvoke = (eventSymbol.Type as INamedTypeSymbol)?.DelegateInvokeMethod;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
515return AreEquivalent(x.DelegateInvokeMethod, y.DelegateInvokeMethod, equivalentTypesWithDifferingAssemblies);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
194return GetHashCode(x.DelegateInvokeMethod, currentHash);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (1)
166var delegateInvokeMethod = typeInference.InferDelegateType(semanticModel, SimpleNameOrMemberAccessExpression, cancellationToken)?.DelegateInvokeMethod;
Microsoft.CodeAnalysis.CSharp (6)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (6)
247Debug.Assert(symbol.DelegateInvokeMethod is not null); 251var invokeMethod = symbol.DelegateInvokeMethod; 267AddReturnType(symbol.DelegateInvokeMethod); 450Debug.Assert(symbol.DelegateInvokeMethod is not null); 454var method = symbol.DelegateInvokeMethod; 591symbol.DelegateInvokeMethod != null;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (1)
42if (semanticModel.GetTypeInfo(declaration, cancellationToken).ConvertedType is not INamedTypeSymbol lambdaType || lambdaType.DelegateInvokeMethod == null)
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
116delegateType.DelegateInvokeMethod == null ||
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (2)
82if (lambdaType.DelegateInvokeMethod!.ReturnsVoid) 91var returnType = lambdaType.DelegateInvokeMethod.ReturnType;
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (3)
102var parameterList = GenerateParameterList(editor.Generator, anonymousFunction, delegateType.DelegateInvokeMethod); 111delegateType.DelegateInvokeMethod, parameterList, makeStatic); 188return WithNewParameterNames(directInvocation, delegateType.DelegateInvokeMethod, parameterList);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
230var invokeMethod = namedType.DelegateInvokeMethod;
Microsoft.CodeAnalysis.CSharp.Features (15)
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
267return [expressionType.DelegateInvokeMethod!.Parameters];
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (1)
397else if (namedTypeSymbol is { DelegateInvokeMethod.Parameters: var delegateInvokeParameters })
GenerateType\CSharpGenerateTypeService.cs (1)
462return ((INamedTypeSymbol)expressionType).DelegateInvokeMethod;
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (3)
127delegateType.DelegateInvokeMethod != null) 129if (delegateType.DelegateInvokeMethod.ReturnsVoid) 145var delegateReturnType = delegateType.DelegateInvokeMethod.ReturnType;
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_DelegateAndFunctionPointerInvoke.cs (1)
22var invokeMethod = delegateType.DelegateInvokeMethod;
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (1)
118var invokeMethod = type.DelegateInvokeMethod;
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (1)
42if (semanticModel.GetTypeInfo(declaration, cancellationToken).ConvertedType is not INamedTypeSymbol lambdaType || lambdaType.DelegateInvokeMethod == null)
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
116delegateType.DelegateInvokeMethod == null ||
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (2)
82if (lambdaType.DelegateInvokeMethod!.ReturnsVoid) 91var returnType = lambdaType.DelegateInvokeMethod.ReturnType;
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (3)
102var parameterList = GenerateParameterList(editor.Generator, anonymousFunction, delegateType.DelegateInvokeMethod); 111delegateType.DelegateInvokeMethod, parameterList, makeStatic); 188return WithNewParameterNames(directInvocation, delegateType.DelegateInvokeMethod, parameterList);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\DelegateTypeTests.cs (5)
905Assert.True(HaveMatchingSignatures(((INamedTypeSymbol)typeInfo.Type!).DelegateInvokeMethod!, method)); 948Assert.True(HaveMatchingSignatures(((INamedTypeSymbol)typeInfo.Type!).DelegateInvokeMethod!, method)); 8059Assert.True(HaveMatchingSignatures(((INamedTypeSymbol)typeInfo.Type!).DelegateInvokeMethod!, method)); 14354Assert.Equal(expectedInvokeMethod, delegateType.DelegateInvokeMethod.ToTestDisplayString()); 14370Assert.Equal(expectedInvokeMethod, type.DelegateInvokeMethod.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Symbols\Source\DelegateTests.cs (1)
136Assert.Equal(1, v.DelegateInvokeMethod.Parameters.Length);
Symbols\TypeTests.cs (2)
1702var paras = ((INamedTypeSymbol)memType).DelegateInvokeMethod.Parameters; 1716memType = ((INamedTypeSymbol)memType).DelegateInvokeMethod.ReturnType;
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
230var invokeMethod = namedType.DelegateInvokeMethod;
Microsoft.CodeAnalysis.Features (14)
ChangeSignature\AbstractChangeSignatureService.cs (6)
123containingType.DelegateInvokeMethod != null) 125symbol = containingType.DelegateInvokeMethod; 136if (typeSymbol.IsDelegateType() && typeSymbol.DelegateInvokeMethod != null) 138symbol = typeSymbol.DelegateInvokeMethod; 300if (eventSymbol.Type is INamedTypeSymbol type && type.DelegateInvokeMethod != null) 302symbolWithSemanticParameters = type.DelegateInvokeMethod;
Completion\Providers\AbstractDocCommentCompletionProvider.cs (1)
241var delegateInvokeMethod = namedType.DelegateInvokeMethod;
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
2458case SymbolKind.NamedType when oldMember is INamedTypeSymbol { DelegateInvokeMethod: { } oldInvokeMethod }: 2459var newInvokeMethod = ((INamedTypeSymbol)newMember).DelegateInvokeMethod;
EditAndContinue\Utilities\Extensions.cs (1)
164=> parameter.IsImplicitlyDeclared || parameter.ContainingSymbol.IsSynthesized() && parameter.ContainingSymbol != parameter.ContainingType.DelegateInvokeMethod;
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (1)
35var invokeMethod = anonymousType.DelegateInvokeMethod ?? throw ExceptionUtilities.Unreachable();
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
86symbol.DelegateInvokeMethod?.Accept(this);
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
71public IMethodSymbol DelegateInvokeMethod => _symbol.DelegateInvokeMethod;
Shared\Extensions\ISymbolExtensions_Sorting.cs (1)
147return type.DelegateInvokeMethod.Parameters;
Microsoft.CodeAnalysis.VisualBasic (5)
SymbolDisplay\SymbolDisplayVisitor.Types.vb (4)
119Dim invokeMethod = symbol.DelegateInvokeMethod 179Dim method = symbol.DelegateInvokeMethod 186Dim invokeMethod = symbol.DelegateInvokeMethod 201symbol.DelegateInvokeMethod IsNot Nothing
Symbols\NamedTypeSymbol.vb (1)
1327Private ReadOnly Property INamedTypeSymbol_DelegateInvokeMethod As IMethodSymbol Implements INamedTypeSymbol.DelegateInvokeMethod
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (2)
108Dim invoke = DirectCast([event].Type, INamedTypeSymbol)?.DelegateInvokeMethod 149parameterList:=ParameterGenerator.GenerateParameterList(eventType.DelegateInvokeMethod.Parameters.Select(Function(p) RemoveOptionalOrParamArray(p)).ToList(), options),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
134Dim invokeMethod = namedType.DelegateInvokeMethod
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (1)
33Dim delegateInvokeMethod = DirectCast(parameter.Type, INamedTypeSymbol).DelegateInvokeMethod
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (3)
EndConstructGeneration\EndConstructStatementVisitor_CustomEvents.vb (2)
52If type IsNot Nothing AndAlso type.DelegateInvokeMethod IsNot Nothing Then 53Dim parameterStrings = type.DelegateInvokeMethod.Parameters.Select(
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
166Dim delegateInvokeMethod = DirectCast(eventSymbol.Type, INamedTypeSymbol).DelegateInvokeMethod
Microsoft.CodeAnalysis.VisualBasic.Features (16)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
337Dim delegateInvokeMethod = DirectCast(DirectCast(semanticModel.GetSymbolInfo(raiseEventStatement.Name, cancellationToken).Symbol, IEventSymbol).Type, INamedTypeSymbol).DelegateInvokeMethod
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (6)
173If typeSymbol IsNot Nothing AndAlso typeSymbol.DelegateInvokeMethod IsNot Nothing Then 174delegateSymbol = typeSymbol.DelegateInvokeMethod 283Dim returnType = If(eventType.DelegateInvokeMethod IsNot Nothing, 284eventType.DelegateInvokeMethod.ReturnType, 287Dim parameters = If(eventType.DelegateInvokeMethod IsNot Nothing, 288eventType.DelegateInvokeMethod.Parameters,
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (1)
187Return SpecializedCollections.SingletonEnumerable(delegateType.DelegateInvokeMethod.Parameters.As(Of ISymbol)())
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (2)
357If namedTypeSymbol.DelegateInvokeMethod IsNot Nothing Then 358declaredParameters = namedTypeSymbol.DelegateInvokeMethod.Parameters
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
536If symbol Is symbol.ContainingType?.DelegateInvokeMethod Then
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
360DirectCast(e.Type, INamedTypeSymbol).DelegateInvokeMethod IsNot Nothing Then
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (1)
147Dim delegateInvokeMethod = DirectCast(parameter.Type, INamedTypeSymbol).DelegateInvokeMethod
SignatureHelp\InvocationExpressionSignatureHelpProvider.DelegateInvoke.vb (1)
21Dim invokeMethod = delegateType.DelegateInvokeMethod
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.DelegateType.vb (1)
19Dim invokeMethod = delegateType.DelegateInvokeMethod
SignatureHelp\RaiseEventStatementSignatureHelpProvider.vb (1)
123type.DelegateInvokeMethod.GetParameters().Select(Function(p) Convert(p, semanticModel, position, documentationCommentFormattingService)).ToList())
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (2)
108Dim invoke = DirectCast([event].Type, INamedTypeSymbol)?.DelegateInvokeMethod 149parameterList:=ParameterGenerator.GenerateParameterList(eventType.DelegateInvokeMethod.Parameters.Select(Function(p) RemoveOptionalOrParamArray(p)).ToList(), options),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
134Dim invokeMethod = namedType.DelegateInvokeMethod
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (1)
33Dim delegateInvokeMethod = DirectCast(parameter.Type, INamedTypeSymbol).DelegateInvokeMethod
Microsoft.CodeAnalysis.Workspaces (7)
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (2)
76if (parameter.ContainingSymbol is IMethodSymbol { AssociatedAnonymousDelegate.DelegateInvokeMethod: { } invokeMethod } && 225AddParameterAtIndex(results, ordinal, containingType.DelegateInvokeMethod?.Parameters);
Shared\Extensions\IMethodSymbolExtensions.cs (1)
23var invoke = delegateType.DelegateInvokeMethod;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ParameterSymbolKey.cs (1)
65var delegateInvoke = (eventSymbol.Type as INamedTypeSymbol)?.DelegateInvokeMethod;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
515return AreEquivalent(x.DelegateInvokeMethod, y.DelegateInvokeMethod, equivalentTypesWithDifferingAssemblies);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
194return GetHashCode(x.DelegateInvokeMethod, currentHash);
Microsoft.VisualStudio.LanguageServices (2)
Venus\ContainedLanguageCodeSupport.cs (2)
178if (eventType.Kind != SymbolKind.NamedType || ((INamedTypeSymbol)eventType).DelegateInvokeMethod == null) 189var invokeMethod = ((INamedTypeSymbol)eventType).DelegateInvokeMethod;
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService_Prototype.cs (2)
310builder.Append(GetAsStringForCodeTypeRef(symbol.DelegateInvokeMethod.ReturnType)); 351AppendParametersPrototype(builder, symbol.DelegateInvokeMethod.Parameters, flags);
ObjectBrowser\DescriptionBuilder.cs (1)
40var delegateInvokeMethod = typeSymbol.DelegateInvokeMethod;
Progression\CSharpProgressionLanguageService.cs (1)
121case INamedTypeSymbol n: return n.IsDelegateType() ? n.DelegateInvokeMethod.ReturnType : null;
Microsoft.VisualStudio.LanguageServices.VisualBasic (6)
CodeModel\VisualBasicCodeModelService.vb (1)
3117Dim invokeMethod = namedTypeSymbol.DelegateInvokeMethod
CodeModel\VisualBasicCodeModelService_Prototype.vb (3)
46Return GetFunctionPrototype(namedTypeSymbol, namedTypeSymbol.DelegateInvokeMethod.Parameters, flags) 51Dim parameters = If(eventType IsNot Nothing AndAlso eventType.DelegateInvokeMethod IsNot Nothing, 52eventType.DelegateInvokeMethod.Parameters,
ObjectBrowser\DescriptionBuilder.vb (2)
35Dim delegateInvokeMethod = typeSymbol.DelegateInvokeMethod 280Dim delegateInvokeMethod = CType(eventType, INamedTypeSymbol).DelegateInvokeMethod
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.cs (1)
66if (funcType.DelegateInvokeMethod?.ReturnType is INamedTypeSymbol returnType
System.Windows.Forms.Analyzers.VisualBasic (2)
Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.vb (2)
78If funcType.DelegateInvokeMethod?.ReturnType IsNot Nothing Then 79Dim returnType = TryCast(funcType.DelegateInvokeMethod.ReturnType, INamedTypeSymbol)