64 overrides of IsStatic
Microsoft.CodeAnalysis.CSharp (58)
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
214public override bool IsStatic
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
124public override bool IsStatic
Symbols\AliasSymbol.cs (1)
175public override bool IsStatic
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (1)
179public sealed override bool IsStatic
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
136public override bool IsStatic
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
102public override bool IsStatic
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.SynthesizedMethodBase.cs (1)
64public sealed override bool IsStatic
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (1)
213public sealed override bool IsStatic
Symbols\ArrayTypeSymbol.cs (1)
425public override bool IsStatic
Symbols\AssemblySymbol.cs (1)
231public sealed override bool IsStatic
Symbols\DiscardSymbol.cs (1)
29public override bool IsStatic => false;
Symbols\DynamicTypeSymbol.cs (1)
93public override bool IsStatic
Symbols\ErrorMethodSymbol.cs (1)
69public override bool IsStatic
Symbols\ErrorPropertySymbol.cs (1)
68public override bool IsStatic { get { return false; } }
Symbols\ErrorTypeSymbol.cs (1)
384public sealed override bool IsStatic
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
813public override bool IsStatic => false;
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
83public override bool IsStatic => false;
Symbols\FunctionTypeSymbol.cs (1)
118public override bool IsStatic => false;
Symbols\LabelSymbol.cs (1)
76public override bool IsStatic
Symbols\LocalSymbol.cs (1)
158public sealed override bool IsStatic
Symbols\Metadata\PE\PEEventSymbol.cs (1)
320public override bool IsStatic
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
570public override bool IsStatic
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
568public override bool IsStatic => HasFlag(MethodAttributes.Static);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1640public override bool IsStatic
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
505public override bool IsStatic
Symbols\ModuleSymbol.cs (1)
125public sealed override bool IsStatic
Symbols\NamespaceSymbol.cs (1)
175public sealed override bool IsStatic
Symbols\ParameterSymbol.cs (1)
341public override bool IsStatic
Symbols\PointerTypeSymbol.cs (1)
38public override bool IsStatic
Symbols\RangeVariableSymbol.cs (1)
112public override bool IsStatic
Symbols\ReducedExtensionMethodSymbol.cs (1)
398public override bool IsStatic
Symbols\SignatureOnlyMethodSymbol.cs (1)
137public override bool IsStatic { get { return _isStatic; } }
Symbols\SignatureOnlyPropertySymbol.cs (1)
56public override bool IsStatic { get { return _isStatic; } }
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
45public sealed override bool IsStatic
Symbols\Source\LambdaSymbol.cs (1)
102public override bool IsStatic => _isStatic;
Symbols\Source\LocalFunctionSymbol.cs (1)
325public override bool IsStatic => (_declarationModifiers & DeclarationModifiers.Static) != 0;
Symbols\Source\SourceEventSymbol.cs (1)
370public sealed override bool IsStatic
Symbols\Source\SourceMemberContainerSymbol.cs (1)
820public override bool IsStatic => HasFlag(DeclarationModifiers.Static);
Symbols\Source\SourceMemberMethodSymbol.cs (1)
544public sealed override bool IsStatic
Symbols\Source\SourcePropertySymbolBase.cs (1)
475public override bool IsStatic
Symbols\Synthesized\SynthesizedContainer.cs (1)
146public override bool IsStatic => false;
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
233public override bool IsStatic
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
88public override bool IsStatic => false;
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
181public override bool IsStatic
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
176public override bool IsStatic
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
268public override bool IsStatic
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
166public override bool IsStatic
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
223public sealed override bool IsStatic
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
104public override bool IsStatic
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
352public override bool IsStatic
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
101public override bool IsStatic
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
237public override bool IsStatic
Symbols\TypeParameterSymbol.cs (1)
216public sealed override bool IsStatic
Symbols\Wrapped\WrappedEventSymbol.cs (1)
94public override bool IsStatic
Symbols\Wrapped\WrappedFieldSymbol.cs (1)
200public override bool IsStatic
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
117public override bool IsStatic
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
153public override bool IsStatic
Symbols\Wrapped\WrappedPropertySymbol.cs (1)
116public override bool IsStatic
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (5)
Symbols\DisplayClassVariable.cs (1)
152public override bool IsStatic
Symbols\EEMethodSymbol.cs (1)
420public override bool IsStatic
Symbols\EENamedTypeSymbol.cs (1)
314public override bool IsStatic
Symbols\PlaceholderMethodSymbol.cs (1)
110public override bool IsStatic
Symbols\SynthesizedContextMethodSymbol.cs (1)
90public override bool IsStatic
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\MockNamedTypeSymbol.cs (1)
187public override bool IsStatic
995 references to IsStatic
Microsoft.CodeAnalysis.CSharp (269)
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
291treatAsInstanceMemberAccess = !(symbol.IsStatic || symbol.Kind == SymbolKind.NamedType);
Binder\Binder.ValueChecks.cs (14)
1167Debug.Assert(!fieldSymbol.IsStatic); 1184if (fieldSymbol.IsStatic || fieldSymbol.ContainingType.IsReferenceType) 1202var fieldIsStatic = fieldSymbol.IsStatic; 1207fieldIsStatic == containing.IsStatic && 1267if (fieldSymbol.IsStatic || fieldSymbol.ContainingType.IsReferenceType) 1289if (fieldSymbol.IsStatic || fieldSymbol.ContainingType.IsReferenceType) 1314if (eventSymbol.IsStatic || eventSymbol.ContainingType.IsReferenceType) 2843int index = (checkingReceiver ? 6 : 0) + (field.IsStatic ? 3 : 0) + (kind == BindValueKind.RefReturn ? 0 : (RequiresRefOrOut(kind) ? 1 : 2)); 3001if (eventSymbol.IsStatic || eventSymbol.ContainingType.IsReferenceType) 3570if (fieldSymbol.IsStatic || !fieldSymbol.ContainingType.IsRefLikeType) 3995if (fieldSymbol.IsStatic || !fieldSymbol.ContainingType.IsRefLikeType) 4792if (field.IsStatic) 4794return containingSymbol is MethodSymbol { MethodKind: MethodKind.StaticConstructor } or FieldSymbol { IsStatic: true }; 4798return (containingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor } or FieldSymbol { IsStatic: false } or MethodSymbol { IsInitOnly: true }) &&
Binder\Binder_Attributes.cs (1)
604invalidNamedArgument |= namedArgumentNameSymbol.IsStatic;
Binder\Binder_Await.cs (1)
159if (((FieldSymbol)containingMemberOrLambda).IsStatic)
Binder\Binder_Constraints.cs (1)
560else if (type.IsStatic)
Binder\Binder_Conversions.cs (3)
316if (conversion.IsUserDefined && conversion.Method is MethodSymbol method && method.IsStatic) 1198if (receiverOpt == null || ContainingMember().IsStatic) 1368if (!method.IsStatic)
Binder\Binder_Expressions.cs (21)
37if (memberOpt?.IsStatic == true) 2037this.ContainingMember() is not { Kind: not SymbolKind.NamedType, IsStatic: false } containingMember || // We are not in an instance member 2096bool locationIsInstanceMember = !containingMember.IsStatic && 2151if (containingMember.IsStatic) 2497bool hasErrors = !conversion.IsValid || targetType.IsStatic; 2526if (targetType.IsStatic) 4670if (type.IsStatic) 4708if (type.IsStatic) 7202left = ReplaceTypeOrValueReceiver(left, symbol.IsStatic || symbol.Kind == SymbolKind.NamedType, diagnostics); 7439var isEnumField = (fieldSymbol.IsStatic && type.IsEnumType()); 7508if (!fieldSymbol.IsStatic) 7600if (!propertySymbol.IsStatic) 7613if (symbol.IsStatic && (symbol.IsAbstract || symbol.IsVirtual)) 7637if (!symbol.IsStatic && !(symbol is TypeSymbol) && 7672if (!eventSymbol.IsStatic) 8489receiver = ReplaceTypeOrValueReceiver(receiver, property.IsStatic, diagnostics); 8671if (!candidate.IsStatic && 8726if (!candidate.IsStatic && 8833!getMethod.IsStatic && 9118if (!m.IsStatic) continue; 9123if (m.IsStatic) continue;
Binder\Binder_Operators.cs (4)
2353if (methodOpt?.ContainingType?.IsInterface == true && methodOpt.IsStatic) 2563if ((object)fieldSymbol == null || fieldSymbol.IsStatic || (object)receiver == null) 3156if (targetType.IsStatic) 3697if (targetType.IsStatic)
Binder\Binder_Patterns.cs (1)
742else if (patternType.IsStatic)
Binder\Binder_Statements.cs (5)
1348!(patternMethodSymbol.ParameterCount == 0 || patternMethodSymbol.IsStatic && patternMethodSymbol.ParameterCount == 1)) 1775var propertyIsStatic = propertySymbol.IsStatic; 1789(member as FieldSymbol)?.IsStatic == isStatic; 3659if (this.ContainingMember() is MethodSymbol { IsStatic: false } method) 3731else if (baseType.IsErrorType() || baseType.IsStatic)
Binder\Binder_Symbols.cs (2)
1510haveInstanceCandidates = members.Any(m => !m.IsStatic); 1511haveStaticCandidates = members.Any(m => m.IsStatic);
Binder\DecisionDagBuilder.cs (1)
532int extensionExtra = method.IsStatic ? 1 : 0;
Binder\ForEachLoopBinder.cs (3)
1239if (result.IsStatic || result.DeclaredAccessibility != Accessibility.Public) 1440if (lookupSymbol.IsStatic || lookupSymbol.DeclaredAccessibility != Accessibility.Public || lookupSymbol.Kind != SymbolKind.Property) 1473moveNextMethodCandidate.Method.IsStatic || moveNextMethodCandidate.Method.DeclaredAccessibility != Accessibility.Public ||
Binder\PatternExplainer.cs (1)
653if (declaredMember is FieldSymbol { IsConst: true, IsStatic: true, DeclaredAccessibility: Accessibility.Public } field &&
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
411if (result.Result.IsValid && !member.IsStatic)
Binder\WithUsingNamespacesAndTypesBinder.cs (2)
171if (!symbol.IsStatic || ((MethodSymbol)symbol).IsExtensionMethod) 185if (!symbol.IsStatic)
BoundTree\Constructors.cs (1)
60if (fieldSymbol.IsStatic ||
CodeGen\EmitAddress.cs (2)
366if (!fieldAccess.FieldSymbol.IsStatic) 442else if (fieldAccess.FieldSymbol.IsStatic)
CodeGen\EmitConversion.cs (2)
312var isStatic = receiver == null || (!isExtensionMethod && method.IsStatic); 353if (!method.IsStatic && method.IsMetadataVirtual() && !method.ContainingType.IsDelegateType() && !receiver.SuppressVirtualCalls)
CodeGen\EmitExpression.cs (11)
1092if (!field.IsVolatile && !field.IsStatic && fieldAccess.ReceiverOpt.Type.IsVerifierValue() && field.RefKind == RefKind.None) 1118if (field.IsStatic) 1207if (!field.IsStatic && EmitFieldLoadReceiverAddress(fieldAccess.ReceiverOpt)) 1261if (field.IsStatic || field.RefKind != RefKind.None) 1343if (!sym.ContainingSymbol.IsStatic) 1621Debug.Assert(method.IsStatic); 1653Debug.Assert(!method.IsStatic && method.RequiresInstanceReceiver); 2081if (!method.IsMetadataVirtual() || method.IsStatic) 2570else if (!left.FieldSymbol.IsStatic) 3072_builder.EmitOpCode(field.IsStatic ? ILOpCode.Stsfld : ILOpCode.Stfld); 3830if ((load.TargetMethod.IsAbstract || load.TargetMethod.IsVirtual) && load.TargetMethod.IsStatic)
CodeGen\EmitStatement.cs (1)
1132Debug.Assert(!left.FieldSymbol.IsStatic, "Not supported");
CodeGen\Optimizer.cs (3)
1101return !((BoundFieldAccess)lhs).FieldSymbol.IsStatic; 1121Debug.Assert(method.IsStatic); 1279if (!field.IsStatic)
Compilation\CSharpSemanticModel.cs (2)
3735if (containingMember.IsStatic) 4075if (ReferenceEquals(type, null) || type.IsStatic)
Compilation\InitializerSemanticModel.cs (1)
281type.IsNullableEnabledForConstructorsAndInitializers(useStatic: MemberSymbol.IsStatic);
Compiler\MethodBodySynthesizer.cs (1)
279field.IsStatic ? null : new BoundThisReference(syntax, accessor.ThisParameter.Type),
Compiler\MethodBodySynthesizer.Lowered.cs (1)
465BoundExpression invocation = F.Call(methodToInvoke.IsStatic ? null : (useBaseReference ? (BoundExpression)F.Base(baseType: methodToInvoke.ContainingType) : F.This()),
Emitter\Model\FieldSymbolAdapter.cs (1)
228return AdaptedFieldSymbol.IsStatic;
Emitter\Model\MethodSymbolAdapter.cs (1)
473return AdaptedMethodSymbol.IsStatic;
Emitter\Model\NamedTypeSymbolAdapter.cs (2)
988return this.IsAbstract || this.IsStatic; 997return this.IsSealed || this.IsStatic;
Emitter\NoPia\EmbeddedField.cs (1)
88return UnderlyingField.AdaptedFieldSymbol.IsStatic;
Emitter\NoPia\EmbeddedMethod.cs (1)
134return UnderlyingMethod.AdaptedMethodSymbol.IsStatic;
Emitter\NoPia\EmbeddedTypesManager.cs (1)
442(containerKind == TypeKind.Struct && (field.AdaptedFieldSymbol.IsStatic || field.AdaptedFieldSymbol.DeclaredAccessibility != Accessibility.Public)))
FlowAnalysis\AbstractFlowPass.cs (2)
1541return method.IsStatic && !method.IsExtensionMethod; 2062!fieldSymbol.IsStatic &&
FlowAnalysis\DefiniteAssignment.cs (8)
341case MethodSymbol { IsStatic: false, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } } and 357case (FieldSymbol or PropertySymbol) and { IsStatic: false, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } }: 1037if (fieldSymbol.IsStatic) 1049if (eventSymbol.IsStatic) 1068if (propSymbol.IsStatic) 1095!fieldSymbol.IsStatic && 1425if (fieldSymbol.ContainingType.IsReferenceType || fieldSymbol.IsStatic) return null; 1713if (!current.IsStatic &&
FlowAnalysis\EmptyStructTypeCache.cs (2)
146if (member.IsStatic) 185if (!includeStatic && member.IsStatic)
FlowAnalysis\NullableWalker.cs (13)
674if (member.IsStatic != isStatic) 873if (member.IsStatic != method.IsStatic) 963|| method.IsStatic 1078if (!member.IsStatic) 1362Binder.BindFieldInitializers(compilation, null, method.IsStatic ? containingType.StaticInitializers : containingType.InstanceInitializers, BindingDiagnosticBag.Discarded, ref discardedInitializers); 1907if (fieldSymbol.IsStatic) 1920if (eventSymbol.IsStatic) 1932if (propSymbol.IsStatic) 6369method.IsStatic ? 0 : 6430if (member.IsStatic) 7115if (!method.IsStatic) 10769if (!@event.IsStatic)
FlowAnalysis\ReadWriteWalker.cs (2)
104if (!current.IsStatic && 167if (expr.FieldSymbol.IsStatic) return;
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (2)
485method.IsStatic && 513!property.IsStatic &&
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
417return methodSymbol.IsStatic
Lowering\ClosureConversion\ClosureConversion.cs (3)
834return (!_currentMethod.IsStatic && TypeSymbol.Equals(_currentMethod.ContainingType, _topLevelMethod.ContainingType, TypeCompareKind.ConsiderEverything2)) 1350Debug.Assert(node.TargetMethod is { RequiresInstanceReceiver: false, IsStatic: true }); 1365remappedMethod is { RequiresInstanceReceiver: false, IsStatic: true });
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
731var receiver = node.FieldSymbol.IsStatic ? _bound.Null(ExpressionType) : Visit(node.ReceiverOpt); 1012var receiver = node.PropertySymbol.IsStatic ? _bound.Null(ExpressionType) : Visit(node.ReceiverOpt);
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (1)
110Debug.Assert(!(originalMethod is LocalFunctionSymbol) || !originalMethod.IsStatic || IsStatic);
Lowering\DiagnosticsPass_ExpressionTrees.cs (8)
340else if ((method.IsAbstract || method.IsVirtual) && method.IsStatic) 468if (_inExpressionLambda && node.AddMethod.IsStatic) 509if (_inExpressionLambda && (property.IsAbstract || property.IsVirtual) && property.IsStatic) 645if (((binary.IsAbstract || binary.IsVirtual) && binary.IsStatic) || ((unary.IsAbstract || unary.IsVirtual) && unary.IsStatic)) 676if (_inExpressionLambda && node.MethodOpt is MethodSymbol method && (method.IsAbstract || method.IsVirtual) && method.IsStatic) 766if (_inExpressionLambda && node.Conversion.Method is MethodSymbol method && (method.IsAbstract || method.IsVirtual) && method.IsStatic) 816else if (method is not null && (method.IsAbstract || method.IsVirtual) && method.IsStatic)
Lowering\DiagnosticsPass_Warnings.cs (4)
136if (receiver == null || fieldAccess.FieldSymbol.IsStatic) 211(field1.FieldSymbol.IsStatic || IsSameLocalOrField(field1.ReceiverOpt, field2.ReceiverOpt)); 216(event1.EventSymbol.IsStatic || IsSameLocalOrField(event1.ReceiverOpt, event2.ReceiverOpt)); 260else if ((method.IsAbstract || method.IsVirtual) && method.IsStatic)
Lowering\InitializerRewriter.cs (1)
94var boundReceiver = field.IsStatic ? null :
Lowering\LocalRewriter\DelegateCacheRewriter.cs (1)
41return targetMethod.IsStatic && !boundDelegateCreation.IsExtensionMethod;
Lowering\LocalRewriter\LocalRewriter.cs (4)
647if (_factory.CurrentFunction?.IsStatic == false) 802if (!lhsField.IsStatic && lhsField.ContainingType.IsStructType()) 929if (eventAccess.EventSymbol.IsStatic) 941if (!fieldAccess.FieldSymbol.IsStatic)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
172!method.IsStatic &&
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
172if (method.IsStatic)
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
218if (method.IsStatic &&
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
183if (receiverOpt == null || propertyOrEvent.IsStatic || !CanChangeValueBetweenReads(receiverOpt)) 456if (fieldOrEvent.IsStatic)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
547constrainedToTypeOpt: symbolOpt.IsStatic &&
Lowering\LocalRewriter\LocalRewriter_Event.cs (3)
80Debug.Assert(eventSymbol.IsStatic || rewrittenReceiverOpt is { }); 81if (!eventSymbol.IsStatic && CanChangeValueBetweenReads(rewrittenReceiverOpt!)) 234fieldSymbol.IsStatic ? null : rewrittenReceiver,
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
348var getPinnableCall = getPinnableMethod.IsStatic ?
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (1)
14Debug.Assert(_factory.TopLevelMethod is { IsStatic: false });
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (1)
192if (method.IsStatic && method.ContainingType.SpecialType == SpecialType.System_String)
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
192Debug.Assert(addMethod.IsStatic);
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (1)
16Debug.Assert(_factory.TopLevelMethod is { IsStatic: false });
Lowering\LocalRewriter\LocalRewriter_Range.cs (2)
184Debug.Assert(constructionMethod.IsStatic); 193Debug.Assert(constructionMethod.IsStatic);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
161if (method.IsStatic && method.ContainingType.SpecialType == SpecialType.System_String)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
492return !((BoundFieldAccess)expression).FieldSymbol.IsStatic;
Lowering\MethodToClassRewriter.cs (1)
739Debug.Assert(!methodBeingWrapped.IsStatic);
Lowering\SpillSequenceSpiller.cs (3)
408if (fieldSymbol.IsStatic) 811if (field.FieldSymbol.IsStatic) break; 849if (!field.FieldSymbol.IsStatic)
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
64if (!method.IsStatic && method.ContainingType.TypeKind == TypeKind.Struct) 216case BoundFieldAccess { FieldSymbol: { IsStatic: false, ContainingType: { IsValueType: true } }, ReceiverOpt: BoundExpression receiver }:
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
569if (field.FieldSymbol.IsStatic)
Lowering\StateMachineRewriter\StateMachineRewriter.cs (3)
306if (!method.IsStatic) 430if (method.IsStatic || method.ThisParameter.Type.IsReferenceType) 452if (!method.IsStatic)
Lowering\SyntheticBoundNodeFactory.cs (6)
263Debug.Assert(CurrentFunction is { IsStatic: false }); 274Debug.Assert(CurrentFunction is { IsStatic: false }); 314Debug.Assert((receiverOpt is null) == property.IsStatic); 329Debug.Assert((receiverOpt is null) == property.IsStatic); 774Debug.Assert(methodSymbol.IsStatic); 782Debug.Assert(methodSymbol.IsStatic);
Operations\CSharpOperationFactory.cs (6)
460if (targetMember.IsStatic && (targetMember.IsAbstract || targetMember.IsVirtual) && 599return boundObjectInitializerMember.MemberSymbol?.IsStatic == true ? 899IOperation? createReceiver() => memberSymbol?.IsStatic == true ? 1309if (operatorMethod is not null && operatorMethod.IsStatic && (operatorMethod.IsAbstract || operatorMethod.IsVirtual) && 2779=> symbol?.IsStatic == false ? new InstanceReferenceOperation(InstanceReferenceKind.PatternInput, _semanticModel, nameSyntax!, receiverType, isImplicit: true) : null; 2798Debug.Assert(!patternDisposeInfo.Method.IsStatic);
Operations\CSharpOperationFactory_Methods.cs (1)
106if (symbol != null && symbol.IsStatic && instance.WasCompilerGenerated && instance.Kind == BoundKind.ThisReference)
Symbols\AssemblySymbol.cs (1)
473return GetSpecialType(SpecialType.System_Runtime_CompilerServices_RuntimeFeature) is { TypeKind: TypeKind.Class, IsStatic: true } &&
Symbols\BaseTypeAnalysis.cs (1)
97if (fieldType is null || fieldType.TypeKind != TypeKind.Struct || field.IsStatic)
Symbols\Compilation_WellKnownMembers.cs (1)
292if (member.Kind != targetSymbolKind || member.IsStatic != isStatic ||
Symbols\ConstraintsHelper.cs (2)
1301if (m.IsStatic && m.IsImplementableInterfaceMember() && iface.FindImplementationForInterfaceMember(m) is null) 1312if (m.IsStatic && m.IsImplementableInterfaceMember() && iface.FindImplementationForInterfaceMember(m) is null)
Symbols\EventSymbol.cs (1)
81public virtual bool RequiresInstanceReceiver => !IsStatic;
Symbols\FieldSymbol.cs (1)
101public virtual bool RequiresInstanceReceiver => !IsStatic;
Symbols\MemberSignatureComparer.cs (1)
785return member.IsStatic ? 0 : Cci.CallingConvention.HasThis;
Symbols\MethodSymbol.cs (4)
89public virtual bool RequiresInstanceReceiver => !IsStatic; 365protected bool IsValidReadOnlyTarget => !IsStatic && ContainingType.IsStructType() && MethodKind != MethodKind.Constructor && !IsInitOnly; 715return IsStatic && !IsAbstract && !IsVirtual && Name == WellKnownMemberNames.EntryPointMethodName; 1030if (!IsStatic || IsAbstract || IsVirtual || MethodKind is not (MethodKind.Ordinary or MethodKind.LocalFunction))
Symbols\MethodSymbolExtensions.cs (1)
218return !method.IsStatic &&
Symbols\NamedTypeSymbol.cs (1)
709if (!symbol.IsStatic)
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
1022if (!method.IsMetadataVirtual(ignoreInterfaceImplementationChanges) || method.IsStatic)
Symbols\PropertySymbol.cs (1)
137public virtual bool RequiresInstanceReceiver => !IsStatic;
Symbols\PublicModel\Symbol.cs (1)
215get { return UnderlyingSymbol.IsStatic; }
Symbols\Retargeting\RetargetingSymbolTranslator.cs (2)
1047method.IsStatic, 1119property.IsStatic,
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
368if (implementedMember.IsStatic && !implementingMember.ContainingAssembly.RuntimeSupportsStaticAbstractMembersInInterfaces)
Symbols\Source\SourceConstructorSymbol.cs (1)
155else if (ContainingType.IsStatic && methodKind == MethodKind.Constructor)
Symbols\Source\SourceEventSymbol.cs (1)
575else if (ContainingType.IsStatic && !IsStatic)
Symbols\Source\SourceMemberContainerSymbol.cs (12)
1362if (member.IsStatic) 2288if (field.IsStatic) 2573if (f is null || !f.IsStatic || f.Type.TypeKind != TypeKind.Struct) continue; 2602if (f is null || !f.IsStatic || f.Type.TypeKind != TypeKind.Struct) continue; 3238if (member.IsStatic || 4057if (deconstruct.IsStatic) 4281else if (existingMember is FieldSymbol { IsStatic: false } field 4290else if (existingMember is PropertySymbol { IsStatic: false, GetMethod: { } } prop 4495else if (symbol.IsStatic) 4767builder.UpdateIsNullableEnabledForConstructorsAndFields(useStatic: backingField.IsStatic, compilation, propertySyntax); 4825builder.UpdateIsNullableEnabledForConstructorsAndFields(useStatic: associatedField.IsStatic, compilation, declarator); 4829if (associatedField.IsStatic)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1776if (!interfaceMethod.IsStatic)
Symbols\Source\SourceMemberFieldSymbol.cs (1)
53else if (type.IsStatic)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (3)
689else if (this is { MethodKind: MethodKind.LocalFunction, IsStatic: false }) 767if (!implementationPart.IsExtern || !implementationPart.IsStatic) 906if (!IsStatic || ParameterCount > 0 || !ReturnsVoid || IsAbstract || IsVirtual)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1372if (!field.IsStatic)
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
382if (baseType.IsStatic)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
243else if (!ContainingType.IsScriptClass && !(ContainingType.IsStatic && ContainingType.Arity == 0))
Symbols\Source\SourceOrdinaryMethodSymbolBase.cs (2)
366else if (ReturnType.IsStatic) 420else if (ContainingType.IsStatic && !IsStatic)
Symbols\Source\SourcePropertySymbolBase.cs (2)
896else if (ContainingType.IsStatic && !IsStatic) 1535if (type.IsStatic)
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (3)
61if (this.ContainingType.IsStatic) 259if (returnType.Type.IsStatic) 278if (this.ContainingType.IsStatic)
Symbols\Symbol.cs (1)
1616get { return this.IsStatic; }
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
168IsStatic: false,
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (2)
53if (!field.IsStatic) 131return member is MethodSymbol { IsStatic: false, ParameterCount: 1, Arity: 0 } method &&
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (1)
46candidate.ReturnType.SpecialType == SpecialType.System_Boolean && !candidate.IsStatic &&
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (2)
83if (_equalityContract.IsStatic || !_equalityContract.Type.Equals(DeclaringCompilation.GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.AllIgnoreOptions)) 140if (!f.IsStatic)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (2)
66if (_equalityContract.IsStatic) 98if (!f.IsStatic)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
326return m.DeclaredAccessibility == Accessibility.Public && !m.IsStatic;
Symbols\Synthesized\SynthesizedExplicitImplementationForwardingMethod.cs (1)
48public override bool IsStatic => _implementingMethod.IsStatic;
Symbols\Synthesized\SynthesizedInstanceMethodSymbol.cs (1)
47Debug.Assert(!IsStatic);
Symbols\TypeSymbol.cs (11)
911(!interfaceMember.IsStatic || implementingTypeIsFromSomeCompilation)) 1011else if (!interfaceMember.IsStatic) 1606interfaceMethod.IsStatic, 1625bool isStatic = implicitImpl.IsStatic; 1684else if (implicitImplMethod.IsStatic && implicitImplMethod.MethodKind == MethodKind.Ordinary && implicitImplMethod.GetUnmanagedCallersOnlyAttributeData(forceComplete: true) is not null) 1726if (implicitImpl.IsStatic && interfaceMember.ContainingModule != implementingType.ContainingModule) 1944if (closestMismatch.IsStatic != interfaceMember.IsStatic) 1946diagnostics.Add(closestMismatch.IsStatic ? ErrorCode.ERR_CloseUnimplementedInterfaceMemberStatic : ErrorCode.ERR_CloseUnimplementedInterfaceMemberNotStatic, 2193if (candidateMember.DeclaredAccessibility != Accessibility.Public || candidateMember.IsStatic != interfaceMember.IsStatic)
Symbols\TypeWithAnnotations.cs (1)
872internal override bool IsStatic(TypeSymbol typeSymbol) => typeSymbol.IsStatic;
Symbols\VarianceSafety.cs (2)
174if (member.IsStatic && !member.IsAbstract && !member.IsVirtual) 472if (!(context is TypeSymbol) && context.IsStatic && !context.IsAbstract && !context.IsVirtual)
Symbols\Wrapped\WrappedEventSymbol.cs (1)
98return _underlyingEvent.IsStatic;
Symbols\Wrapped\WrappedFieldSymbol.cs (1)
204return _underlyingField.IsStatic;
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
121return UnderlyingMethod.IsStatic;
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
157return _underlyingType.IsStatic;
Symbols\Wrapped\WrappedPropertySymbol.cs (1)
120return _underlyingProperty.IsStatic;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (19)
CodeGen\CodeGenDynamicTests.cs (4)
593Assert.True(container.IsStatic); 602Assert.True(field.IsStatic); 844Assert.False(member.IsStatic); 850Assert.False(member.IsStatic);
CodeGen\DestructorTests.cs (1)
830Assert.False(destructor.IsStatic);
CodeGen\EventTests.cs (2)
212Assert.Equal(isStatic, @event.IsStatic); 234Assert.Equal(isStatic, associatedField.IsStatic);
CodeGen\IndexerTests.cs (2)
158Assert.False(indexer.IsStatic); 260Assert.False(indexer.IsStatic);
Emit\EditAndContinue\EditAndContinueClosureTests.cs (2)
373Assert.True(((Symbol)localFunction0).IsStatic); 376Assert.True(((Symbol)localFunction1).IsStatic);
Emit\EmitMetadataTests.cs (7)
502Assert.True(classC.IsStatic); 605Assert.False(ctor.IsStatic); 626Assert.True(cctor.IsStatic); 680Assert.True(field.IsStatic); 1373Assert.True(field.IsStatic); 1407Assert.False(field.IsStatic); 2127Assert.True(classC.IsStatic, "Expected C to be static");
Emit\NoPiaEmbedTypes.cs (1)
1322Assert.False(f3.IsStatic);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (18)
Binders\EEMethodBinder.cs (1)
45_parameterOffset = substitutedSourceMethod.IsStatic ? 0 : 1;
CompilationContext.cs (14)
385if (!m.IsStatic && !IsDisplayClassType(m.ContainingType) || 398int parameterIndex = m.IsStatic ? 0 : 1; 1071else if (importRecord.Alias == null && !typeSymbol.IsStatic) 1369if (IsDisplayClassType(currentFrame.ContainingType) && !currentFrame.IsStatic) 1421if (!currentFrame.IsStatic && isPrimaryConstructor) 1437if (!isPrimaryConstructor && checkForPrimaryConstructor && currentFrame == currentSourceMethod && !currentFrame.IsStatic) 1503if (!field.IsStatic && GeneratedNameParser.TryParsePrimaryConstructorParameterFieldName(field.Name, out string? parameterName)) 1583Debug.Assert(!field.IsStatic); 1641Debug.Assert(!field.IsStatic); 1646Debug.Assert(!field.IsStatic); 1663Debug.Assert(!field.IsStatic); 1670Debug.Assert(!field.IsStatic); 1677Debug.Assert(!field.IsStatic); 1861!(desiredMethodMustBeInstance && candidateMethod.IsStatic) &&
Symbols\DisplayClassInstance.cs (2)
102Debug.Assert(method.IsStatic); 103var otherOrdinal = this.ContainingSymbol.IsStatic
Symbols\DisplayClassVariable.cs (1)
102Debug.Assert(!field.IsStatic);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (1)
HoistedThisTests.cs (1)
1312CheckIteratorOverloading(source, m => !m.IsStatic);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (18)
Semantics\AnonymousFunctionTests.cs (3)
53Assert.False(method.IsStatic); 685Assert.True(method.IsStatic); 1225Assert.False(method.IsStatic);
Semantics\LocalFunctionTests.cs (3)
6812Assert.True(method.IsStatic); 6837Assert.True(method.IsStatic); 6867Assert.True(method.IsStatic);
Semantics\NativeIntegerTests.cs (2)
549Assert.Equal(member.IsStatic, underlyingMember.IsStatic);
Semantics\RecordStructTests.cs (4)
3419Assert.False(deconstruct.IsStatic); 4328Assert.False(gethashCode.IsStatic); 4877Assert.True(op.IsStatic); 4887Assert.True(op.IsStatic);
Semantics\RecordTests.cs (5)
14131Assert.False(deconstruct.IsStatic); 20346Assert.True(op.IsStatic); 20356Assert.True(op.IsStatic); 20465Assert.True(op.IsStatic); 20475Assert.True(op.IsStatic);
Semantics\TopLevelStatementsTests.cs (1)
9315Assert.False(entryPoint.ContainingType.IsStatic);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (663)
DocumentationComments\ConstructorDocumentationCommentTests.cs (2)
60var constructorSymbol = _widgetClass.InstanceConstructors.Single(c => !c.IsStatic && c.Parameters.Length == 0); 72var parameterizedConstructorSymbol = _widgetClass.InstanceConstructors.Single(c => !c.IsStatic && c.Parameters.Length == 1);
Symbols\AnonymousTypesSymbolTests.cs (3)
1026Assert.False(type.IsStatic); 1101Assert.False(property.IsStatic); 1129Assert.False(method.IsStatic);
Symbols\CheckedUserDefinedOperatorsTests.cs (3)
57Assert.True(opSymbol.IsStatic); 1274Assert.True(opSymbol.IsStatic); 2508Assert.True(opSymbol.IsStatic);
Symbols\CompilationCreationTests.cs (3)
2381Assert.False(foo2.IsStatic); 2388Assert.True(bar.IsStatic); 2445Assert.False(type3.IsStatic);
Symbols\DefaultInterfaceImplementationTests.cs (370)
216Assert.Equal(isStatic, m1.IsStatic); 2035Assert.True(m1.IsStatic); 2707Assert.Equal(isStatic, accessor.IsStatic); 2717Assert.Equal(isStatic, p1.IsStatic); 3004Assert.False(p1.IsStatic); 3040Assert.True(p1.IsStatic); 3076Assert.True(p1.IsStatic); 4711Assert.True(p1.IsStatic); 4712Assert.True(p3.IsStatic); 4713Assert.True(p5.IsStatic); 4714Assert.True(p7.IsStatic); 4731Assert.True(p1.GetMethod.IsStatic); 4732Assert.True(p3.GetMethod.IsStatic); 4733Assert.True(p5.SetMethod.IsStatic); 4734Assert.True(p7.GetMethod.IsStatic); 4735Assert.True(p7.SetMethod.IsStatic); 6230Assert.Equal(isStatic, accessor.IsStatic); 6240Assert.Equal(isStatic, e1.IsStatic); 7594Assert.True(e7.IsStatic); 7607Assert.True(e7.AddMethod.IsStatic); 7608Assert.True(e7.RemoveMethod.IsStatic); 8254Assert.False(m01.IsStatic); 8266Assert.False(m02.IsStatic); 8278Assert.False(m03.IsStatic); 8290Assert.False(m04.IsStatic); 8302Assert.False(m05.IsStatic); 8314Assert.True(m06.IsStatic); 8326Assert.False(m07.IsStatic); 8338Assert.False(m08.IsStatic); 8350Assert.False(m09.IsStatic); 8362Assert.False(m10.IsStatic); 8374Assert.False(m11.IsStatic); 8386Assert.False(m12.IsStatic); 8398Assert.False(m13.IsStatic); 8607Assert.False(m1.IsStatic); 8646Assert.False(m1.IsStatic); 8709Assert.True(m1.IsStatic); 8794Assert.True(m1.IsStatic); 8807Assert.True(m2.IsStatic); 8820Assert.True(m3.IsStatic); 8876Assert.False(m1.IsStatic); 8934Assert.False(m1.IsStatic); 8947Assert.False(m2.IsStatic); 8960Assert.False(m3.IsStatic); 9185Assert.Equal(isStatic, m1.IsStatic); 9913Assert.False(m1.IsStatic); 9963Assert.False(m1.IsStatic); 10044Assert.False(m1.IsStatic); 10058Assert.False(m2.IsStatic); 10072Assert.False(m3.IsStatic); 10086Assert.False(m4.IsStatic); 10152Assert.False(m2.IsStatic); 10206Assert.False(m1.IsStatic); 10220Assert.False(m2.IsStatic); 10234Assert.True(m3.IsStatic); 10248Assert.False(m4.IsStatic); 10262Assert.False(m5.IsStatic); 10432Assert.False(m1.IsStatic); 10446Assert.False(m2.IsStatic); 10552Assert.False(m1.IsStatic); 10566Assert.False(m2.IsStatic); 10580Assert.True(m3.IsStatic); 10594Assert.True(m4.IsStatic); 10608Assert.False(m5.IsStatic); 10660Assert.True(m1.IsStatic); 10723Assert.False(m1.IsStatic); 10887Assert.True(m1.IsStatic); 10901Assert.True(m2.IsStatic); 10918Assert.True(m2Impl.IsStatic); 10994Assert.False(m1.IsStatic); 11008Assert.False(m2.IsStatic); 11025Assert.False(m2Impl.IsStatic); 11624Assert.True(m1.IsStatic); 12480Assert.False(m1.IsStatic); 12568Assert.False(m1.IsStatic); 12656Assert.False(m1.IsStatic); 12937Assert.False(p01.IsStatic); 12950Assert.False(accessor.IsStatic); 12963Assert.False(p02.IsStatic); 12972Assert.False(p02get.IsStatic); 12984Assert.False(p03.IsStatic); 12993Assert.False(p03set.IsStatic); 13005Assert.False(p04.IsStatic); 13014Assert.False(p04get.IsStatic); 13026Assert.False(p05.IsStatic); 13035Assert.False(p05set.IsStatic); 13047Assert.True(p06.IsStatic); 13056Assert.True(p06get.IsStatic); 13068Assert.False(p07.IsStatic); 13077Assert.False(p07set.IsStatic); 13089Assert.False(p08.IsStatic); 13098Assert.False(p08get.IsStatic); 13110Assert.False(p09.IsStatic); 13119Assert.False(p09set.IsStatic); 13131Assert.False(p10.IsStatic); 13140Assert.False(p10get.IsStatic); 13151Assert.False(p11.IsStatic); 13164Assert.False(accessor.IsStatic); 13176Assert.False(p12.IsStatic); 13189Assert.False(accessor.IsStatic); 13201Assert.False(p13.IsStatic); 13214Assert.False(accessor.IsStatic); 13226Assert.False(p14.IsStatic); 13239Assert.False(accessor.IsStatic); 13251Assert.False(p15.IsStatic); 13264Assert.False(accessor.IsStatic); 13276Assert.False(p16.IsStatic); 13289Assert.False(accessor.IsStatic); 13302Assert.False(p17.IsStatic); 13311Assert.False(p17get.IsStatic); 13323Assert.False(p18.IsStatic); 13332Assert.False(p18get.IsStatic); 13343Assert.False(p19.IsStatic); 13737Assert.False(p1.IsStatic); 13746Assert.False(p1get.IsStatic); 13829Assert.False(p1.IsStatic); 13844Assert.False(accessor.IsStatic); 13903Assert.False(p1.IsStatic); 13917Assert.False(accessor.IsStatic); 14105Assert.True(p1.IsStatic); 14136Assert.True(accessor.IsStatic); 14216Assert.True(p1.IsStatic); 14226Assert.True(p1get.IsStatic); 14239Assert.True(p2.IsStatic); 14249Assert.True(p2set.IsStatic); 14262Assert.True(p3.IsStatic); 14272Assert.True(p3get.IsStatic); 14454Assert.False(p1.IsStatic); 14485Assert.False(accessor.IsStatic); 14558Assert.False(p1.IsStatic); 14568Assert.False(p1get.IsStatic); 14581Assert.False(p2.IsStatic); 14591Assert.False(p2get.IsStatic); 14603Assert.False(p3.IsStatic); 14617Assert.False(accessor.IsStatic); 14631Assert.False(p4.IsStatic); 14641Assert.False(p4get.IsStatic); 14832Assert.False(p1.IsStatic); 14844Assert.False(m1.IsStatic); 16006Assert.False(p1.IsStatic); 16037Assert.False(accessor.IsStatic); 16136Assert.False(p1.IsStatic); 16147Assert.False(p1get.IsStatic); 16162Assert.False(p2.IsStatic); 16173Assert.False(p2get.IsStatic); 16188Assert.False(p3.IsStatic); 16199Assert.False(p3set.IsStatic); 16412Assert.False(p2.IsStatic); 16445Assert.False(accessor.IsStatic); 16602Assert.False(p1.IsStatic); 16613Assert.False(p1get.IsStatic); 16628Assert.False(p2.IsStatic); 16639Assert.False(p2set.IsStatic); 16656Assert.True(p3.IsStatic); 16671Assert.True(accessor.IsStatic); 16687Assert.False(p4.IsStatic); 16698Assert.False(p4get.IsStatic); 16712Assert.False(p5.IsStatic); 16723Assert.False(p5set.IsStatic); 16845Assert.False(p1.IsStatic); 16856Assert.False(p1get.IsStatic); 16871Assert.False(p2.IsStatic); 16882Assert.False(p2get.IsStatic); 16896Assert.Equal(!p3.IsIndexer, p3.IsStatic); 16911Assert.Equal(!p3.IsIndexer, accessor.IsStatic); 16925Assert.False(p4.IsStatic); 16940Assert.False(accessor.IsStatic); 16955Assert.False(p5.IsStatic); 16966Assert.False(p5get.IsStatic); 17094Assert.False(p1.IsStatic); 17109Assert.False(accessor.IsStatic); 17125Assert.False(p2.IsStatic); 17136Assert.False(p2get.IsStatic); 17150Assert.Equal(!p3.IsIndexer, p3.IsStatic); 17165Assert.Equal(!p3.IsIndexer, accessor.IsStatic); 17180Assert.Equal(!p4.IsIndexer, p4.IsStatic); 17195Assert.Equal(!p4.IsIndexer, accessor.IsStatic); 17210Assert.False(p5.IsStatic); 17221Assert.False(p5get.IsStatic); 17306Assert.False(p1.IsStatic); 17318Assert.False(m1.IsStatic); 17573Assert.False(p1.IsStatic); 17602Assert.False(accessor.IsStatic); 18161Assert.False(p1.IsStatic); 18199Assert.False(m1.IsStatic); 19687Assert.False(p1.IsStatic); 19699Assert.False(m1.IsStatic); 20341Assert.True(p1.IsStatic); 20357Assert.True(accessor.IsStatic); 21414Assert.False(p01.IsStatic); 21427Assert.False(accessor.IsStatic); 21440Assert.False(p02.IsStatic); 21449Assert.False(p02get.IsStatic); 21461Assert.False(p03.IsStatic); 21470Assert.False(p03set.IsStatic); 21482Assert.False(p04.IsStatic); 21491Assert.False(p04get.IsStatic); 21503Assert.False(p05.IsStatic); 21512Assert.False(p05set.IsStatic); 21524Assert.False(p06.IsStatic); 21533Assert.False(p06get.IsStatic); 21545Assert.False(p07.IsStatic); 21554Assert.False(p07set.IsStatic); 21566Assert.False(p08.IsStatic); 21575Assert.False(p08get.IsStatic); 21587Assert.False(p09.IsStatic); 21596Assert.False(p09set.IsStatic); 21608Assert.False(p10.IsStatic); 21617Assert.False(p10get.IsStatic); 21628Assert.False(p11.IsStatic); 21641Assert.False(accessor.IsStatic); 21653Assert.False(p12.IsStatic); 21666Assert.False(accessor.IsStatic); 21678Assert.False(p13.IsStatic); 21691Assert.False(accessor.IsStatic); 21703Assert.False(p14.IsStatic); 21716Assert.False(accessor.IsStatic); 21728Assert.False(p15.IsStatic); 21741Assert.False(accessor.IsStatic); 21753Assert.False(p16.IsStatic); 21766Assert.False(accessor.IsStatic); 21779Assert.False(p17.IsStatic); 21788Assert.False(p17get.IsStatic); 21800Assert.False(p18.IsStatic); 21809Assert.False(p18get.IsStatic); 21820Assert.False(p19.IsStatic); 26659Assert.False(p01.IsStatic); 26672Assert.False(accessor.IsStatic); 26685Assert.False(p02.IsStatic); 26694Assert.False(p02get.IsStatic); 26706Assert.False(p03.IsStatic); 26715Assert.False(p03set.IsStatic); 26727Assert.False(p04.IsStatic); 26736Assert.False(p04get.IsStatic); 26748Assert.False(p05.IsStatic); 26757Assert.False(p05set.IsStatic); 26769Assert.True(p06.IsStatic); 26778Assert.True(p06get.IsStatic); 26790Assert.False(p07.IsStatic); 26799Assert.False(p07set.IsStatic); 26811Assert.False(p08.IsStatic); 26820Assert.False(p08get.IsStatic); 26832Assert.False(p09.IsStatic); 26841Assert.False(p09set.IsStatic); 26853Assert.False(p10.IsStatic); 26862Assert.False(p10get.IsStatic); 26875Assert.False(p11.IsStatic); 26888Assert.False(accessor.IsStatic); 26901Assert.False(p14.IsStatic); 26914Assert.False(accessor.IsStatic); 27457Assert.False(p1.IsStatic); 27472Assert.False(accessor.IsStatic); 27531Assert.False(p1.IsStatic); 27545Assert.False(accessor.IsStatic); 27631Assert.True(p1.IsStatic); 27646Assert.True(accessor.IsStatic); 27799Assert.True(p1.IsStatic); 27813Assert.True(accessor.IsStatic); 27826Assert.True(p2.IsStatic); 27840Assert.True(accessor.IsStatic); 27853Assert.True(p3.IsStatic); 27867Assert.True(accessor.IsStatic); 27960Assert.False(p1.IsStatic); 27975Assert.False(accessor.IsStatic); 28056Assert.False(p1.IsStatic); 28070Assert.False(accessor.IsStatic); 28083Assert.False(p2.IsStatic); 28097Assert.False(accessor.IsStatic); 28110Assert.False(p3.IsStatic); 28124Assert.False(accessor.IsStatic); 28137Assert.False(p4.IsStatic); 28151Assert.False(accessor.IsStatic); 28274Assert.False(p1.IsStatic); 28286Assert.False(m1.IsStatic); 29409Assert.False(p1.IsStatic); 29424Assert.False(accessor.IsStatic); 29524Assert.False(p1.IsStatic); 29539Assert.False(accessor.IsStatic); 29554Assert.False(p2.IsStatic); 29569Assert.False(accessor.IsStatic); 29584Assert.False(p3.IsStatic); 29599Assert.False(accessor.IsStatic); 29825Assert.False(p2.IsStatic); 29858Assert.False(accessor.IsStatic); 29937Assert.False(p1.IsStatic); 29952Assert.False(accessor.IsStatic); 29967Assert.False(p2.IsStatic); 29982Assert.False(accessor.IsStatic); 29997Assert.True(p3.IsStatic); 30012Assert.True(accessor.IsStatic); 30026Assert.False(p4.IsStatic); 30041Assert.False(accessor.IsStatic); 30055Assert.False(p5.IsStatic); 30070Assert.False(accessor.IsStatic); 30267Assert.False(p1.IsStatic); 30282Assert.False(accessor.IsStatic); 30297Assert.False(p2.IsStatic); 30312Assert.False(accessor.IsStatic); 30327Assert.True(p3.IsStatic); 30342Assert.True(accessor.IsStatic); 30356Assert.False(p4.IsStatic); 30371Assert.False(accessor.IsStatic); 30488Assert.False(p1.IsStatic); 30503Assert.False(accessor.IsStatic); 30518Assert.False(p2.IsStatic); 30533Assert.False(accessor.IsStatic); 30548Assert.True(p3.IsStatic); 30563Assert.True(accessor.IsStatic); 30578Assert.True(p4.IsStatic); 30593Assert.True(accessor.IsStatic); 30607Assert.False(p5.IsStatic); 30622Assert.False(accessor.IsStatic); 30711Assert.False(p1.IsStatic); 30723Assert.False(m1.IsStatic); 31050Assert.True(p1.IsStatic); 31065Assert.True(accessor.IsStatic); 32883Assert.Equal(isStatic, m1.IsStatic); 33720Assert.Equal(isStatic, m1.IsStatic); 33836Assert.Equal(isStatic, m1.IsStatic); 36939Assert.Equal(isStatic, m1.IsStatic); 37831Assert.Equal(isStatic, m1.IsStatic); 39972Assert.Equal(isStatic, m1.IsStatic); 43558Assert.False(f1.IsStatic); 43559Assert.True(f2.IsStatic); 43560Assert.True(f3.IsStatic); 43561Assert.True(f4.IsStatic); 43617Assert.True(f1.IsStatic); 43618Assert.True(f2.IsStatic); 43619Assert.True(f3.IsStatic); 43620Assert.True(f4.IsStatic); 43747Assert.True(f1.IsStatic); 43748Assert.True(f2.IsStatic); 43749Assert.True(f3.IsStatic); 43750Assert.True(f4.IsStatic); 43882Assert.True(f1.IsStatic); 43883Assert.True(f2.IsStatic); 43884Assert.True(f3.IsStatic); 43885Assert.True(f4.IsStatic); 44128Assert.True(f1.IsStatic); 44129Assert.True(f2.IsStatic); 44130Assert.True(f3.IsStatic); 44480Assert.True(cctor.IsStatic); 44578Assert.True(cctor.IsStatic); 44884Assert.True(f1.IsStatic); 44885Assert.True(f2.IsStatic); 44886Assert.True(f3.IsStatic); 44887Assert.True(f4.IsStatic); 45035Assert.True(f1.IsStatic); 45036Assert.True(f2.IsStatic); 45037Assert.True(f3.IsStatic); 45038Assert.True(f4.IsStatic); 45176Assert.True(f1.IsStatic); 45177Assert.True(f2.IsStatic); 45178Assert.True(f3.IsStatic); 45368Assert.True(f1.IsStatic); 45369Assert.True(f2.IsStatic); 45370Assert.True(f3.IsStatic); 45371Assert.True(f4.IsStatic); 45508Assert.True(f1.IsStatic); 45509Assert.True(f2.IsStatic); 45510Assert.True(f3.IsStatic); 45511Assert.True(f4.IsStatic); 50933Assert.Equal(isStatic, m.IsStatic); 51856Assert.Equal(isStatic, i2m1.IsStatic); 51979Assert.Equal(isStatic, i2m1.IsStatic); 52375Assert.Equal(isStatic, reabstracting.IsStatic); 53557Assert.Equal(isStatic, i2p1.IsStatic); 53572Assert.Equal(isStatic, i2p1Get.IsStatic); 53589Assert.Equal(isStatic, i2p1Set.IsStatic); 57339Assert.Equal(isStatic, reabstracting.IsStatic);
Symbols\ExtensionMethodTests.cs (5)
123Assert.True(method.IsStatic); 129Assert.False(method.IsStatic); 137Assert.True(method.IsStatic); 143Assert.True(method.IsStatic); 149Assert.True(method.IsStatic);
Symbols\Metadata\MetadataMemberTests.cs (3)
167Assert.False(ctor.IsStatic); 209Assert.True(member1.IsStatic); 315Assert.False(member1.IsStatic);
Symbols\Metadata\MetadataTypeTests.cs (4)
90Assert.True(class1.IsStatic); 140Assert.False(type1.IsStatic); 188Assert.False(type1.IsStatic); 238Assert.False(type1.IsStatic);
Symbols\Metadata\PE\LoadingEvents.cs (2)
77Assert.False(instanceEvent.IsStatic); 86Assert.True(staticEvent.IsStatic);
Symbols\Metadata\PE\LoadingFields.cs (6)
53Assert.True(f1.IsStatic); 67Assert.False(f2.IsStatic); 75Assert.False(f3.IsStatic); 83Assert.False(f4.IsStatic); 91Assert.True(f5.IsStatic); 99Assert.False(f6.IsStatic);
Symbols\Metadata\PE\LoadingMethods.cs (2)
166Assert.False(basicC1_M12.IsStatic); 180Assert.True(console.GetMembers("WriteLine").OfType<MethodSymbol>().Single(m => m.IsVararg).IsStatic);
Symbols\Metadata\PE\TypeKindTests.cs (4)
79Assert.False(obj.IsStatic); 83Assert.False(@enum.IsStatic); 87Assert.False(func.IsStatic); 93Assert.True(console.IsStatic);
Symbols\Retargeting\RetargetCustomModifiers.cs (1)
187Assert.False(volatileFld.IsStatic);
Symbols\Source\EventTests.cs (6)
86Assert.False(@event.IsStatic); 103Assert.False(associatedField.IsStatic); 124Assert.True(@event.IsStatic); 141Assert.True(associatedField.IsStatic); 163Assert.False(@event.IsStatic); 198Assert.True(@event.IsStatic);
Symbols\Source\FieldTests.cs (4)
69Assert.False(sym.IsStatic); 147Assert.True(n1.IsStatic); 153Assert.False(n2.IsStatic); 162Assert.True(n3.IsStatic);
Symbols\Source\MethodTests.cs (8)
76ct.IsStatic ? WellKnownMemberNames.StaticConstructorName : WellKnownMemberNames.InstanceConstructorName, 378Assert.False(outP.IsStatic); 639Assert.True(m5.IsStatic); 704Assert.True(m5.IsStatic); 832Assert.True(m5.IsStatic); 899Assert.True(m5.IsStatic); 1906Assert.True(staticConstructor.IsStatic, "Static constructor should be static"); 1930Assert.True(staticConstructor.IsStatic, "Static constructor should be static");
Symbols\Source\ModifierTests.cs (2)
93Assert.True(m12.IsStatic); 128Assert.True(m12.IsStatic);
Symbols\StaticAbstractMembersInInterfacesTests.cs (232)
156Assert.True(m01.IsStatic); 168Assert.True(m02.IsStatic); 180Assert.True(m03.IsStatic); 192Assert.True(m04.IsStatic); 204Assert.True(m05.IsStatic); 216Assert.True(m06.IsStatic); 228Assert.True(m07.IsStatic); 240Assert.True(m08.IsStatic); 252Assert.True(m09.IsStatic); 264Assert.True(m10.IsStatic); 867Assert.True(m01.IsStatic); 995Assert.True(m01.IsStatic); 1025Assert.True(m01.IsStatic); 1067Assert.True(m01.IsStatic); 1082Assert.True(m01.IsStatic); 1160Assert.True(m01.IsStatic); 1197Assert.True(m01.IsStatic); 1234Assert.True(m01.IsStatic); 1281Assert.True(m01.IsStatic); 1296Assert.True(m01.IsStatic); 1332Assert.True(m01.IsStatic); 1347Assert.True(m01.IsStatic); 1387Assert.True(m01.IsStatic); 1402Assert.True(m01.IsStatic); 1445Assert.True(m01.IsStatic); 1460Assert.True(m01.IsStatic); 1500Assert.True(m01.IsStatic); 1515Assert.True(m01.IsStatic); 1558Assert.True(m01.IsStatic); 1573Assert.True(m01.IsStatic); 1739Assert.True(m01.IsStatic); 1749Assert.True(m02.IsStatic); 1759Assert.True(m03.IsStatic); 1769Assert.True(m04.IsStatic); 1779Assert.True(m05.IsStatic); 1789Assert.True(m06.IsStatic); 1799Assert.True(m07.IsStatic); 1809Assert.True(m08.IsStatic); 1819Assert.True(m09.IsStatic); 1829Assert.True(m10.IsStatic); 1841Assert.True(m01.IsStatic); 1853Assert.True(m02.IsStatic); 1865Assert.True(m03.IsStatic); 1877Assert.True(m04.IsStatic); 1889Assert.True(m05.IsStatic); 1901Assert.True(m06.IsStatic); 1913Assert.True(m07.IsStatic); 1925Assert.True(m08.IsStatic); 1937Assert.True(m09.IsStatic); 1949Assert.True(m10.IsStatic); 2545Assert.True(m01.IsStatic); 2555Assert.True(m02.IsStatic); 2565Assert.True(m03.IsStatic); 2575Assert.True(m04.IsStatic); 2585Assert.True(m05.IsStatic); 2595Assert.True(m06.IsStatic); 2605Assert.True(m07.IsStatic); 2615Assert.True(m08.IsStatic); 2625Assert.True(m09.IsStatic); 2635Assert.True(m10.IsStatic); 2649Assert.True(m01.IsStatic); 2661Assert.True(m02.IsStatic); 2673Assert.True(m03.IsStatic); 2685Assert.True(m04.IsStatic); 2697Assert.True(m05.IsStatic); 2709Assert.True(m06.IsStatic); 2721Assert.True(m07.IsStatic); 2733Assert.True(m08.IsStatic); 2745Assert.True(m09.IsStatic); 2757Assert.True(m10.IsStatic); 3377Assert.True(m01.IsStatic); 3389Assert.True(m02.IsStatic); 3401Assert.True(m03.IsStatic); 3413Assert.True(m04.IsStatic); 3425Assert.True(m05.IsStatic); 3437Assert.True(m06.IsStatic); 3449Assert.True(m07.IsStatic); 3461Assert.True(m08.IsStatic); 3473Assert.True(m09.IsStatic); 3485Assert.True(m10.IsStatic); 4144Assert.True(m01.IsStatic); 4157Assert.True(m01.IsStatic); 4170Assert.True(m01.IsStatic); 4390Assert.True(m01.IsStatic); 4403Assert.True(m01.IsStatic); 4416Assert.True(m01.IsStatic); 4576Assert.True(m01.IsStatic); 4589Assert.True(m01.IsStatic); 4602Assert.True(m01.IsStatic); 4816Assert.True(m01.IsStatic); 4829Assert.True(m01.IsStatic); 4842Assert.True(m01.IsStatic); 5319Assert.True(m01.IsStatic); 5355Assert.True(m01.IsStatic); 5504Assert.True(m01.IsStatic); 5572Assert.True(m01.IsStatic); 5612Assert.True(m01.IsStatic); 5656Assert.True(m01.IsStatic); 5887Assert.True(m01.IsStatic); 5926Assert.True(m01.IsStatic); 5991Assert.True(p01.IsStatic); 6003Assert.True(m01.IsStatic); 6036Assert.True(p01.IsStatic); 6048Assert.True(m01.IsStatic); 6129Assert.True(e01.IsStatic); 6141Assert.True(m01.IsStatic); 6175Assert.True(e01.IsStatic); 6187Assert.True(m01.IsStatic); 16101Assert.True(cM01.IsStatic); 16163Assert.True(cM01.IsStatic); 16509Assert.True(c2M01.IsStatic); 16524Assert.True(c1M01.IsStatic); 16594Assert.True(c1M01.IsStatic); 16610Assert.True(c1M01.IsStatic); 16631Assert.True(c2M01.IsStatic); 16717Assert.True(c1M01.IsStatic); 16810Assert.True(c2M01.IsStatic); 19336Assert.True(cM01.IsStatic); 19417Assert.True(cM01.IsStatic); 19509Assert.True(cM01.IsStatic); 19607Assert.True(cM01.IsStatic); 19690Assert.True(cM01.IsStatic); 19782Assert.True(cM01.IsStatic); 19871Assert.True(cM01.IsStatic); 20826Assert.True(c2M01.IsStatic); 20844Assert.True(c1M01.IsStatic); 20942Assert.True(c1M01.IsStatic); 20958Assert.True(c1M01.IsStatic); 20979Assert.True(c2M01.IsStatic); 21053Assert.True(c1M01.IsStatic); 21069Assert.True(c1M01.IsStatic); 21090Assert.True(c2M01.IsStatic); 21188Assert.True(c1M01.IsStatic); 21204Assert.True(c1M01.IsStatic); 21224Assert.True(c2M01.IsStatic); 21492Assert.True(c1M01.IsStatic); 21619Assert.True(c2M01.IsStatic); 22966Assert.True(cM01.IsStatic); 22975Assert.True(cM01Get.IsStatic); 22990Assert.True(cM01Set.IsStatic); 23062Assert.True(cM01.IsStatic); 23071Assert.True(cM01Get.IsStatic); 23083Assert.True(cM01Set.IsStatic); 23152Assert.True(cM01.IsStatic); 23161Assert.True(cM01Get.IsStatic); 23176Assert.True(cM01Set.IsStatic); 23685Assert.True(cM01.IsStatic); 23694Assert.True(cM01Get.IsStatic); 23743Assert.True(cM01.IsStatic); 23752Assert.True(cM01Get.IsStatic); 23764Assert.True(cM01Set.IsStatic); 23847Assert.True(cM01.IsStatic); 23856Assert.True(cM01Get.IsStatic); 24037Assert.True(cM01.IsStatic); 24046Assert.True(cM01Set.IsStatic); 24095Assert.True(cM01.IsStatic); 24104Assert.True(cM01Set.IsStatic); 24116Assert.True(cM01Get.IsStatic); 24199Assert.True(cM01.IsStatic); 24208Assert.True(cM01Set.IsStatic); 24425Assert.True(c2M01Get.IsStatic); 24432Assert.True(c2M01Set.IsStatic); 24460Assert.True(c1M01.IsStatic); 24465Assert.True(c1M01Get.IsStatic); 24476Assert.True(c1M01Set.IsStatic); 24489Assert.True(c2M01.IsStatic); 24616Assert.True(c1M01.IsStatic); 24622Assert.True(c1M01Get.IsStatic); 24633Assert.True(c1M01Set.IsStatic); 24649Assert.True(c1M01Set.IsStatic); 24670Assert.True(c2M01.IsStatic); 24675Assert.True(c2M01Get.IsStatic); 24686Assert.True(c2M01Set.IsStatic); 24710Assert.True(c3M01.IsStatic); 24715Assert.True(c3M01Get.IsStatic); 24726Assert.True(c3M01Set.IsStatic); 24816Assert.True(c1M01.IsStatic); 24823Assert.True(c1M01Get.IsStatic); 24833Assert.True(c1M01Set.IsStatic); 24948Assert.True(c2M01.IsStatic); 24953Assert.True(c2M01Get.IsStatic); 24961Assert.True(c2M01Set.IsStatic); 25744Assert.True(cM01.IsStatic); 25753Assert.True(cM01Add.IsStatic); 25768Assert.True(cM01Remove.IsStatic); 25839Assert.True(cM01.IsStatic); 25848Assert.True(cM01Add.IsStatic); 25863Assert.True(cM01Remove.IsStatic); 26387Assert.True(cM01.IsStatic); 26396Assert.True(cM01Add.IsStatic); 26408Assert.True(cM01Remove.IsStatic); 26661Assert.True(cM01.IsStatic); 26670Assert.True(cM01Remove.IsStatic); 26682Assert.True(cM01Add.IsStatic); 26953Assert.True(c2M01Add.IsStatic); 26960Assert.True(c2M01Remove.IsStatic); 26988Assert.True(c1M01.IsStatic); 26993Assert.True(c1M01Add.IsStatic); 27004Assert.True(c1M01Remove.IsStatic); 27017Assert.True(c2M01.IsStatic); 27156Assert.True(c1M01.IsStatic); 27164Assert.True(c1M01Add.IsStatic); 27175Assert.True(c1M01Remove.IsStatic); 27189Assert.True(c1M01Add.IsStatic); 27201Assert.True(c1M01Remove.IsStatic); 27226Assert.True(c2M01.IsStatic); 27231Assert.True(c2M01Add.IsStatic); 27243Assert.True(c2M01Remove.IsStatic); 27267Assert.True(c3M02.IsStatic); 27275Assert.True(c3M02Add.IsStatic); 27286Assert.True(c3M02Remove.IsStatic); 27300Assert.True(c3M02Add.IsStatic); 27312Assert.True(c3M02Remove.IsStatic); 27339Assert.True(c4M02.IsStatic); 27344Assert.True(c4M02Add.IsStatic); 27357Assert.True(c4M02Remove.IsStatic); 27481Assert.True(c1M01.IsStatic); 27488Assert.True(c1M01Add.IsStatic); 27498Assert.True(c1M01Remove.IsStatic); 27614Assert.True(c2M01.IsStatic); 27619Assert.True(c2M01Add.IsStatic); 27627Assert.True(c2M01Remove.IsStatic); 28693Assert.True(cM01.IsStatic); 28718Assert.True(cM02.IsStatic); 28819Assert.True(cM01.IsStatic); 28835Assert.True(cM02.IsStatic); 29285Assert.True(c2M01.IsStatic); 29303Assert.True(c1M01.IsStatic); 29400Assert.True(c1M01.IsStatic); 29416Assert.True(c1M01.IsStatic); 29437Assert.True(c2M01.IsStatic); 29553Assert.True(c1M01.IsStatic);
Symbols\TypeTests.cs (3)
471Assert.True(field1.IsStatic); 477Assert.False(elemType1.Type.IsStatic); 684Assert.Equal(isStatic, symbol.IsStatic);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
Extensions.cs (2)
588Assert.Equal(propertyOrEvent.IsStatic, accessor.IsStatic);
FunctionPointerUtilities.cs (1)
68Assert.False(symbol.IsStatic);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (4)
Metadata\WinMdEventTests.cs (4)
3506Assert.False(instanceEvent.AddMethod.IsStatic); 3507Assert.True(instanceEvent.RemoveMethod.IsStatic); 3511Assert.True(staticEvent.AddMethod.IsStatic); 3512Assert.False(staticEvent.RemoveMethod.IsStatic);