103 references to DelegateInvokeMethod
Microsoft.CodeAnalysis.CSharp (50)
Binder\Binder_Conversions.cs (4)
2283delegateMethod = delegateType.DelegateInvokeMethod; 2330var isSynthesized = delegateType.DelegateInvokeMethod?.OriginalDefinition is SynthesizedDelegateInvokeMethod; 2828Debug.Assert(delegateType is NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { HasUseSiteError: false } } 2834NamedTypeSymbol { DelegateInvokeMethod: { } invokeMethod } => invokeMethod,
Binder\Binder_Expressions.cs (4)
5474methodGroup.PopulateWithSingleMethod(argument, sourceDelegate.DelegateInvokeMethod); 5481argument.Syntax, default, WellKnownMemberNames.DelegateInvokeName, ImmutableArray.Create(sourceDelegate.DelegateInvokeMethod), 5482sourceDelegate.DelegateInvokeMethod, null, BoundMethodGroupFlags.None, functionType: null, argument, LookupResultKind.Viable); 5488sourceDelegate.DelegateInvokeMethod,
Binder\Binder_Invocation.cs (1)
634methodGroup.PopulateWithSingleMethod(boundExpression, delegateType.DelegateInvokeMethod);
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1308MethodSymbol invokeMethod = delegateType.DelegateInvokeMethod;
Binder\LocalBinderFactory.cs (1)
355if (delegateType.DelegateInvokeMethod is { } invokeMethod)
Binder\Semantics\Conversions\Conversions.cs (4)
58Debug.Assert(methodSymbol == ((NamedTypeSymbol)destination).DelegateInvokeMethod); 291MethodSymbol methodSymbol = delegateType.DelegateInvokeMethod; 399var delegateInvokeMethod = delegateType.DelegateInvokeMethod; 414var conversion = ToConversion(result, methodGroup, delegateType.DelegateInvokeMethod.ParameterCount);
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1478var invokeMethod = delegateType.DelegateInvokeMethod;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (8)
1085NamedTypeSymbol n => n.DelegateInvokeMethod, 1416Debug.Assert((object)delegateType.DelegateInvokeMethod != null && !delegateType.DelegateInvokeMethod.HasUseSiteError, 1418var returnType = delegateType.DelegateInvokeMethod.ReturnTypeWithAnnotations; 1466NamedTypeSymbol n => (n.DelegateInvokeMethod, false), 3065Debug.Assert((object)target.DelegateInvokeMethod != null && !target.DelegateInvokeMethod.HasUseSiteError, 3067Debug.Assert(!target.DelegateInvokeMethod.ReturnsVoid);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (5)
3273(object)(invoke = d.DelegateInvokeMethod) != null && 3555MethodSymbol invoke1 = d1.DelegateInvokeMethod; 3556MethodSymbol invoke2 = d2.DelegateInvokeMethod; 3683MethodSymbol invoke1 = d1.DelegateInvokeMethod; 3684MethodSymbol invoke2 = d2.DelegateInvokeMethod;
BoundTree\UnboundLambda.cs (3)
152delegateInvokeMethodOpt: delegateType?.DelegateInvokeMethod, 304var delegateReturnType = delegateType?.GetDelegateType()?.DelegateInvokeMethod?.ReturnType as NamedTypeSymbol; 656return delegateType.GetDelegateType()?.DelegateInvokeMethod;
Compilation\SyntaxTreeSemanticModel.cs (1)
2146var delegateInvoke = delegateType.DelegateInvokeMethod;
Compiler\ClsComplianceChecker.cs (3)
256CheckParameterCompliance(symbol.DelegateInvokeMethod.Parameters, symbol); 476MethodSymbol method = type.DelegateInvokeMethod; 747symbol = ((NamedTypeSymbol)symbol).DelegateInvokeMethod;
Compiler\DocumentationCommentCompiler.cs (1)
758MethodSymbol delegateInvoke = ((NamedTypeSymbol)symbol).DelegateInvokeMethod;
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
573parameters = typeSymbol.DelegateInvokeMethod.Parameters;
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
521return type.DelegateInvokeMethod is { } invokeMethod && 522otherType.DelegateInvokeMethod is { } otherInvokeMethod &&
FlowAnalysis\NullableWalker.cs (6)
3776var invokeMethod = n.DelegateInvokeMethod; 9168MethodSymbol? targetInvokeMethod = delegateType.DelegateInvokeMethod; 9362NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { Parameters: { } parameters } signature } => (signature, parameters), 10184delegateType.DelegateInvokeMethod is { } delegateInvokeMethod) 10258delegateType.DelegateInvokeMethod is { } delegateInvokeMethod && 10386var delegateInvokeMethod = delegateTypeOpt?.DelegateInvokeMethod;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
801return DelegateCreation(node.Argument, d.DelegateInvokeMethod, node.Type, false);
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
620(delegateInvoke = delegateTypeOverMethodTypeParameters.DelegateInvokeMethod) is null ||
Symbols\PublicModel\NamedTypeSymbol.cs (1)
111return UnderlyingNamedTypeSymbol.DelegateInvokeMethod.GetPublicSymbol();
Symbols\TypeSymbolExtensions.cs (1)
614return type.GetDelegateType()!.DelegateInvokeMethod;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (9)
Emit\EmitMetadataTests.cs (3)
2072var invoke = myDel.DelegateInvokeMethod; 2601var parameters = module.ContainingAssembly.GetTypeByMetadataName("D").DelegateInvokeMethod.Parameters; 2611var delegateParameters = module.ContainingAssembly.GetTypeByMetadataName("D").DelegateInvokeMethod.Parameters;
Emit\InAttributeModifierTests.cs (6)
1961var invokeParameter = type.DelegateInvokeMethod.Parameters.Single(); 1986var invokeMethod = type.DelegateInvokeMethod; 3671var parameter = module.ContainingAssembly.GetTypeByMetadataName("D").DelegateInvokeMethod.Parameters.Single(); 3704var method = module.ContainingAssembly.GetTypeByMetadataName("D").DelegateInvokeMethod; 3743var parameter = module.ContainingAssembly.GetTypeByMetadataName("D").DelegateInvokeMethod.Parameters.Single(); 3785var method = module.ContainingAssembly.GetTypeByMetadataName("D").DelegateInvokeMethod;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (16)
Attributes\AttributeTests_RefReadOnly.cs (4)
500var method = module.ContainingAssembly.GetTypeByMetadataName("D").DelegateInvokeMethod; 521var parameter = module.ContainingAssembly.GetTypeByMetadataName("D").DelegateInvokeMethod.GetParameters().Single(); 536var method = module.ContainingAssembly.GetTypeByMetadataName("D").DelegateInvokeMethod; 560var method = module.ContainingAssembly.GetTypeByMetadataName("D").DelegateInvokeMethod;
Attributes\AttributeTests_Tuples.cs (1)
347var invokeMethod = delegate1.DelegateInvokeMethod;
Semantics\ParamsCollectionTests.cs (11)
4210Assert.True(m.GlobalNamespace.GetTypeMember("<>f__AnonymousDelegate0").DelegateInvokeMethod.Parameters.Last().IsParams); 4466MethodSymbol delegateInvokeMethod1 = m.ContainingAssembly.GetTypeByMetadataName("<>f__AnonymousDelegate0").DelegateInvokeMethod; 4470MethodSymbol delegateInvokeMethod2 = m.ContainingAssembly.GetTypeByMetadataName("<>f__AnonymousDelegate1`1").DelegateInvokeMethod; 4528MethodSymbol delegateInvokeMethod1 = m.ContainingAssembly.GetTypeByMetadataName("<>f__AnonymousDelegate0").DelegateInvokeMethod; 4532MethodSymbol delegateInvokeMethod2 = m.ContainingAssembly.GetTypeByMetadataName("<>f__AnonymousDelegate1`1").DelegateInvokeMethod; 4625AssertEx.Equal("void <>f__AnonymousDelegate0.Invoke(params System.Collections.Generic.IEnumerable<System.Int64> arg)", m.ContainingAssembly.GetTypeByMetadataName("<>f__AnonymousDelegate0").DelegateInvokeMethod.ToTestDisplayString()); 4626AssertEx.Equal("void <>f__AnonymousDelegate1.Invoke(params System.Collections.Generic.List<System.Int64> arg)", m.ContainingAssembly.GetTypeByMetadataName("<>f__AnonymousDelegate1").DelegateInvokeMethod.ToTestDisplayString()); 4627AssertEx.Equal("void <>f__AnonymousDelegate2<T1>.Invoke(params T1[] arg)", m.ContainingAssembly.GetTypeByMetadataName("<>f__AnonymousDelegate2`1").DelegateInvokeMethod.ToTestDisplayString()); 4681MethodSymbol delegateInvokeMethod1 = m.ContainingAssembly.GetTypeByMetadataName("<>f__AnonymousDelegate0").DelegateInvokeMethod; 4685MethodSymbol delegateInvokeMethod2 = m.ContainingAssembly.GetTypeByMetadataName("<>f__AnonymousDelegate1`1").DelegateInvokeMethod; 4815MethodSymbol delegateInvokeMethod = delegateType.DelegateInvokeMethod;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Semantics\LambdaTests.cs (2)
8436AssertEx.Equal("TResult <>f__AnonymousDelegate0<T1, TResult>.Invoke(params T1[] arg)", lam1.DelegateInvokeMethod.ToTestDisplayString()); 8447AssertEx.Equal("TResult <>f__AnonymousDelegate1<T1, T2, TResult>.Invoke(T1 arg1, params T2[] arg2)", lam3.DelegateInvokeMethod.ToTestDisplayString());
Semantics\RefFieldTests.cs (8)
11183VerifyParameterSymbol(delegateType.DelegateInvokeMethod.Parameters[parameterIndex], $"{expectedDisplayType} arg{parameterIndex + 1}", expectedRefKind, expectedScope, expectedHasUnscopedRefAttributeInDelegate); 11220VerifyParameterSymbol(comp.GetMember<NamedTypeSymbol>("D1").DelegateInvokeMethod.Parameters[0], "scoped R r1", RefKind.None, ScopedKind.ScopedValue); 11221VerifyParameterSymbol(comp.GetMember<NamedTypeSymbol>("D2").DelegateInvokeMethod.Parameters[0], "scoped ref R r2", RefKind.Ref, ScopedKind.ScopedRef); 18014var delegateInvokeMethods = decls.Select(d => ((ILocalSymbol)model.GetDeclaredSymbol(d)).Type.GetSymbol<NamedTypeSymbol>().DelegateInvokeMethod).ToArray(); 25361VerifyParameterSymbol(delegateType.DelegateInvokeMethod.Parameters[parameterIndex], $"{expectedDisplayType} arg", expectedRefKind, expectedScope); 27411Assert.Equal(ScopedKind.None, type.DelegateInvokeMethod.Parameters.Single().EffectiveScope); 27463Assert.Equal(ScopedKind.None, type.DelegateInvokeMethod.Parameters.Single().EffectiveScope); 27515Assert.Equal(ScopedKind.None, type.DelegateInvokeMethod.Parameters.Single().EffectiveScope);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (18)
Symbols\Source\DelegateTests.cs (17)
75Assert.Equal(d.Locations[0], d.DelegateInvokeMethod.Locations[0], EqualityComparer<Location>.Default); 111var invoke = fieldType.DelegateInvokeMethod; 136Assert.Equal(1, v.DelegateInvokeMethod.Parameters.Length); 158var invoke = myDel.DelegateInvokeMethod; 214Assert.Equal(d.DelegateInvokeMethod.Parameters[0].Type, q); 340MethodSymbol invoke = d.DelegateInvokeMethod; 394MethodSymbol invoke = d.DelegateInvokeMethod; 425MethodSymbol invoke = d.DelegateInvokeMethod; 456MethodSymbol invoke = d.DelegateInvokeMethod; 490MethodSymbol invoke = d.DelegateInvokeMethod; 781Assert.True(d.DelegateInvokeMethod.ReturnsByRef); 782Assert.False(d.DelegateInvokeMethod.ReturnsByRefReadonly); 783Assert.Equal(RefKind.Ref, d.DelegateInvokeMethod.RefKind); 798Assert.False(d.DelegateInvokeMethod.ReturnsByRef); 799Assert.True(d.DelegateInvokeMethod.ReturnsByRefReadonly); 800Assert.Equal(RefKind.RefReadOnly, d.DelegateInvokeMethod.RefKind); 803Assert.Equal(RefKind.In, d.DelegateInvokeMethod.Parameters[0].RefKind);
Symbols\Source\FileModifierTests.cs (1)
2327var cInt = (ConstructedNamedTypeSymbol)del1.DelegateInvokeMethod.Parameters[0].Type;