64 overrides of IsStatic
Microsoft.CodeAnalysis.CSharp (64)
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
214
public override bool
IsStatic
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
124
public override bool
IsStatic
Symbols\AliasSymbol.cs (1)
175
public override bool
IsStatic
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (1)
181
public sealed override bool
IsStatic
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
136
public override bool
IsStatic
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
102
public override bool
IsStatic
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.SynthesizedMethodBase.cs (1)
64
public sealed override bool
IsStatic
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (1)
220
public sealed override bool
IsStatic
Symbols\ArrayTypeSymbol.cs (1)
426
public override bool
IsStatic
Symbols\AssemblySymbol.cs (1)
233
public sealed override bool
IsStatic
Symbols\DiscardSymbol.cs (1)
29
public override bool
IsStatic
=> false;
Symbols\DynamicTypeSymbol.cs (1)
93
public override bool
IsStatic
Symbols\ErrorMethodSymbol.cs (1)
69
public override bool
IsStatic
Symbols\ErrorPropertySymbol.cs (1)
68
public override bool
IsStatic
{ get { return false; } }
Symbols\ErrorTypeSymbol.cs (1)
386
public sealed override bool
IsStatic
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
829
public override bool
IsStatic
=> false;
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
83
public override bool
IsStatic
=> false;
Symbols\FunctionTypeSymbol.cs (1)
118
public override bool
IsStatic
=> false;
Symbols\LabelSymbol.cs (1)
76
public override bool
IsStatic
Symbols\LocalSymbol.cs (1)
158
public sealed override bool
IsStatic
Symbols\Metadata\PE\PEEventSymbol.cs (1)
320
public override bool
IsStatic
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
572
public override bool
IsStatic
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
596
public override bool
IsStatic
=> HasFlag(MethodAttributes.Static);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1653
public override bool
IsStatic
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
599
public override bool
IsStatic
Symbols\ModuleSymbol.cs (1)
125
public sealed override bool
IsStatic
Symbols\NamespaceSymbol.cs (1)
176
public sealed override bool
IsStatic
Symbols\ParameterSymbol.cs (1)
350
public override bool
IsStatic
Symbols\PointerTypeSymbol.cs (1)
38
public override bool
IsStatic
Symbols\RangeVariableSymbol.cs (1)
110
public override bool
IsStatic
Symbols\ReducedExtensionMethodSymbol.cs (1)
406
public override bool
IsStatic
Symbols\SignatureOnlyMethodSymbol.cs (1)
143
public override bool
IsStatic
{ get { return _isStatic; } }
Symbols\SignatureOnlyPropertySymbol.cs (1)
56
public override bool
IsStatic
{ get { return _isStatic; } }
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
45
public sealed override bool
IsStatic
Symbols\Source\LambdaSymbol.cs (1)
105
public override bool
IsStatic
=> _isStatic;
Symbols\Source\LocalFunctionSymbol.cs (1)
360
public override bool
IsStatic
=> (_declarationModifiers & DeclarationModifiers.Static) != 0;
Symbols\Source\SourceEventSymbol.cs (1)
378
public sealed override bool
IsStatic
Symbols\Source\SourceMemberContainerSymbol.cs (1)
841
public override bool
IsStatic
=> HasFlag(DeclarationModifiers.Static);
Symbols\Source\SourceMemberMethodSymbol.cs (1)
651
public sealed override bool
IsStatic
Symbols\Source\SourcePropertySymbolBase.cs (1)
563
public override bool
IsStatic
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
154
public override bool
IsStatic
=> false;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
57
public override bool
IsStatic
=> false;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
831
public override bool
IsStatic
=> false;
Symbols\Synthesized\SynthesizedContainer.cs (1)
152
public override bool
IsStatic
=> false;
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
233
public override bool
IsStatic
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
88
public override bool
IsStatic
=> false;
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
181
public override bool
IsStatic
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
176
public override bool
IsStatic
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
274
public override bool
IsStatic
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (1)
97
public override bool
IsStatic
=> false;
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
166
public override bool
IsStatic
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
79
public override bool
IsStatic
=> false;
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
223
public sealed override bool
IsStatic
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
104
public override bool
IsStatic
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
352
public override bool
IsStatic
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (1)
68
public override bool
IsStatic
=> _privateImplementationDetails.IsSealed && _privateImplementationDetails.IsAbstract;
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
101
public override bool
IsStatic
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
237
public override bool
IsStatic
Symbols\TypeParameterSymbol.cs (1)
216
public sealed override bool
IsStatic
Symbols\Wrapped\WrappedEventSymbol.cs (1)
94
public override bool
IsStatic
Symbols\Wrapped\WrappedFieldSymbol.cs (1)
200
public override bool
IsStatic
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
117
public override bool
IsStatic
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
153
public override bool
IsStatic
Symbols\Wrapped\WrappedPropertySymbol.cs (1)
116
public override bool
IsStatic
286 references to IsStatic
Microsoft.CodeAnalysis.CSharp (286)
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
291
treatAsInstanceMemberAccess = !(symbol.
IsStatic
|| symbol.Kind == SymbolKind.NamedType);
Binder\Binder.ValueChecks.cs (11)
1362
Debug.Assert(!fieldSymbol.
IsStatic
);
1394
if (fieldSymbol.
IsStatic
|| fieldSymbol.ContainingType.IsReferenceType)
1412
var fieldIsStatic = fieldSymbol.
IsStatic
;
1417
fieldIsStatic == containing.
IsStatic
&&
1477
if (fieldSymbol.
IsStatic
|| fieldSymbol.ContainingType.IsReferenceType)
1499
if (fieldSymbol.
IsStatic
|| fieldSymbol.ContainingType.IsReferenceType)
1524
if (eventSymbol.
IsStatic
|| eventSymbol.ContainingType.IsReferenceType)
3248
int index = (checkingReceiver ? 6 : 0) + (field.
IsStatic
? 3 : 0) + (kind == BindValueKind.RefReturn ? 0 : (RequiresRefOrOut(kind) ? 1 : 2));
3410
if (eventSymbol.
IsStatic
|| eventSymbol.ContainingType.IsReferenceType)
4123
if (fieldSymbol.
IsStatic
|| !fieldSymbol.ContainingType.IsRefLikeType)
4839
if (fieldSymbol.
IsStatic
|| !fieldSymbol.ContainingType.IsRefLikeType)
Binder\Binder_Attributes.cs (1)
622
invalidNamedArgument |= namedArgumentNameSymbol.
IsStatic
;
Binder\Binder_Await.cs (1)
159
if (((FieldSymbol)containingMemberOrLambda).
IsStatic
)
Binder\Binder_Constraints.cs (1)
601
else if (type.
IsStatic
)
Binder\Binder_Conversions.cs (6)
413
if (conversion.Method is MethodSymbol method && method.
IsStatic
)
602
IsStatic
: true,
634
IsStatic
: true,
667
IsStatic
: true,
1856
if (candidate is not MethodSymbol {
IsStatic
: true } method)
2919
if (!method.
IsStatic
)
Binder\Binder_Expressions.cs (23)
38
if (memberOpt?.
IsStatic
== true)
454
if (field is {
IsStatic
: false, RefKind: RefKind.None, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } } &&
1732
this.ContainingMember() is { Kind: not SymbolKind.NamedType,
IsStatic
: false } && // We are in an instance member
2224
this.ContainingMember() is not { Kind: not SymbolKind.NamedType,
IsStatic
: false } containingMember || // We are not in an instance member
2282
bool locationIsInstanceMember = !containingMember.
IsStatic
&&
2349
if (containingMember.
IsStatic
)
2710
bool hasErrors = !conversion.IsValid || targetType.
IsStatic
;
2739
if (targetType.
IsStatic
)
5470
if (type.
IsStatic
)
5508
if (type.
IsStatic
)
8270
left = ReplaceTypeOrValueReceiver(left, symbol.
IsStatic
|| symbol.Kind == SymbolKind.NamedType, diagnostics);
8522
var isEnumField = (fieldSymbol.
IsStatic
&& type.IsEnumType());
8591
if (!fieldSymbol.
IsStatic
)
8683
if (!propertySymbol.
IsStatic
)
8696
if (symbol.
IsStatic
&& (symbol.IsAbstract || symbol.IsVirtual))
8746
return !symbol.
IsStatic
&& !(symbol is TypeSymbol) &&
8765
if (!eventSymbol.
IsStatic
)
9848
receiver = ReplaceTypeOrValueReceiver(receiver, property.
IsStatic
, diagnostics);
10200
!getMethod.
IsStatic
&&
10490
if (!m.
IsStatic
) continue;
10495
if (m.
IsStatic
) continue;
10635
if (!memberMethod.
IsStatic
) continue;
10640
if (memberMethod.
IsStatic
) continue;
Binder\Binder_Operators.cs (4)
2389
if (methodOpt?.ContainingType?.IsInterface == true && methodOpt.
IsStatic
)
2599
if ((object)fieldSymbol == null || fieldSymbol.
IsStatic
|| (object)receiver == null)
3204
if (targetType.
IsStatic
)
3774
if (targetType.
IsStatic
)
Binder\Binder_Patterns.cs (1)
751
else if (patternType.
IsStatic
)
Binder\Binder_Statements.cs (5)
1339
!(patternMethodSymbol.ParameterCount == 0 || patternMethodSymbol.
IsStatic
&& patternMethodSymbol.ParameterCount == 1))
1769
var propertyIsStatic = propertySymbol.
IsStatic
;
1800
(member as FieldSymbol)?.
IsStatic
== isStatic;
3760
if (this.ContainingMember() is MethodSymbol {
IsStatic
: false } method)
3832
else if (baseType.IsErrorType() || baseType.
IsStatic
)
Binder\DecisionDagBuilder.cs (1)
535
int extensionExtra = method.
IsStatic
? 1 : 0;
Binder\ForEachLoopBinder.cs (3)
1445
if (result.
IsStatic
|| result.DeclaredAccessibility != Accessibility.Public)
1649
if (lookupSymbol.
IsStatic
|| lookupSymbol.DeclaredAccessibility != Accessibility.Public || lookupSymbol.Kind != SymbolKind.Property)
1682
moveNextMethodCandidate.Method.
IsStatic
|| moveNextMethodCandidate.Method.DeclaredAccessibility != Accessibility.Public ||
Binder\LockBinder.cs (1)
120
IsStatic
: false,
Binder\PatternExplainer.cs (1)
653
if (declaredMember is FieldSymbol { IsConst: true,
IsStatic
: true, DeclaredAccessibility: Accessibility.Public } field &&
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
631
if (result.Result.IsValid && !member.
IsStatic
)
Binder\WithUsingNamespacesAndTypesBinder.cs (2)
173
if (!symbol.
IsStatic
|| ((MethodSymbol)symbol).IsExtensionMethod)
187
if (!symbol.
IsStatic
)
BoundTree\Constructors.cs (1)
61
if (fieldSymbol.
IsStatic
||
CodeGen\CodeGenerator_HasHome.cs (3)
250
if (field.
IsStatic
)
252
return containingSymbol is MethodSymbol { MethodKind: MethodKind.StaticConstructor } or FieldSymbol {
IsStatic
: true };
256
return (containingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor } or FieldSymbol {
IsStatic
: false } or MethodSymbol { IsInitOnly: true }) &&
CodeGen\EmitAddress.cs (2)
369
if (!fieldAccess.FieldSymbol.
IsStatic
)
445
else if (fieldAccess.FieldSymbol.
IsStatic
)
CodeGen\EmitConversion.cs (2)
313
var isStatic = receiver == null || (!isExtensionMethod && method.
IsStatic
);
354
if (!method.
IsStatic
&& method.IsMetadataVirtual() && !method.ContainingType.IsDelegateType() && !receiver.SuppressVirtualCalls)
CodeGen\EmitExpression.cs (11)
1132
if (!field.IsVolatile && !field.
IsStatic
&& fieldAccess.ReceiverOpt.Type.IsVerifierValue() && field.RefKind == RefKind.None)
1158
if (field.
IsStatic
)
1247
if (!field.
IsStatic
&& EmitFieldLoadReceiverAddress(fieldAccess.ReceiverOpt))
1301
if (field.
IsStatic
|| field.RefKind != RefKind.None)
1383
if (!sym.ContainingSymbol.
IsStatic
)
1661
Debug.Assert(method.
IsStatic
);
1827
Debug.Assert(!method.
IsStatic
&& !method.IsDefaultValueTypeConstructor() && method.RequiresInstanceReceiver);
2301
if (!method.IsMetadataVirtual() || method.
IsStatic
)
2788
else if (!left.FieldSymbol.
IsStatic
)
3290
_builder.EmitOpCode(field.
IsStatic
? ILOpCode.Stsfld : ILOpCode.Stfld);
4104
if ((load.TargetMethod.IsAbstract || load.TargetMethod.IsVirtual) && load.TargetMethod.
IsStatic
)
CodeGen\EmitStatement.cs (1)
1157
Debug.Assert(!left.FieldSymbol.
IsStatic
, "Not supported");
CodeGen\Optimizer.cs (3)
1102
return !((BoundFieldAccess)lhs).FieldSymbol.
IsStatic
;
1168
Debug.Assert(method.
IsStatic
);
1346
if (!field.
IsStatic
)
Compilation\CSharpSemanticModel.cs (2)
3746
if (containingMember.
IsStatic
)
4087
if (ReferenceEquals(type, null) || type.
IsStatic
)
Compilation\InitializerSemanticModel.cs (1)
281
type.IsNullableEnabledForConstructorsAndInitializers(useStatic: MemberSymbol.
IsStatic
);
Compiler\MethodBodySynthesizer.cs (1)
280
field.
IsStatic
? null : new BoundThisReference(syntax, accessor.ThisParameter.Type),
Compiler\MethodBodySynthesizer.Lowered.cs (1)
465
BoundExpression invocation = F.Call(methodToInvoke.
IsStatic
? null : (useBaseReference ? (BoundExpression)F.Base(baseType: methodToInvoke.ContainingType) : F.This()),
Emitter\Model\FieldSymbolAdapter.cs (1)
231
return AdaptedFieldSymbol.
IsStatic
;
Emitter\Model\MethodSymbolAdapter.cs (1)
476
return AdaptedMethodSymbol.
IsStatic
;
Emitter\Model\NamedTypeSymbolAdapter.cs (2)
1000
return this.IsAbstract || this.
IsStatic
;
1009
return this.IsSealed || this.
IsStatic
;
Emitter\NoPia\EmbeddedTypesManager.cs (1)
458
(containerKind == TypeKind.Struct && (field.AdaptedFieldSymbol.
IsStatic
|| field.AdaptedFieldSymbol.DeclaredAccessibility != Accessibility.Public)))
FlowAnalysis\AbstractFlowPass.cs (2)
1638
return method.
IsStatic
&& !method.IsExtensionMethod;
2235
!fieldSymbol.
IsStatic
&&
FlowAnalysis\DefiniteAssignment.cs (8)
340
case MethodSymbol {
IsStatic
: false, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } } and
356
case (FieldSymbol or PropertySymbol) and {
IsStatic
: false, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } }:
1081
if (fieldSymbol.
IsStatic
)
1093
if (eventSymbol.
IsStatic
)
1112
if (propSymbol.
IsStatic
)
1139
!fieldSymbol.
IsStatic
&&
1492
if (fieldSymbol.ContainingType.IsReferenceType || fieldSymbol.
IsStatic
) return null;
1839
if (!current.
IsStatic
&&
FlowAnalysis\EmptyStructTypeCache.cs (2)
140
if (member.
IsStatic
)
179
if (!includeStatic && member.
IsStatic
)
FlowAnalysis\NullableWalker.cs (19)
707
if (member.
IsStatic
!= isStatic)
803
if (member.
IsStatic
!= method.
IsStatic
)
896
|| method.
IsStatic
1191
if (member.
IsStatic
)
1471
Binder.BindFieldInitializers(compilation, null, method.
IsStatic
? containingType.StaticInitializers : containingType.InstanceInitializers, BindingDiagnosticBag.Discarded, ref discardedInitializers);
2016
if (fieldSymbol.
IsStatic
)
2029
if (eventSymbol.
IsStatic
)
2041
if (propSymbol.
IsStatic
)
2210
&& constructor.
IsStatic
== symbol.
IsStatic
)
2212
if ((constructor.
IsStatic
&& containingSlot == 0 && constructor.ContainingType.Equals(symbol.ContainingType))
2213
|| (!constructor.
IsStatic
&& containingSlot > 0 && _variables[containingSlot].Symbol is ThisParameterSymbol))
7154
int receiverSlot = receiverOpt is not null && !method.
IsStatic
7176
if (method.
IsStatic
)
7185
if (container.
IsStatic
)
7248
if (member.
IsStatic
)
7978
if (!method.
IsStatic
)
11746
if (!@event.
IsStatic
)
FlowAnalysis\ReadWriteWalker.cs (2)
104
if (!current.
IsStatic
&&
172
if (expr.FieldSymbol.
IsStatic
) return;
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (2)
485
method.
IsStatic
&&
513
!property.
IsStatic
&&
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
425
return methodSymbol.
IsStatic
Lowering\ClosureConversion\ClosureConversion.cs (3)
849
return (!_currentMethod.
IsStatic
&& TypeSymbol.Equals(_currentMethod.ContainingType, _topLevelMethod.ContainingType, TypeCompareKind.ConsiderEverything2))
1366
Debug.Assert(node.TargetMethod is { RequiresInstanceReceiver: false,
IsStatic
: true });
1381
remappedMethod is { RequiresInstanceReceiver: false,
IsStatic
: true });
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
810
var receiver = node.FieldSymbol.
IsStatic
? _bound.Null(ExpressionType) : Visit(node.ReceiverOpt);
1103
var receiver = node.PropertySymbol.
IsStatic
? _bound.Null(ExpressionType) : Visit(node.ReceiverOpt);
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (1)
110
Debug.Assert(!(originalMethod is LocalFunctionSymbol) || !originalMethod.
IsStatic
|| IsStatic);
Lowering\DiagnosticsPass_ExpressionTrees.cs (8)
351
else if ((method.IsAbstract || method.IsVirtual) && method.
IsStatic
)
511
if (_inExpressionLambda && node.AddMethod.
IsStatic
)
552
if (_inExpressionLambda && (property.IsAbstract || property.IsVirtual) && property.
IsStatic
)
710
if (((binary.IsAbstract || binary.IsVirtual) && binary.
IsStatic
) || ((unary.IsAbstract || unary.IsVirtual) && unary.
IsStatic
))
741
if (_inExpressionLambda && node.MethodOpt is MethodSymbol method && (method.IsAbstract || method.IsVirtual) && method.
IsStatic
)
838
if (_inExpressionLambda && node.Conversion.Method is MethodSymbol method && (method.IsAbstract || method.IsVirtual) && method.
IsStatic
)
888
else if (method is not null && (method.IsAbstract || method.IsVirtual) && method.
IsStatic
)
Lowering\DiagnosticsPass_Warnings.cs (4)
136
if (receiver == null || fieldAccess.FieldSymbol.
IsStatic
)
211
(field1.FieldSymbol.
IsStatic
|| IsSameLocalOrField(field1.ReceiverOpt, field2.ReceiverOpt));
216
(event1.EventSymbol.
IsStatic
|| IsSameLocalOrField(event1.ReceiverOpt, event2.ReceiverOpt));
260
else if ((method.IsAbstract || method.IsVirtual) && method.
IsStatic
)
Lowering\InitializerRewriter.cs (1)
94
var boundReceiver = field.
IsStatic
? null :
Lowering\Instrumentation\ModuleCancellationInstrumenter.cs (2)
184
if (member.
IsStatic
== methodDefinition.
IsStatic
&&
Lowering\LocalRewriter\DelegateCacheRewriter.cs (1)
41
return targetMethod.
IsStatic
&& !boundDelegateCreation.IsExtensionMethod;
Lowering\LocalRewriter\LocalRewriter.cs (4)
770
if (_factory.CurrentFunction?.
IsStatic
== false)
925
if (!lhsField.
IsStatic
&& lhsField.ContainingType.IsStructType())
1056
if (eventAccess.EventSymbol.
IsStatic
)
1068
if (!fieldAccess.FieldSymbol.
IsStatic
)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
171
!method.
IsStatic
&&
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
172
if (method.
IsStatic
)
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
201
Debug.Assert(receiverOpt is not BoundTypeExpression || method.
IsStatic
);
248
if (invokedAsExtensionMethod && interceptor.
IsStatic
&& !interceptor.IsExtensionMethod)
449
if (method.
IsStatic
&&
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
926
else if (asSpanMethod is MethodSymbol {
IsStatic
: true, ParameterCount: 1 })
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
184
if (receiverOpt == null || propertyOrEvent.
IsStatic
|| !CanChangeValueBetweenReads(receiverOpt))
464
if (fieldOrEvent.
IsStatic
)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
556
constrainedToTypeOpt: symbolOpt.
IsStatic
&&
Lowering\LocalRewriter\LocalRewriter_Event.cs (3)
91
Debug.Assert(eventSymbol.
IsStatic
|| rewrittenReceiverOpt is { });
92
if (!eventSymbol.
IsStatic
&& CanChangeValueBetweenReads(rewrittenReceiverOpt!))
243
fieldSymbol.
IsStatic
? null : rewrittenReceiver,
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
358
var getPinnableCall = getPinnableMethod.
IsStatic
?
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (1)
14
Debug.Assert(_factory.TopLevelMethod is {
IsStatic
: false });
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (1)
201
if (method.
IsStatic
&& method.ContainingType.SpecialType == SpecialType.System_String)
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
191
Debug.Assert(addMethod.
IsStatic
);
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (1)
16
Debug.Assert(_factory.TopLevelMethod is {
IsStatic
: false });
Lowering\LocalRewriter\LocalRewriter_Range.cs (2)
184
Debug.Assert(constructionMethod.
IsStatic
);
193
Debug.Assert(constructionMethod.
IsStatic
);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
173
if (method.
IsStatic
&& method.ContainingType.SpecialType == SpecialType.System_String)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
496
return !((BoundFieldAccess)expression).FieldSymbol.
IsStatic
;
Lowering\MethodToClassRewriter.cs (1)
743
Debug.Assert(!methodBeingWrapped.
IsStatic
);
Lowering\SpillSequenceSpiller.cs (3)
407
if (fieldSymbol.
IsStatic
)
882
if (field.FieldSymbol.
IsStatic
) break;
920
if (!field.FieldSymbol.
IsStatic
)
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
64
if (!method.
IsStatic
&& method.ContainingType.TypeKind == TypeKind.Struct)
242
case BoundFieldAccess { FieldSymbol: {
IsStatic
: false, ContainingType: { IsValueType: true } }, ReceiverOpt: BoundExpression receiver }:
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
602
if (field.FieldSymbol.
IsStatic
)
Lowering\StateMachineRewriter\StateMachineRewriter.cs (3)
311
if (!method.
IsStatic
)
444
if (method.
IsStatic
|| method.ThisParameter.Type.IsReferenceType)
466
if (!method.
IsStatic
)
Lowering\SyntheticBoundNodeFactory.cs (7)
216
Debug.Assert(CurrentFunction is {
IsStatic
: false });
227
Debug.Assert(CurrentFunction is {
IsStatic
: false });
267
Debug.Assert((receiverOpt is null) == property.
IsStatic
);
282
Debug.Assert((receiverOpt is null) == property.
IsStatic
);
802
Debug.Assert(methodSymbol.
IsStatic
);
810
Debug.Assert(methodSymbol.
IsStatic
);
820
Debug.Assert(methodSymbol.
IsStatic
);
Operations\CSharpOperationFactory.cs (6)
463
if (targetMember.
IsStatic
&& (targetMember.IsAbstract || targetMember.IsVirtual) &&
602
return boundObjectInitializerMember.MemberSymbol?.
IsStatic
== true ?
905
IOperation? createReceiver() => memberSymbol?.
IsStatic
== true ?
1376
if (operatorMethod is not null && operatorMethod.
IsStatic
&& (operatorMethod.IsAbstract || operatorMethod.IsVirtual) &&
2924
=> symbol?.
IsStatic
== false ? new InstanceReferenceOperation(InstanceReferenceKind.PatternInput, _semanticModel, nameSyntax!, receiverType, isImplicit: true) : null;
2943
Debug.Assert(!patternDisposeInfo.Method.
IsStatic
);
Operations\CSharpOperationFactory_Methods.cs (1)
106
if (symbol != null && symbol.
IsStatic
&& instance.WasCompilerGenerated && instance.Kind == BoundKind.ThisReference)
Symbols\AssemblySymbol.cs (1)
501
return GetSpecialType(SpecialType.System_Runtime_CompilerServices_RuntimeFeature) is { TypeKind: TypeKind.Class,
IsStatic
: true } &&
Symbols\BaseTypeAnalysis.cs (1)
118
if (fieldType is null || fieldType.TypeKind != TypeKind.Struct || field.
IsStatic
)
Symbols\Compilation_WellKnownMembers.cs (1)
295
if (member.Kind != targetSymbolKind || member.
IsStatic
!= isStatic ||
Symbols\ConstraintsHelper.cs (2)
1387
if (m.
IsStatic
&& m.IsImplementableInterfaceMember() && iface.FindImplementationForInterfaceMember(m) is null)
1398
if (m.
IsStatic
&& m.IsImplementableInterfaceMember() && iface.FindImplementationForInterfaceMember(m) is null)
Symbols\EventSymbol.cs (1)
81
public virtual bool RequiresInstanceReceiver => !
IsStatic
;
Symbols\FieldSymbol.cs (1)
101
public virtual bool RequiresInstanceReceiver => !
IsStatic
;
Symbols\MemberSignatureComparer.cs (1)
858
return member.
IsStatic
? 0 : Cci.CallingConvention.HasThis;
Symbols\MethodSymbol.cs (4)
91
public virtual bool RequiresInstanceReceiver => !
IsStatic
;
369
protected bool IsValidReadOnlyTarget => !
IsStatic
&& ContainingType.IsStructType() && MethodKind != MethodKind.Constructor && !IsInitOnly;
719
return
IsStatic
&& !IsAbstract && !IsVirtual && Name == WellKnownMemberNames.EntryPointMethodName;
1040
if (!
IsStatic
|| IsAbstract || IsVirtual || MethodKind is not (MethodKind.Ordinary or MethodKind.LocalFunction))
Symbols\MethodSymbolExtensions.cs (1)
218
return !method.
IsStatic
&&
Symbols\NamedTypeSymbol.cs (1)
696
if (!symbol.
IsStatic
)
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
1022
if (!method.IsMetadataVirtual(ignoreInterfaceImplementationChanges) || method.
IsStatic
)
Symbols\PropertySymbol.cs (1)
138
public virtual bool RequiresInstanceReceiver => !
IsStatic
;
Symbols\PublicModel\Symbol.cs (1)
215
get { return UnderlyingSymbol.
IsStatic
; }
Symbols\Retargeting\RetargetingSymbolTranslator.cs (2)
1024
method.
IsStatic
,
1092
property.
IsStatic
,
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
368
if (implementedMember.
IsStatic
&& !implementingMember.ContainingAssembly.RuntimeSupportsStaticAbstractMembersInInterfaces)
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1601
if (addMethods[0].
IsStatic
) // No need to check other methods, extensions are never mixed with instance methods
Symbols\Source\SourceConstructorSymbol.cs (1)
175
else if (ContainingType.
IsStatic
&& methodKind == MethodKind.Constructor)
Symbols\Source\SourceEventSymbol.cs (1)
583
else if (ContainingType.
IsStatic
&& !IsStatic)
Symbols\Source\SourceMemberContainerSymbol.cs (12)
1389
if (member.
IsStatic
)
2399
if (field is null || field.
IsStatic
)
2713
if (f is null || !f.
IsStatic
|| f.Type.TypeKind != TypeKind.Struct) continue;
2742
if (f is null || !f.
IsStatic
|| f.Type.TypeKind != TypeKind.Struct) continue;
3398
if (member.
IsStatic
||
4335
if (deconstruct.
IsStatic
)
4559
else if (existingMember is FieldSymbol {
IsStatic
: false } field
4568
else if (existingMember is PropertySymbol {
IsStatic
: false, GetMethod: { } } prop
4776
else if (symbol.
IsStatic
)
5050
builder.UpdateIsNullableEnabledForConstructorsAndFields(useStatic: backingField.
IsStatic
, compilation, propertySyntax);
5108
builder.UpdateIsNullableEnabledForConstructorsAndFields(useStatic: associatedField.
IsStatic
, compilation, declarator);
5112
if (associatedField.
IsStatic
)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1820
if (!interfaceMethod.
IsStatic
)
Symbols\Source\SourceMemberFieldSymbol.cs (1)
53
else if (type.
IsStatic
)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (3)
749
else if (this is { MethodKind: MethodKind.LocalFunction,
IsStatic
: false })
827
if (!implementationPart.IsExtern || !implementationPart.
IsStatic
)
965
if (!
IsStatic
|| ParameterCount > 0 || !ReturnsVoid || IsAbstract || IsVirtual)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1472
if (!field.
IsStatic
)
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
383
if (baseType.
IsStatic
)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
230
else if (!ContainingType.IsScriptClass && !(ContainingType.
IsStatic
&& ContainingType.Arity == 0))
842
else if (ReturnType.
IsStatic
)
896
else if (ContainingType.
IsStatic
&& !IsStatic)
Symbols\Source\SourcePropertySymbolBase.cs (2)
1120
else if (ContainingType.
IsStatic
&& !IsStatic)
1847
if (type.
IsStatic
)
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (3)
64
if (this.ContainingType.
IsStatic
)
262
if (returnType.Type.
IsStatic
)
281
if (this.ContainingType.
IsStatic
)
Symbols\Symbol.cs (1)
1762
get { return this.
IsStatic
; }
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
163
IsStatic
: false,
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (2)
52
if (!field.
IsStatic
)
146
return member is MethodSymbol {
IsStatic
: false, ParameterCount: 1, Arity: 0 } method &&
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (1)
46
candidate.ReturnType.SpecialType == SpecialType.System_Boolean && !candidate.
IsStatic
&&
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (2)
77
if (_equalityContract.
IsStatic
|| !_equalityContract.Type.Equals(DeclaringCompilation.GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.AllIgnoreOptions))
134
if (!f.
IsStatic
)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (2)
64
if (_equalityContract.
IsStatic
)
96
if (!f.
IsStatic
)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
326
return m.DeclaredAccessibility == Accessibility.Public && !m.
IsStatic
;
Symbols\Synthesized\SynthesizedExplicitImplementationForwardingMethod.cs (1)
48
public override bool IsStatic => _implementingMethod.
IsStatic
;
Symbols\Synthesized\SynthesizedInstanceMethodSymbol.cs (1)
47
Debug.Assert(!
IsStatic
);
Symbols\TypeSymbol.cs (12)
913
(!interfaceMember.
IsStatic
|| implementingTypeIsFromSomeCompilation))
1013
else if (!interfaceMember.
IsStatic
)
1608
interfaceMethod.
IsStatic
,
1625
bool isStatic = implicitImpl.
IsStatic
;
1696
else if (implicitImplMethod.
IsStatic
&& implicitImplMethod.MethodKind == MethodKind.Ordinary && implicitImplMethod.GetUnmanagedCallersOnlyAttributeData(forceComplete: true) is not null)
1738
if (implicitImpl.
IsStatic
&& interfaceMember.ContainingModule != implementingType.ContainingModule)
1986
if (closestMismatch.
IsStatic
!= interfaceMember.
IsStatic
)
1988
diagnostics.Add(closestMismatch.
IsStatic
? ErrorCode.ERR_CloseUnimplementedInterfaceMemberStatic : ErrorCode.ERR_CloseUnimplementedInterfaceMemberNotStatic,
2235
if (candidateMember.DeclaredAccessibility != Accessibility.Public || candidateMember.
IsStatic
!= interfaceMember.
IsStatic
)
2525
if (!field.
IsStatic
)
Symbols\TypeWithAnnotations.cs (2)
899
internal override bool IsStatic(TypeSymbol typeSymbol) => typeSymbol.
IsStatic
;
972
internal override bool IsStatic(TypeSymbol typeSymbol) => typeSymbol.
IsStatic
;
Symbols\VarianceSafety.cs (2)
174
if (member.
IsStatic
&& !member.IsAbstract && !member.IsVirtual)
472
if (!(context is TypeSymbol) && context.
IsStatic
&& !context.IsAbstract && !context.IsVirtual)
Symbols\Wrapped\WrappedEventSymbol.cs (1)
98
return _underlyingEvent.
IsStatic
;
Symbols\Wrapped\WrappedFieldSymbol.cs (1)
204
return _underlyingField.
IsStatic
;
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
121
return UnderlyingMethod.
IsStatic
;
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
157
return _underlyingType.
IsStatic
;
Symbols\Wrapped\WrappedPropertySymbol.cs (1)
120
return _underlyingProperty.
IsStatic
;