61 references to IsExtension
Microsoft.CodeAnalysis.CSharp (61)
Binder\Binder_Expressions.cs (1)
507
|| this.ContainingMemberOrLambda is TypeSymbol {
IsExtension
: true });
Binder\Binder_NameConflicts.cs (2)
70
if (tp.ContainingSymbol is NamedTypeSymbol {
IsExtension
: true })
90
if (parameters[0] is { ContainingSymbol: NamedTypeSymbol {
IsExtension
: true }, Name: var receiverName } && receiverName == name)
Binder\Binder_Statements.cs (1)
3858
if (containingType.IsStructType() || containingType.IsEnumType() || containingType.
IsExtension
)
Binder\Binder_Symbols.cs (1)
353
&& containing is not TypeSymbol {
IsExtension
: true })
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
785
if (typeSymbol.
IsExtension
)
Binder\InMethodBinder.cs (1)
295
if (parameter.ContainingSymbol is NamedTypeSymbol {
IsExtension
: true })
Binder\Semantics\AccessCheck.cs (2)
332
containingType.
IsExtension
&& containingType.ContainingType is { } extensionEnclosingType ? extensionEnclosingType : containingType,
699
return containingType.
IsExtension
? ErrorCode.ERR_ProtectedInExtension
Binder\WithClassTypeParametersBinder.cs (1)
70
if (_namedType.
IsExtension
)
Compilation\SyntaxTreeSemanticModel.cs (1)
1405
if (symbol is TypeSymbol {
IsExtension
: true } && symbol.HasLocationContainedWithin(this.SyntaxTree, declarationSpan, out var wasZeroWidthMatch))
Compiler\MethodCompiler.cs (1)
541
if (containingType.
IsExtension
&&
Emitter\Model\NamedTypeSymbolAdapter.cs (2)
290
if (AdaptedNamedTypeSymbol.IsScriptClass || AdaptedNamedTypeSymbol.
IsExtension
) // Tracked by https://github.com/dotnet/roslyn/issues/76130 : we should have checked the presence of System.Object
782
if (AdaptedNamedTypeSymbol.
IsExtension
)
Emitter\Model\PEModuleBuilder.cs (4)
2096
Debug.Assert(container is not NamedTypeSymbol {
IsExtension
: true } || nestedType.GetInternalSymbol() is FixedFieldImplementationType);
2102
Debug.Assert(container is not NamedTypeSymbol {
IsExtension
: true });
2108
Debug.Assert(container is not NamedTypeSymbol {
IsExtension
: true });
2114
Debug.Assert(container is not NamedTypeSymbol {
IsExtension
: true });
FlowAnalysis\NullableWalker.cs (1)
6739
if (parameter.ContainingSymbol is TypeSymbol {
IsExtension
: true })
Lowering\LocalRewriter\DelegateCacheContainer.cs (1)
34
(owner.ContainingType is {
IsExtension
: true } extensionType ? extensionType.TypeParameters : []).Concat(
Lowering\LocalRewriter\DelegateCacheRewriter.cs (2)
152
if (enclosingSymbol is NamedTypeSymbol {
IsExtension
: true, Arity: > 0 })
193
if (enclosingSymbol is NamedTypeSymbol {
IsExtension
: true, Arity: > 0 } extensionType &&
Lowering\LocalRewriter\DynamicSiteContainer.cs (2)
19
(topLevelMethod.ContainingSymbol is NamedTypeSymbol {
IsExtension
: true } extensionType ? extensionType.TypeParameters : []).Concat(
31
if (containingSymbol is NamedTypeSymbol {
IsExtension
: true })
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
28
Debug.Assert(extensionType.
IsExtension
);
Symbols\MemberSymbolExtensions.cs (3)
88
return member.ContainingSymbol is TypeSymbol {
IsExtension
: true };
96
return member.ContainingSymbol is TypeSymbol {
IsExtension
: true };
101
return member.ContainingSymbol is TypeSymbol {
IsExtension
: true };
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1437
if (diagnosticInfo == null && _containingType.
IsExtension
&&
Symbols\NamespaceSymbol.cs (1)
366
if (nestedType.
IsExtension
)
Symbols\PublicModel\TypeSymbol.cs (2)
29
if (UnderlyingTypeSymbol.
IsExtension
)
153
bool ITypeSymbol.IsExtension => UnderlyingTypeSymbol.
IsExtension
;
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
116
Debug.Assert(this.
IsExtension
);
Symbols\Source\SourceDestructorSymbol.cs (1)
31
if (syntax.Identifier.ValueText != containingType.Name && !containingType.
IsExtension
)
Symbols\Source\SourceMemberContainerSymbol.cs (5)
1341
if (!t.
IsExtension
)
1811
else if (
IsExtension
)
1913
if (
IsExtension
)
2347
if (
IsExtension
)
2373
IEnumerable<IGrouping<ExtensionGroupingKey, NamedTypeSymbol>> extensionsByReceiverType = GetTypeMembers("").Where(static t => t.
IsExtension
).GroupBy(static t => new ExtensionGroupingKey(t));
Symbols\Source\SourceMemberMethodSymbol.cs (1)
397
if (containingType is {
IsExtension
: true, ContainingType: { } enclosing })
Symbols\Source\SourceNamedTypeSymbol.cs (3)
1822
return
IsExtension
1981
if (
IsExtension
&& ContainingType?.
IsExtension
!= true)
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (4)
33
if (!
IsExtension
)
57
if (!
IsExtension
)
75
Debug.Assert(this.
IsExtension
);
113
Debug.Assert(
IsExtension
);
Symbols\Source\SourceNamespaceSymbol.cs (1)
316
if (nts?.
IsExtension
== true) continue;
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
705
bool isExtension = containingType.
IsExtension
;
921
else if (ContainingType is {
IsExtension
: true, ExtensionParameter.Name: "" } && !IsStatic)
1163
if (tpEnclosing.ContainingSymbol is NamedTypeSymbol {
IsExtension
: true })
Symbols\Source\SourceParameterSymbol.cs (1)
111
Debug.Assert((owner.Kind == SymbolKind.Method) || (owner.Kind == SymbolKind.Property) || owner is TypeSymbol {
IsExtension
: true });
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
557
else if (ContainingType.
IsExtension
&& IsInitOnly)
Symbols\Source\SourcePropertySymbol.cs (3)
382
bool isExtension = containingType.
IsExtension
;
593
if (containingType is {
IsExtension
: true, ContainingType: { } enclosing })
676
if (containingTypeForFileTypeCheck is {
IsExtension
: true, ContainingType: { } enclosing })
Symbols\Source\SourcePropertySymbolBase.cs (1)
1135
else if (ContainingType is {
IsExtension
: true, ExtensionParameter.Name: "" } && !IsStatic)
Symbols\SubstitutedNamedTypeSymbol.cs (1)
510
if (!this.
IsExtension
)
Symbols\Symbol.cs (2)
651
if (namedType.IsSubmissionClass || namedType.
IsExtension
)
1745
&& variable is ParameterSymbol { ContainingSymbol: TypeSymbol {
IsExtension
: true } })
Symbols\SymbolExtensions.cs (1)
825
return parameter.ContainingSymbol is TypeSymbol {
IsExtension
: true };