1 write to Method
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
6154this.Method = method;
135 references to Method
Microsoft.CodeAnalysis.CSharp (135)
Binder\Binder.ValueChecks.cs (16)
852return CheckMethodReturnValueKind(call.Method, call.Syntax, node, valueKind, checkingReceiver, diagnostics); 870return CheckMethodReturnValueKind(sliceAccess.Method, sliceAccess.Syntax, node, valueKind, checkingReceiver, diagnostics); 3422var methodSymbol = call.Method; 3429MethodInfo.Create(call.Method), 3505var methodSymbol = call.Method; 3512MethodInfo.Create(call.Method), 3739var methodSymbol = call.Method; 3822var methodSymbol = call.Method; 4137MethodInfo.Create(call.Method), 4140call.Method.Parameters, 4207MethodInfo.Create(call.Method), 4210call.Method.Parameters, 4845var methodSymbol = call.Method; 4933var methodSymbol = call.Method; 5641if (part is not BoundCall { Method.Name: BoundInterpolatedString.AppendFormattedMethod } call) 5655call.Method.Parameters[0].EffectiveScope == ScopedKind.ScopedValue)
Binder\Binder_Await.cs (4)
95if ((object)call.Method != null && call.Method.IsAsync) 348var getAwaiterMethod = call.Method; 456getResultMethod = call.Method;
Binder\Binder_Deconstruct.cs (1)
683var deconstructMethod = ((BoundCall)result).Method;
Binder\Binder_Expressions.cs (1)
6473boundCall.Method,
Binder\Binder_InterpolatedString.cs (1)
983if (call is BoundCall { Method: { ReturnType: var returnType } method })
Binder\Binder_Invocation.cs (4)
1050if (call.ReceiverOpt.Type.IsRestrictedType() && !call.Method.ContainingType.IsInterface && !TypeSymbol.Equals(call.Method.ContainingType, call.ReceiverOpt.Type, TypeCompareKind.ConsiderEverything2)) 1052SymbolDistinguisher distinguisher = new SymbolDistinguisher(compilation, call.ReceiverOpt.Type, call.Method.ContainingType); 1058SymbolDistinguisher distinguisher = new SymbolDistinguisher(compilation, this.ContainingType, call.Method.ContainingType);
Binder\Binder_Query.cs (4)
328result.ReceiverOpt, result.InitialBindingReceiverIsSubjectToCloning, result.Method, arguments.ToImmutableAndFree(), argumentNamesOpt: default, 472invocation = invocation.Update(invocation.ReceiverOpt, invocation.InitialBindingReceiverIsSubjectToCloning, invocation.Method, arguments); 541invocation = invocation.Update(invocation.ReceiverOpt, invocation.InitialBindingReceiverIsSubjectToCloning, invocation.Method, arguments); 632invocation.Method,
Binder\Binder_Statements.cs (2)
1710BoundImplicitIndexerAccess { IndexerOrSliceAccess: BoundCall call } => call.Method, 4160var patternMethodSymbol = call.Method;
Binder\RefSafetyAnalysis.cs (2)
658var method = node.Method; 939var deconstructMethod = invocation.Method;
Binder\Semantics\Conversions\Conversion.cs (1)
502return call.Method;
BoundTree\BoundExpression.cs (1)
263return this.Method;
BoundTree\BoundExpressionExtensions.cs (1)
34return ((BoundCall)node).Method.RefKind;
BoundTree\BoundNode_Source.cs (1)
221append(call.Method.Name);
BoundTree\BoundNodeExtensions.cs (1)
60MethodSymbol method = call!.Method;
BoundTree\BoundTreeWalker.cs (3)
39if (call != null && (object)call.Method != null) 42if (call.Method.Name == "Select") 46else if (call.Method.Name == "GroupBy")
BoundTree\Constructors.cs (1)
160return this.Update(ReceiverOpt, InitialBindingReceiverIsSubjectToCloning, Method, arguments, ArgumentNamesOpt, ArgumentRefKindsOpt, IsDelegateCall, Expanded, InvokedAsExtensionMethod, ArgsToParamsOpt, DefaultArguments, ResultKind, OriginalMethodsOpt, Type);
CodeGen\CodeGenerator_HasHome.cs (1)
98var methodRefKind = ((BoundCall)expression).Method.RefKind;
CodeGen\EmitAddress.cs (1)
179var methodRefKind = call.Method.RefKind;
CodeGen\EmitExpression.cs (11)
1620if (call.Method.IsDefaultValueTypeConstructor()) 1624else if (!call.Method.RequiresInstanceReceiver) 1637var method = call.Method; 1657var method = call.Method; 1739var methodRefKind = call.Method.RefKind; 1825var method = call.Method; 1942var method = call.Method; 2073if (call.ReceiverOpt is BoundCall { Method: { RequiresInstanceReceiver: true } method } receiver && !method.IsDefaultValueTypeConstructor()) 2220return ((BoundCall)receiver).Method.RefKind != RefKind.None; 2931Debug.Assert(left.Method.RefKind != RefKind.None); 3133Debug.Assert(((BoundCall)expression).Method.RefKind != RefKind.None);
CodeGen\Optimizer.cs (6)
1057Debug.Assert(((BoundCall)lhs).Method.RefKind == RefKind.Ref, "only ref returning methods are assignable"); 1157MethodSymbol method = node.Method; 1188var rewrittenArguments = VisitArguments(node.Arguments, node.Method.Parameters, node.ArgumentRefKindsOpt); 1189return node.Update(receiver, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, node.Method, rewrittenArguments); 2255if (node.Method.RequiresInstanceReceiver) 2281return node.Update(receiverOpt, node.InitialBindingReceiverIsSubjectToCloning, node.Method, arguments, node.ArgumentNamesOpt, node.ArgumentRefKindsOpt, node.IsDelegateCall, node.Expanded, node.InvokedAsExtensionMethod, node.ArgsToParamsOpt, node.DefaultArguments, node.ResultKind, node.OriginalMethodsOpt, type);
Compilation\CSharpSemanticModel.cs (3)
3441if ((object)call.Method != null) 4266if (invocation != null && invocation.Expression.SkipParens() == ((ExpressionSyntax)boundNode.Syntax).SkipParens() && (object)call.Method != null) 4786var method = call.Method;
Compiler\MethodCompiler.cs (4)
1867expressionStatement.Expression is BoundCall { Method: var initMethod } && initMethod.IsDefaultValueTypeConstructor(); 2360if (ctorCall != null && !ctorCall.HasAnyErrors && ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2)) 2363compilationState.ReportCtorInitializerCycles(method, ctorCall.Method, ctorCall.Syntax, diagnostics);
FlowAnalysis\AbstractFlowPass.cs (6)
1336bool callsAreOmitted = node.Method.CallsAreOmitted(node.SyntaxTree); 1358VisitReceiverBeforeCall(node.ReceiverOpt, node.Method); 1370VisitReceiverBeforeCall(node.ReceiverOpt, node.Method); 1385if (node.Method?.OriginalDefinition is LocalFunctionSymbol localFunc) 1390VisitArgumentsAfterCall(node.Arguments, node.ArgumentRefKindsOpt, node.Method); 1391VisitReceiverAfterCall(node.ReceiverOpt, node.Method);
FlowAnalysis\NullableWalker.cs (8)
1461return constructorBody is BoundConstructorMethodBody { Initializer: BoundExpressionStatement { Expression: BoundCall { Method: { MethodKind: MethodKind.Constructor } initializerMethod } } } 6214CheckCallReceiver(receiver, receiverType, node.Method); 6222var annotations = GetCorrespondingParameter(0, node.Method.Parameters, node.ArgsToParamsOpt, node.Expanded, ref paramsIterationType).Annotations; 6269CheckCallReceiver(receiver, receiverType, node.Method); 6277var method = node.Method; 6301SetUpdatedSymbol(node, node.Method, method); 6917if (node is BoundCall { Method: { OriginalDefinition: LocalFunctionSymbol localFunction } }) 10157var deconstructMethod = invocation?.Method;
FlowAnalysis\NullableWalker_Patterns.cs (1)
851BoundCall call => AsMemberOfType(inputType, call.Method).GetTypeOrReturnType(),
Generated\BoundNodes.xml.Generated.cs (4)
6187if (receiverOpt != this.ReceiverOpt || initialBindingReceiverIsSubjectToCloning != this.InitialBindingReceiverIsSubjectToCloning || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || isDelegateCall != this.IsDelegateCall || expanded != this.Expanded || invokedAsExtensionMethod != this.InvokedAsExtensionMethod || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || resultKind != this.ResultKind || originalMethodsOpt != this.OriginalMethodsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 11743return node.Update(receiverOpt, node.InitialBindingReceiverIsSubjectToCloning, node.Method, arguments, node.ArgumentNamesOpt, node.ArgumentRefKindsOpt, node.IsDelegateCall, node.Expanded, node.InvokedAsExtensionMethod, node.ArgsToParamsOpt, node.DefaultArguments, node.ResultKind, node.OriginalMethodsOpt, type); 13931MethodSymbol method = GetUpdatedSymbol(node, node.Method); 16388new TreeDumperNode("method", node.Method, null),
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (2)
460if (node.Method.MethodKind == MethodKind.LocalFunction) 463AddIfCaptured(node.Method.OriginalDefinition, node.Syntax);
Lowering\ClosureConversion\ClosureConversion.cs (2)
1071if (node.Method.MethodKind == MethodKind.LocalFunction) 1081node.Method,
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
646var method = node.Method;
Lowering\DiagnosticsPass_ExpressionTrees.cs (4)
470VisitCall(node.Method, null, node.Arguments, node.ArgumentRefKindsOpt, node.ArgumentNamesOpt, node.DefaultArguments, node); 471CheckReferenceToMethodIfLocalFunction(node, node.Method); 480VisitCall(node.Method, null, node.Arguments, node.ArgumentRefKindsOpt, node.ArgumentNamesOpt, node.DefaultArguments, node); 482CheckReferenceToMethodIfLocalFunction(node, node.Method);
Lowering\LocalRewriter\LocalRewriter.cs (1)
1087return ((BoundCall)expr).Method.RefKind != RefKind.None;
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (2)
155node.Method.MethodKind == MethodKind.LocalFunction || 159MethodMayMutateReceiver(node.ReceiverOpt, node.Method);
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
383MethodSymbol method = node.Method;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
699Debug.Assert(((BoundCall)originalLHS).Method.RefKind != RefKind.None); 916var method = call.Method;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (2)
1381if (call.Method.ReturnType.IsValidNullableTypeArgument()) 1383Debug.Assert(resultType.IsNullableType() && TypeSymbol.Equals(resultType.GetNullableUnderlyingType(), call.Method.ReturnType, TypeCompareKind.ConsiderEverything2));
Lowering\LocalRewriter\LocalRewriter_ExpressionStatement.cs (1)
64if (call.Method.CallsAreOmitted(call.SyntaxTree))
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (1)
199var method = boundCall.Method;
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (7)
172var method = boundCall.Method; 218if ((object)sequenceCall.Method == _compilation.GetSpecialTypeMember(SpecialMember.System_String__Concat_2ReadOnlySpans) || 219(object)sequenceCall.Method == _compilation.GetSpecialTypeMember(SpecialMember.System_String__Concat_3ReadOnlySpans) || 220(object)sequenceCall.Method == _compilation.GetSpecialTypeMember(SpecialMember.System_String__Concat_4ReadOnlySpans)) 235case BoundCall { Method: var argMethod, Arguments: [var singleArgument] } when (object)argMethod == _compilation.GetSpecialTypeMember(SpecialMember.System_String__op_Implicit_ToReadOnlySpanOfChar): 435(object)potentialToStringCall.Method.GetLeastOverriddenMethod(charType) == _compilation.GetSpecialTypeMember(SpecialMember.System_Object__ToString)) 626if (expr is BoundCall { Type.SpecialType: SpecialType.System_String, Method: { Name: "ToString" } method, ReceiverOpt: { Type: NamedTypeSymbol { SpecialType: SpecialType.System_Char } charType, ConstantValueOpt.IsChar: true } } call &&
Lowering\MethodToClassRewriter.cs (3)
231var rewrittenMethodSymbol = VisitMethodSymbol(node.Method); 239== node.Method.IsMetadataVirtual(MethodSymbol.IsMetadataVirtualOption.ForceCompleteIfNeeded)); 244if (BaseReferenceInReceiverWasRewritten(node.ReceiverOpt, rewrittenReceiver) && node.Method.IsMetadataVirtual())
Lowering\SpillSequenceSpiller.cs (12)
439if (call.Method.OriginalDefinition is SynthesizedInlineArrayFirstElementRefMethod or SynthesizedInlineArrayFirstElementRefReadOnlyMethod) 444else if (call.Method.OriginalDefinition is SynthesizedInlineArrayElementRefMethod or SynthesizedInlineArrayElementRefReadOnlyMethod) 448else if (call.Method.OriginalDefinition == _F.Compilation.GetWellKnownTypeMember(WellKnownMember.System_Span_T__get_Item) || 449call.Method.OriginalDefinition == _F.Compilation.GetWellKnownTypeMember(WellKnownMember.System_ReadOnlySpan_T__get_Item)) 454call.Method, 458else if (call.Method.OriginalDefinition is SynthesizedInlineArrayAsSpanMethod or SynthesizedInlineArrayAsReadOnlySpanMethod) 462else if (call.Method.OriginalDefinition == _F.Compilation.GetWellKnownTypeMember(WellKnownMember.System_Span_T__Slice_Int_Int) || 463call.Method.OriginalDefinition == _F.Compilation.GetWellKnownTypeMember(WellKnownMember.System_ReadOnlySpan_T__Slice_Int_Int)) 468call.Method, 471else if (call.Method == _F.Compilation.GetSpecialTypeMember(SpecialMember.System_String__op_Implicit_ToReadOnlySpanOfChar)) 1026else if (node.Method.RequiresInstanceReceiver) 1068return UpdateExpression(builder, node.Update(receiver, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, node.Method, arguments));
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
642Debug.Assert(call.Method.RefKind != RefKind.None); 643F.Diagnostics.Add(ErrorCode.ERR_RefReturningCallAndAwait, F.Syntax.Location, call.Method);
Operations\CSharpOperationFactory.cs (2)
442MethodSymbol targetMethod = boundCall.Method; 2450BoundCall { Method.Name: var name } => name,
Operations\CSharpOperationFactory_Methods.cs (1)
235return DeriveArguments(boundCall.Method,