21 overrides of IsExtensionMethod
Microsoft.CodeAnalysis.CSharp (21)
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
80public override bool IsExtensionMethod
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.SynthesizedMethodBase.cs (1)
89public sealed override bool IsExtensionMethod
Symbols\ErrorMethodSymbol.cs (1)
193public override bool IsExtensionMethod
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
821public override bool IsExtensionMethod => false;
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
994public override bool IsExtensionMethod
Symbols\ReducedExtensionMethodSymbol.cs (1)
417public override bool IsExtensionMethod
Symbols\SignatureOnlyMethodSymbol.cs (1)
135public override bool IsExtensionMethod { get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Source\LambdaSymbol.cs (1)
280public override bool IsExtensionMethod
Symbols\Source\LocalFunctionSymbol.cs (1)
329public override bool IsExtensionMethod
Symbols\Source\SourceMemberMethodSymbol.cs (1)
562public sealed override bool IsExtensionMethod
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
106public override bool IsExtensionMethod
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
198public override bool IsExtensionMethod
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
311public override bool IsExtensionMethod
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
201public sealed override bool IsExtensionMethod
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
248public sealed override bool IsExtensionMethod
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
84public override bool IsExtensionMethod
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
122public override bool IsExtensionMethod
Symbols\Synthesized\SynthesizedPropertySymbol.cs (1)
84public override bool IsExtensionMethod => false;
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
149public override bool IsExtensionMethod
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
263public override bool IsExtensionMethod
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
71public override bool IsExtensionMethod
61 references to IsExtensionMethod
Microsoft.CodeAnalysis.CSharp (61)
Binder\Binder.ValueChecks.cs (1)
2912Debug.Assert(methodInfo.Method?.IsExtensionMethod != false);
Binder\Binder_Await.cs (1)
728if (getResultMethod.IsExtensionMethod || getResultMethod.IsExtensionBlockMember())
Binder\Binder_Conversions.cs (1)
3688if (method.IsExtensionMethod)
Binder\Binder_Deconstruct.cs (1)
688for (int i = (deconstructMethod.IsExtensionMethod ? 1 : 0); i < parameters.Length; i++)
Binder\Binder_Expressions.cs (2)
8973if (method.IsExtensionMethod 11285bool memberCountsAsStatic = extensionMember is MethodSymbol { IsExtensionMethod: true } ? false : extensionMember.IsStatic;
Binder\Binder_Lookup.cs (1)
207bool isExtensionMethod = candidate is MethodSymbol { IsExtensionMethod: true };
Binder\Binder_Patterns.cs (1)
1681int skippedExtensionParameters = deconstructMethod?.IsExtensionMethod == true ? 1 : 0;
Binder\Binder_Statements.cs (1)
774if (disposeMethod is not null && (disposeMethod.IsExtensionMethod || disposeMethod.IsExtensionBlockMember()))
Binder\Binder_Symbols.cs (1)
1592if (symbol is MethodSymbol { IsExtensionMethod: true } extensionMethod)
Binder\ForEachLoopBinder.cs (13)
241if (getEnumeratorMethod.IsExtensionMethod) 591builder.GetEnumeratorInfo.Method.IsExtensionMethod || 885Debug.Assert(!builder.ViaExtensionMethod || builder.GetEnumeratorInfo.Method.IsExtensionMethod || builder.GetEnumeratorInfo.Method.IsExtensionBlockMember()); 932Debug.Assert(!builder.ViaExtensionMethod || builder.GetEnumeratorInfo.Method.IsExtensionMethod || builder.GetEnumeratorInfo.Method.IsExtensionBlockMember()); 1034Debug.Assert(!(viaExtensionMethod && builder.GetEnumeratorInfo.Method.IsExtensionMethod && builder.GetEnumeratorInfo.Method.Parameters.IsDefaultOrEmpty)); 1035Debug.Assert(!(viaExtensionMethod && !builder.GetEnumeratorInfo.Method.IsExtensionMethod && !builder.GetEnumeratorInfo.Method.IsExtensionBlockMember())); 1041if (builder.GetEnumeratorInfo.Method.IsExtensionMethod) 1213Debug.Assert(!patternDisposeMethod.IsExtensionMethod && !patternDisposeMethod.IsExtensionBlockMember(), 1464Debug.Assert(!result.IsExtensionMethod && !result.IsExtensionBlockMember()); 1545Debug.Assert(result.IsExtensionMethod || result.IsExtensionBlockMember()); 1559if (result.IsExtensionMethod) 1958Debug.Assert((extensionReceiverOpt != null) == (method.IsExtensionMethod || method.IsExtensionBlockMember())); 1968if (method.IsExtensionMethod)
Binder\RefSafetyAnalysis.cs (1)
686if (method.IsExtensionMethod)
Binder\Semantics\Conversions\Conversions.cs (2)
346Debug.Assert(method.IsExtensionMethod || method.IsExtensionBlockMember()); 350if (method.IsExtensionMethod)
Binder\Semantics\OverloadResolution\MethodGroup.cs (1)
54Debug.Assert(method.IsExtensionMethod || method.IsExtensionBlockMember());
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
616if (member is MethodSymbol { IsExtensionMethod: true })
Binder\UsingStatementBinder.cs (1)
203Debug.Assert(!disposeMethod.IsExtensionMethod && !disposeMethod.IsExtensionBlockMember(),
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
159if (!symbol.IsStatic || ((MethodSymbol)symbol).IsExtensionMethod)
Compilation\CSharpSemanticModel.cs (3)
1687if (symbol is MethodSymbol { IsExtensionMethod: true } extensionMethod) 4806if (call.InvokedAsExtensionMethod && method.IsExtensionMethod && method.MethodKind != MethodKind.ReducedExtension) 4823if (delegateCreation.IsExtensionMethod && method.IsExtensionMethod && (receiverOpt != null))
FlowAnalysis\AbstractFlowPass.cs (1)
1694return method.IsStatic && !method.IsExtensionMethod;
FlowAnalysis\NullableWalker.cs (4)
4099var argIndex = initializer.AddMethod.IsExtensionMethod ? 1 : 0; 4110if (!addMethod.IsExtensionMethod && !addMethod.IsExtensionBlockMember()) 12404&& (enumeratorMethodInfo.Method.IsExtensionMethod || enumeratorMethodInfo.Method.IsExtensionBlockMember())) 12476&& (getEnumeratorMethod.IsExtensionMethod || getEnumeratorMethod.IsExtensionBlockMember())
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
246if (enumeratorInfo.GetEnumeratorInfo.Method.IsExtensionMethod) // Tracked by https://github.com/dotnet/roslyn/issues/78828: Test this code path with new extensions
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
175Debug.Assert(method.IsExtensionMethod);
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
215var needToReduce = receiverOpt is not (null or BoundTypeExpression) && interceptor.IsExtensionMethod; 264if (invokedAsExtensionMethod && interceptor.IsStatic && !interceptor.IsExtensionMethod)
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
171if (getEnumeratorInfo.Method.IsExtensionMethod)
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (3)
103Debug.Assert(!elementInitializer.AddMethod.IsExtensionMethod); 185.Skip(addMethod.IsExtensionMethod ? 1 : 0) 232Debug.Assert(addMethod.IsExtensionMethod);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (2)
497if (method.IsExtensionMethod) 532invokedAsExtensionMethod: method.IsExtensionMethod);
Operations\CSharpOperationFactory.cs (1)
2013invokedAsExtensionMethod: info.Method.IsExtensionMethod
Symbols\MemberSymbolExtensions.cs (1)
272if (method.IsExtensionMethod)
Symbols\MethodSymbol.cs (2)
773if (!this.IsExtensionMethod || this.MethodKind == MethodKind.ReducedExtension || receiverType.IsVoidType()) 789return (this.IsExtensionMethod && this.MethodKind != MethodKind.ReducedExtension) ? ReducedExtensionMethodSymbol.Create(this) : null;
Symbols\NamedTypeSymbol.cs (1)
363if (method.IsExtensionMethod &&
Symbols\PublicModel\MethodSymbol.cs (1)
327bool IMethodSymbol.IsExtensionMethod => _underlying.IsExtensionMethod;
Symbols\ReducedExtensionMethodSymbol.cs (4)
40Debug.Assert(method.IsExtensionMethod && method.MethodKind != MethodKind.ReducedExtension); 75Debug.Assert(method.IsExtensionMethod && method.MethodKind != MethodKind.ReducedExtension); 95Debug.Assert(reducedFrom.IsExtensionMethod); 116Debug.Assert(method.IsExtensionMethod);
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1653if (addMethods[0].IsExtensionMethod || addMethods[0].IsExtensionBlockMember()) // No need to check other methods, extensions are never mixed with instance methods
Symbols\Source\SourceMethodSymbol.cs (1)
242if (target.IsExtensionMethod)
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
75return UnderlyingMethod.IsExtensionMethod;