20 overrides of IsExtensionMethod
Microsoft.CodeAnalysis.CSharp (20)
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
80
public override bool
IsExtensionMethod
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.SynthesizedMethodBase.cs (1)
89
public sealed override bool
IsExtensionMethod
Symbols\ErrorMethodSymbol.cs (1)
189
public override bool
IsExtensionMethod
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
821
public override bool
IsExtensionMethod
=> false;
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
965
public override bool
IsExtensionMethod
Symbols\ReducedExtensionMethodSymbol.cs (1)
416
public override bool
IsExtensionMethod
Symbols\SignatureOnlyMethodSymbol.cs (1)
133
public override bool
IsExtensionMethod
{ get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Source\LambdaSymbol.cs (1)
264
public override bool
IsExtensionMethod
Symbols\Source\LocalFunctionSymbol.cs (1)
320
public override bool
IsExtensionMethod
Symbols\Source\SourceMemberMethodSymbol.cs (1)
562
public sealed override bool
IsExtensionMethod
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
103
public override bool
IsExtensionMethod
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
196
public override bool
IsExtensionMethod
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
307
public override bool
IsExtensionMethod
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
201
public sealed override bool
IsExtensionMethod
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
248
public sealed override bool
IsExtensionMethod
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
84
public override bool
IsExtensionMethod
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
121
public override bool
IsExtensionMethod
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
149
public override bool
IsExtensionMethod
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
261
public override bool
IsExtensionMethod
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
69
public override bool
IsExtensionMethod
61 references to IsExtensionMethod
Microsoft.CodeAnalysis.CSharp (61)
Binder\Binder_Await.cs (1)
457
if (getResultMethod.
IsExtensionMethod
|| getResultMethod.GetIsNewExtensionMember())
Binder\Binder_Conversions.cs (1)
2985
if (method.
IsExtensionMethod
)
Binder\Binder_Deconstruct.cs (1)
686
for (int i = (deconstructMethod.
IsExtensionMethod
? 1 : 0); i < parameters.Length; i++) // Tracked by https://github.com/dotnet/roslyn/issues/76130: Test this code path with new extensions
Binder\Binder_Expressions.cs (2)
8722
if (method.
IsExtensionMethod
11074
bool memberCountsAsStatic = extensionMember is MethodSymbol {
IsExtensionMethod
: true } ? false : extensionMember.IsStatic;
Binder\Binder_Patterns.cs (1)
1061
int skippedExtensionParameters = deconstructMethod?.
IsExtensionMethod
== true ? 1 : 0; // Tracked by https://github.com/dotnet/roslyn/issues/76130: Test this code path with new extensions
Binder\Binder_Statements.cs (1)
769
if (disposeMethod is not null && (disposeMethod.
IsExtensionMethod
|| disposeMethod.GetIsNewExtensionMember()))
Binder\ForEachLoopBinder.cs (12)
241
if (getEnumeratorMethod.
IsExtensionMethod
)
581
builder.GetEnumeratorInfo.Method.
IsExtensionMethod
||
873
Debug.Assert(!builder.ViaExtensionMethod || builder.GetEnumeratorInfo.Method.
IsExtensionMethod
|| builder.GetEnumeratorInfo.Method.GetIsNewExtensionMember());
920
Debug.Assert(!builder.ViaExtensionMethod || builder.GetEnumeratorInfo.Method.
IsExtensionMethod
|| builder.GetEnumeratorInfo.Method.GetIsNewExtensionMember());
1031
Debug.Assert(!(viaExtensionMethod && builder.GetEnumeratorInfo.Method.
IsExtensionMethod
&& builder.GetEnumeratorInfo.Method.Parameters.IsDefaultOrEmpty));
1032
Debug.Assert(!(viaExtensionMethod && !builder.GetEnumeratorInfo.Method.
IsExtensionMethod
&& !builder.GetEnumeratorInfo.Method.GetIsNewExtensionMember()));
1038
if (builder.GetEnumeratorInfo.Method.
IsExtensionMethod
)
1226
Debug.Assert(!patternDisposeMethod.
IsExtensionMethod
&& !patternDisposeMethod.GetIsNewExtensionMember());
1548
Debug.Assert(result.
IsExtensionMethod
|| result.GetIsNewExtensionMember());
1562
if (result.
IsExtensionMethod
)
1955
Debug.Assert((extensionReceiverOpt != null) == method.
IsExtensionMethod
);
1964
if (method.
IsExtensionMethod
)
Binder\RefSafetyAnalysis.cs (1)
607
if (method.
IsExtensionMethod
) // Tracked by https://github.com/dotnet/roslyn/issues/76130: Test this code path with new extensions
Binder\Semantics\Conversions\Conversions.cs (2)
333
Debug.Assert(method.
IsExtensionMethod
|| method.GetIsNewExtensionMember());
337
if (method.
IsExtensionMethod
)
Binder\Semantics\OverloadResolution\MethodGroup.cs (1)
54
Debug.Assert(method.
IsExtensionMethod
|| method.GetIsNewExtensionMember());
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
613
if (member is MethodSymbol {
IsExtensionMethod
: true })
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
198
if (!symbol.IsStatic || ((MethodSymbol)symbol).
IsExtensionMethod
) // Tracked by https://github.com/dotnet/roslyn/issues/76130: Test this code path with new extensions
Compilation\CSharpSemanticModel.cs (3)
1668
if (symbol is MethodSymbol {
IsExtensionMethod
: true } extensionMethod)
4790
if (call.InvokedAsExtensionMethod && method.
IsExtensionMethod
&& method.MethodKind != MethodKind.ReducedExtension)
4807
if (delegateCreation.IsExtensionMethod && method.
IsExtensionMethod
&& (receiverOpt != null))
FlowAnalysis\AbstractFlowPass.cs (1)
1645
return method.IsStatic && !method.
IsExtensionMethod
; // Tracked by https://github.com/dotnet/roslyn/issues/76130: Test this code path with new extensions
FlowAnalysis\NullableWalker.cs (2)
11078
if (enumeratorInfoOpt?.GetEnumeratorInfo is { Method: {
IsExtensionMethod
: true, Parameters: var parameters } } enumeratorMethodInfo) // Tracked by https://github.com/dotnet/roslyn/issues/76130: Test this code path with new extensions
11145
bool reportedDiagnostic = enumeratorInfoOpt?.GetEnumeratorInfo.Method is {
IsExtensionMethod
: true } // Tracked by https://github.com/dotnet/roslyn/issues/76130: Test this code path with new extensions
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
234
if (enumeratorInfo.GetEnumeratorInfo.Method.
IsExtensionMethod
) // Tracked by https://github.com/dotnet/roslyn/issues/76130: Test this code path with new extensions
Lowering\ExtensionMethodReferenceRewriter.cs (8)
174
{ Name: nameof(VisitTypeOfOperator) } => method is { Name: "GetTypeFromHandle",
IsExtensionMethod
: false }, // GetTypeFromHandle cannot be an extension method
175
{ Name: nameof(VisitRefTypeOperator) } => method is { Name: "GetTypeFromHandle",
IsExtensionMethod
: false }, // GetTypeFromHandle cannot be an extension method
176
{ Name: nameof(VisitReadOnlySpanFromArray) } => method is { Name: "op_Implicit",
IsExtensionMethod
: false }, // Conversion operator from array to span cannot be an extension method
179
{ Name: nameof(VisitUnaryOperator) } => !method.
IsExtensionMethod
, // Expression tree context. At the moment an operator cannot be an extension method
180
{ Name: nameof(VisitUserDefinedConditionalLogicalOperator) } => !method.
IsExtensionMethod
, // Expression tree context. At the moment an operator cannot be an extension method
181
{ Name: nameof(VisitCollectionElementInitializer) } => !method.
IsExtensionMethod
, // Expression tree context. At the moment an extension method cannot be used in expression tree here.
182
{ Name: nameof(VisitAwaitableInfo) } => method is { Name: "GetResult",
IsExtensionMethod
: false }, // Cannot be an extension method
235
(!node.Method.
IsExtensionMethod
&& !node.Method.GetIsNewExtensionMember())); // Expression tree context. At the moment an operator cannot be an extension method
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
174
Debug.Assert(method.
IsExtensionMethod
);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (2)
167
if (getEnumeratorInfo.Method.
IsExtensionMethod
)
184
allowExtensionAndOptionalParameters: isAsync || getEnumeratorInfo.Method.
IsExtensionMethod
|| getEnumeratorInfo.Method.GetIsNewExtensionMember(), firstRewrittenArgument: firstRewrittenArgument);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (3)
103
Debug.Assert(!elementInitializer.AddMethod.
IsExtensionMethod
);
185
.Skip(addMethod.
IsExtensionMethod
? 1 : 0)
232
Debug.Assert(addMethod.
IsExtensionMethod
);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (2)
497
if (method.
IsExtensionMethod
)
532
invokedAsExtensionMethod: method.
IsExtensionMethod
);
Operations\CSharpOperationFactory.cs (1)
1947
invokedAsExtensionMethod: info.Method.
IsExtensionMethod
Symbols\MemberSymbolExtensions.cs (1)
196
if (method.
IsExtensionMethod
)
Symbols\MethodSymbol.cs (2)
757
if (!this.
IsExtensionMethod
|| this.MethodKind == MethodKind.ReducedExtension || receiverType.IsVoidType())
772
return (this.
IsExtensionMethod
&& this.MethodKind != MethodKind.ReducedExtension) ? ReducedExtensionMethodSymbol.Create(this) : null;
Symbols\NamedTypeSymbol.cs (1)
353
if (method.
IsExtensionMethod
&&
Symbols\PublicModel\MethodSymbol.cs (1)
313
bool IMethodSymbol.IsExtensionMethod => _underlying.
IsExtensionMethod
;
Symbols\ReducedExtensionMethodSymbol.cs (4)
39
Debug.Assert(method.
IsExtensionMethod
&& method.MethodKind != MethodKind.ReducedExtension);
74
Debug.Assert(method.
IsExtensionMethod
&& method.MethodKind != MethodKind.ReducedExtension);
94
Debug.Assert(reducedFrom.
IsExtensionMethod
);
115
Debug.Assert(method.
IsExtensionMethod
);
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1591
if (addMethods[0].
IsExtensionMethod
|| addMethods[0].GetIsNewExtensionMember()) // No need to check other methods, extensions are never mixed with instance methods
Symbols\Source\SourceMethodSymbol.cs (1)
196
if (target.
IsExtensionMethod
)
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
73
return UnderlyingMethod.
IsExtensionMethod
;