6 implementations of IsStatic
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
94public bool IsStatic
Microsoft.CodeAnalysis.CSharp (2)
Symbols\PublicModel\PreprocessingSymbol.cs (1)
116bool ISymbol.IsStatic => false;
Symbols\PublicModel\Symbol.cs (1)
213bool ISymbol.IsStatic
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (1)
57public bool IsStatic => _symbol.IsStatic;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\Symbol.vb (1)
1265Protected Overridable ReadOnly Property ISymbol_IsStatic As Boolean Implements ISymbol.IsStatic, ISymbolInternal.IsStatic
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
94public bool IsStatic
387 references to IsStatic
ConfigurationSchemaGenerator (2)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
956if (throwIfNullMethod is IMethodSymbol throwIfNullMethodSymbol && throwIfNullMethodSymbol.IsStatic && throwIfNullMethodSymbol.Parameters.Length == 2)
RuntimeSource\Configuration.Binder\Specs\Members\PropertySpec.cs (1)
17IsStatic = property.IsStatic;
ILLink.RoslynAnalyzer (24)
DataFlow\DynamicallyAccessedMembersBinder.cs (14)
130 if ((bindingFlags & (BindingFlags.Instance | BindingFlags.Static)) == BindingFlags.Static && !method.IsStatic) 133 if ((bindingFlags & (BindingFlags.Instance | BindingFlags.Static)) == BindingFlags.Instance && method.IsStatic) 166 if ((bindingFlags & (BindingFlags.Instance | BindingFlags.Static)) == BindingFlags.Static && !method.IsStatic) 169 if ((bindingFlags & (BindingFlags.Instance | BindingFlags.Static)) == BindingFlags.Instance && method.IsStatic) 205 if ((bindingFlags & (BindingFlags.Instance | BindingFlags.Static)) == BindingFlags.Static && !field.IsStatic) 208 if ((bindingFlags & (BindingFlags.Instance | BindingFlags.Static)) == BindingFlags.Instance && field.IsStatic) 266 if ((property.GetMethod != null) && !property.GetMethod.IsStatic) continue; 267 if ((property.SetMethod != null) && !property.SetMethod.IsStatic) continue; 271 if ((property.GetMethod != null) && property.GetMethod.IsStatic) continue; 272 if ((property.SetMethod != null) && property.SetMethod.IsStatic) continue; 316 if ((@event.AddMethod != null) && !@event.AddMethod.IsStatic) continue; 317 if ((@event.RemoveMethod != null) && !@event.RemoveMethod.IsStatic) continue; 321 if ((@event.AddMethod != null) && @event.AddMethod.IsStatic) continue; 322 if ((@event.RemoveMethod != null) && @event.RemoveMethod.IsStatic) continue;
DynamicallyAccessedMembersAnalyzer.cs (1)
249 if (!overrideMethod.IsStatic) {
IMethodSymbolExtensions.cs (1)
14 return !method.IsStatic;
RequiresAnalyzerBase.cs (1)
316 if (!propertySymbol.IsStatic || propertySymbol.Type.SpecialType != SpecialType.System_Boolean || propertySymbol.SetMethod != null)
RequiresISymbolExtensions.cs (2)
25 if (member.IsStatic || member.IsConstructor ()) 65 if (member is IFieldSymbol field && !field.IsStatic) {
TrimAnalysis\FeatureCheckReturnValuePattern.cs (1)
40 if (!OwningSymbol.IsStatic || OwningSymbol.Type.SpecialType != SpecialType.System_Boolean || OwningSymbol.SetMethod != null) {
TrimAnalysis\MethodProxy.cs (1)
51 internal partial bool IsStatic () => Method.IsStatic;
TrimAnalysis\TrimAnalysisVisitor.cs (3)
149 if (OwningSymbol is IMethodSymbol method && !method.IsStatic) 397 if (!method.IsStatic && !method.IsGenericMethod && !method.IsConstructor ()) 413 if (!field.IsStatic)
Microsoft.Analyzers.Local (1)
ApiLifecycle\AssemblyAnalysis.cs (1)
285if (type.IsStatic)
Microsoft.AspNetCore.App.Analyzers (5)
src\Shared\Roslyn\MvcFacts.cs (1)
83if (method.IsStatic)
src\Shared\RoslynUtils\ParsabilityHelper.cs (4)
97methodSymbol.IsStatic && 107methodSymbol.IsStatic && 137methodSymbol.IsStatic && 148methodSymbol.IsStatic &&
Microsoft.AspNetCore.Http.RequestDelegateGenerator (5)
src\Shared\RoslynUtils\ParsabilityHelper.cs (4)
97methodSymbol.IsStatic && 107methodSymbol.IsStatic && 137methodSymbol.IsStatic && 148methodSymbol.IsStatic &&
StaticRouteHandlerModel\EndpointParameter.cs (1)
469var constructors = type.Constructors.Where(constructor => constructor.DeclaredAccessibility == Accessibility.Public && !constructor.IsStatic);
Microsoft.AspNetCore.Mvc.Analyzers (4)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (2)
70!method.IsStatic && 78!type.IsStatic &&
src\Shared\Roslyn\MvcFacts.cs (1)
83if (method.IsStatic)
TopLevelParameterNameAnalyzer.cs (1)
111member.IsStatic ||
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
src\Shared\Roslyn\MvcFacts.cs (1)
83if (method.IsStatic)
SymbolApiResponseMetadataProvider.cs (2)
111.FirstOrDefault(m => m.Kind == SymbolKind.Method && m.IsStatic && m.DeclaredAccessibility == Accessibility.Public); 125if (!conventionMethod.IsStatic || conventionMethod.DeclaredAccessibility != Accessibility.Public)
Microsoft.CodeAnalysis (21)
Operations\ControlFlowGraphBuilder.cs (20)
4577IOperation? collection = info.GetEnumeratorMethod.IsStatic ? null : Visit(operation.Collection); 4637var instance = info.CurrentProperty.IsStatic ? null : enumeratorRef; 4697return makeInvocation(instance.Syntax, method, method.IsStatic ? null : instance, arguments); 4702Debug.Assert(method.IsStatic == (instanceOpt == null)); 5828if (localSymbol.IsStatic) 5872Debug.Assert((afterInitialization, localSymbol.IsStatic) is (null, false) or (not null, true)); 5882if (localSymbol.IsStatic) 5930IOperation? instance = operation.TargetMethod.IsStatic ? null : operation.Instance; 6180if (!memberReference.Member.IsStatic && memberReference.Instance != null) 6232instance = (!fieldReference.Member.IsStatic && fieldReference.Instance != null) ? PopOperand() : null; 6237instance = (!eventReference.Member.IsStatic && eventReference.Instance != null) ? PopOperand() : null; 6242instance = (!propertyReference.Member.IsStatic && propertyReference.Instance != null) ? PopOperand() : null; 7126IOperation? visitedInstance = operation.Field.IsStatic ? null : Visit(operation.Instance); 7133IOperation? visitedInstance = operation.Method.IsStatic ? null : Visit(operation.Instance); 7160IOperation? instance = operation.Property.IsStatic ? null : operation.Instance; 7169IOperation? visitedInstance = operation.Event.IsStatic ? null : Visit(operation.Instance); 7220IInstanceReferenceOperation? instance = fieldSymbol.IsStatic ? 7238var instance = propertySymbol.IsStatic ? 7298var eventReferenceInstance = eventReference.Event.IsStatic ? null : eventReference.Instance; 7352VisitInstanceWithArguments(operation.EventReference.Event.IsStatic ? null : operation.EventReference.Instance, operation.Arguments);
Symbols\ISymbolExtensions.cs (1)
182IsStatic: false,
Microsoft.CodeAnalysis.CodeStyle (24)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (2)
175return !symbol.IsStatic; 181return !symbol.IsStatic;
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
274if (!field.IsStatic)
src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (2)
59if (context.ContainingSymbol.IsStatic) 149return symbol == null || symbol.IsStatic || symbol is IMethodSymbol { MethodKind: MethodKind.LocalFunction };
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
606(symbol.IsStatic && symbol.Kind == SymbolKind.Local) ||
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
273if (method is { MetadataName: "GetInstance", IsStatic: true, Parameters: [{ Type.SpecialType: SpecialType.System_String }] } &&
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
420if (getterField.IsStatic != property.IsStatic)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
80if (memberSymbol?.IsStatic is true)
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
116if (leftSymbol?.IsStatic is true)
src\Workspaces\Core\Portable\Editing\DeclarationModifiers.cs (1)
80isStatic: symbol.IsStatic && !isConst,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IMethodSymbolExtensions.cs (1)
104methodSymbol.IsStatic &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (5)
226if (member is IMethodSymbol { IsStatic: true, IsAbstract: true, MethodKind: MethodKind.UserDefinedOperator } method) 488!fieldSymbol.IsStatic) 499!propertySymbol.IsStatic && 540IsStatic: false, 659IsStatic: false,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
521=> symbol != null && symbol.Kind == SymbolKind.NamedType && symbol.IsStatic;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
144if (symbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
701if (!fieldSymbol.IsConst && !fieldSymbol.IsReadOnly && !fieldSymbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
62if (symbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
497(Modifier.IsStatic && symbol.IsStatic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
698=> symbol is INamespaceOrTypeSymbol or { IsStatic: true };
Microsoft.CodeAnalysis.CodeStyle.Fixes (20)
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
54if (method.IsStatic)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
543if (symbol != null && !symbol.IsStatic)
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (1)
56if (ClassType.IsStatic ||
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (1)
50!state.TypeToGenerateIn.IsStatic &&
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
254if (member is IMethodSymbol { IsStatic: false, ReturnsVoid: true, Arity: 0, Parameters.Length: 0 } disposeMethod)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (4)
206var generateAbstractly = !member.IsStatic && !generateInvisibleMember && Abstractly; 288var modifiers = new DeclarationModifiers(isStatic: member.IsStatic, isAbstract: generateAbstractly, isNew: addNew, isUnsafe: addUnsafe); 416member1.IsStatic != member2.IsStatic)
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (1)
63var isEntryPoint = methodSymbol.IsStatic && IsLikelyEntryPointName(methodSymbol.Name, document);
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
40type.TypeKind == TypeKind.Class && type.IsSealed && !type.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (2)
174this.GetMembers().OfType<IMethodSymbol>().Where(m => m.MethodKind == MethodKind.Constructor && !m.IsStatic)); 184this.GetMembers().OfType<IMethodSymbol>().Where(m => m.MethodKind == MethodKind.StaticConstructor && m.IsStatic));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISymbolExtensions.cs (1)
18isStatic: symbol.IsStatic,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
121var through = throughMember.IsStatic 161else if (throughMember is IPropertySymbol { IsStatic: false, ExplicitInterfaceImplementations: [var explicitlyImplementedProperty, ..] })
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
507.Where(field => !field.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (1)
37s is { Kind: SymbolKind.NamedType, IsStatic: true };
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (1)
120if (symbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\Simplifiers\AbstractMemberAccessExpressionSimplifier.cs (1)
62if (!symbolInfo.Symbol.IsStatic && optionValue.Value)
Microsoft.CodeAnalysis.CSharp (1)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
934if (symbol.IsStatic && !isConst)
Microsoft.CodeAnalysis.CSharp.CodeStyle (11)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
81.Any(field => field is { AssociatedSymbol: null, IsStatic: false, IsReadOnly: true });
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
178|| owningMethod.IsStatic
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (1)
126if (createSymbol is not IMethodSymbol { IsStatic: true } createMethod)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (4)
371var constructor = constructors.FirstOrDefault(c => !c.IsStatic && predicate(c)); 873if (semanticModel.GetSymbolInfo(memberAccessExpression, cancellationToken).Symbol is not IMethodSymbol { IsStatic: true } createMethod) 1106if (emptySymbol is not { IsStatic: true }) 1138if (emptySymbol is not { IsStatic: true })
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (1)
34=> !symbol.IsStatic && symbol.DeclaredAccessibility == Accessibility.Public;
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
99if (member.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
145if (!methodSymbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
289if (!symbol.IsStatic)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (19)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
48IsStatic: false, 108.Where(field => !field.IsConst && !field.IsStatic)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
126propertySymbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConstructorGenerator.cs (1)
121if (constructor.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (1)
106return method.IsStatic ? [StaticKeyword] : [];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (3)
200if (@event.IsStatic) 208if (@event.IsStatic) 221if (@event.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\FieldGenerator.cs (1)
133if (field.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (4)
262if (method.IsStatic) 273if (method.IsStatic) 287if (method.IsStatic) 312if (method.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
285if (namedType.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (3)
353if (property.IsStatic) 361if (property.IsStatic) 373if (property.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
2019if (method.IsStatic) 2026return enclosingSymbol is { IsStatic: false };
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (10)
CodeGen\CodeGenLocalFunctionTests.cs (10)
2594Assert.True(goo.IsStatic); 2612Assert.True(goo.IsStatic); 3135Assert.True(goo.IsStatic); 3208Assert.True(inner.IsStatic); 3209Assert.True(middle.IsStatic); 3210Assert.True(outer.IsStatic); 3278Assert.True(goo.IsStatic); 3314Assert.True(goo.IsStatic); 3315Assert.True(bar.IsStatic); 4240Assert.True(goo.IsStatic);
Microsoft.CodeAnalysis.CSharp.Features (22)
CodeLens\CSharpCodeLensDisplayInfoService.cs (1)
112var constructorName = symbol.IsStatic ? "cctor" : "ctor";
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
523IsStatic: false,
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (2)
224if (member is IFieldSymbol { IsStatic: true } field) 229else if (member is IPropertySymbol { IsStatic: true, IsIndexer: false } property)
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
41property.IsStatic ? DeclarationModifiers.Static : DeclarationModifiers.None,
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
953if (method.IsStatic)
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
98new DeclarationModifiers(isStatic: field.IsStatic, isReadOnly: field.IsReadOnly, isConst: field.IsConst),
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_MethodGroup.cs (3)
69methodGroup = methodGroup.Where(m => (m.IsStatic && includeStatic) || (!m.IsStatic && includeInstance)); 75methodGroup = methodGroup.Where(m => m.IsStatic || m is IMethodSymbol { MethodKind: MethodKind.LocalFunction });
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
81.Any(field => field is { AssociatedSymbol: null, IsStatic: false, IsReadOnly: true });
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
178|| owningMethod.IsStatic
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (1)
126if (createSymbol is not IMethodSymbol { IsStatic: true } createMethod)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (4)
371var constructor = constructors.FirstOrDefault(c => !c.IsStatic && predicate(c)); 873if (semanticModel.GetSymbolInfo(memberAccessExpression, cancellationToken).Symbol is not IMethodSymbol { IsStatic: true } createMethod) 1106if (emptySymbol is not { IsStatic: true }) 1138if (emptySymbol is not { IsStatic: true })
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (1)
34=> !symbol.IsStatic && symbol.DeclaredAccessibility == Accessibility.Public;
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
99if (member.IsStatic)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
48IsStatic: false, 108.Where(field => !field.IsConst && !field.IsStatic)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
126propertySymbol.IsStatic)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IAnonymousFunctionExpression.cs (1)
493Assert.True(lambdaOperation.Symbol.IsStatic);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (9)
Semantics\AnonymousFunctionTests.cs (6)
991Assert.True(anonymousMethod.IsStatic); 992Assert.True(simpleLambda.IsStatic); 993Assert.True(parenthesizedLambda.IsStatic); 1025Assert.False(anonymousMethod.IsStatic); 1026Assert.False(simpleLambda.IsStatic); 1027Assert.False(parenthesizedLambda.IsStatic);
Semantics\OperatorTests.cs (2)
7662Assert.True(symbol1.IsStatic); 8457Assert.True(symbol1.IsStatic);
Semantics\StructConstructorTests.cs (1)
4898Assert.True(constructors.All(c => c is { IsStatic: false, IsImplicitlyDeclared: false }));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (9)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
1633var symbols = model.LookupSymbols(position).Where(s => !s.IsStatic && !((s is ITypeSymbol))); 1636var symbols2 = model.LookupSymbols(position, container: symbolC).Where(s => !s.IsStatic && !((s is ITypeSymbol)));
Symbols\AssemblyAndNamespaceTests.cs (2)
39Assert.False(sym.IsStatic); 66Assert.False(sym.IsStatic);
Symbols\LocalFunctionTests.cs (3)
37Assert.False(local.IsStatic); 58Assert.True(local.IsStatic); 79Assert.False(local.IsStatic);
Symbols\Source\MethodTests.cs (1)
76ct.IsStatic ? WellKnownMemberNames.StaticConstructorName : WellKnownMemberNames.InstanceConstructorName,
Symbols\TypeTests.cs (1)
472Assert.True(field1.IsStatic);
Microsoft.CodeAnalysis.CSharp.Workspaces (23)
Recommendations\CSharpRecommendationServiceRunner.cs (2)
815if (symbol.IsStatic || symbol is ITypeSymbol) 831if (excludeInstance && containerType is ITypeParameterSymbol && symbol.IsStatic)
Simplification\CSharpSimplificationService.Expander.cs (2)
562((IMethodSymbol)symbol).IsStatic) 671if (symbol.IsStatic ||
Simplification\Simplifiers\ExpressionSimplifier.cs (1)
420if (rightSymbol != null && (rightSymbol.IsStatic || rightSymbol.Kind == SymbolKind.NamedType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
145if (!methodSymbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
289if (!symbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConstructorGenerator.cs (1)
121if (constructor.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (1)
106return method.IsStatic ? [StaticKeyword] : [];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (3)
200if (@event.IsStatic) 208if (@event.IsStatic) 221if (@event.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\FieldGenerator.cs (1)
133if (field.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (4)
262if (method.IsStatic) 273if (method.IsStatic) 287if (method.IsStatic) 312if (method.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
285if (namedType.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (3)
353if (property.IsStatic) 361if (property.IsStatic) 373if (property.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
2019if (method.IsStatic) 2026return enclosingSymbol is { IsStatic: false };
Microsoft.CodeAnalysis.Features (44)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
53if (typeSymbol.IsStatic || !IsClassOrStruct(typeSymbol))
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
111!member.IsStatic &&
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (1)
106modifiers = new DeclarationModifiers(method.IsStatic, isUnsafe: method.RequiresUnsafeModifier(), isPartial: true, isAsync: modifiers.IsAsync);
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
121if (namedType.IsStructType() || namedType.IsStatic || namedType.IsSealed)
EmbeddedLanguages\Json\LanguageServices\JsonLanguageDetector.cs (1)
144if (symbol is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, IsStatic: true } &&
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexLanguageDetector.cs (2)
64where method.IsStatic 152method.IsStatic &&
EncapsulateField\AbstractEncapsulateFieldService.cs (3)
349modifiers: new DeclarationModifiers(isStatic: field.IsStatic, isReadOnly: field.IsReadOnly, isUnsafe: field.RequiresUnsafeModifier()), 379var assigned = !field.IsStatic 398var value = !field.IsStatic
ExtractInterface\AbstractExtractInterfaceService.cs (1)
437if (m.IsStatic ||
ExtractMethod\MethodExtractor.Analyzer.cs (1)
501if (symbol.IsStatic)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (3)
92if (containingType.IsStatic) 160.Any(m => m.Parameters.Length == 1 && !m.IsStatic); 164.Any(m => m.Parameters.Length == 0 && !m.IsStatic);
GenerateFromMembers\AbstractGenerateFromMembersCodeRefactoringProvider.cs (2)
55=> !symbol.IsStatic && IsReadableFieldOrProperty(symbol); 58=> !symbol.IsStatic && IsWritableFieldOrProperty(symbol);
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
619if (symbol != null && !symbol.IsStatic && parameterType.Language == symbol.Language)
GenerateType\AbstractGenerateTypeService.State.cs (1)
242if (baseType.IsSealed || baseType.IsStatic)
InheritanceMargin\AbstractInheritanceMarginService.cs (1)
72return !symbol.IsStatic && namedType.TypeKind is TypeKind.Interface or TypeKind.Class or TypeKind.Struct;
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (1)
57public bool IsStatic => _symbol.IsStatic;
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (2)
42if (propertyBackingField.IsStatic) 324var container = _propertyBackingField.IsStatic
Snippets\SnippetFunctionService.cs (1)
64var enumFields = typeSymbol.GetMembers().Where(m => m.Kind == SymbolKind.Field && m.IsStatic);
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (2)
175return !symbol.IsStatic; 181return !symbol.IsStatic;
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
274if (!field.IsStatic)
src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (2)
59if (context.ContainingSymbol.IsStatic) 149return symbol == null || symbol.IsStatic || symbol is IMethodSymbol { MethodKind: MethodKind.LocalFunction };
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
606(symbol.IsStatic && symbol.Kind == SymbolKind.Local) ||
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
273if (method is { MetadataName: "GetInstance", IsStatic: true, Parameters: [{ Type.SpecialType: SpecialType.System_String }] } &&
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
420if (getterField.IsStatic != property.IsStatic)
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
54if (method.IsStatic)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
543if (symbol != null && !symbol.IsStatic)
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (1)
56if (ClassType.IsStatic ||
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (1)
50!state.TypeToGenerateIn.IsStatic &&
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
254if (member is IMethodSymbol { IsStatic: false, ReturnsVoid: true, Arity: 0, Parameters.Length: 0 } disposeMethod)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (4)
206var generateAbstractly = !member.IsStatic && !generateInvisibleMember && Abstractly; 288var modifiers = new DeclarationModifiers(isStatic: member.IsStatic, isAbstract: generateAbstractly, isNew: addNew, isUnsafe: addUnsafe); 416member1.IsStatic != member2.IsStatic)
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (1)
63var isEntryPoint = methodSymbol.IsStatic && IsLikelyEntryPointName(methodSymbol.Name, document);
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
40type.TypeKind == TypeKind.Class && type.IsSealed && !type.IsStatic)
Microsoft.CodeAnalysis.Test.Utilities (11)
Compilation\OperationTreeVerifier.cs (3)
1042Assert.False(memberReference.Member.IsStatic && !operation.HasErrors(this._compilation)); 1046Assert.False(invocation.TargetMethod.IsStatic); 1053if (operation.Member.IsStatic)
Compilation\TestOperationVisitor.cs (6)
555if (operation.TargetMethod.IsStatic && 665if (operation.Member.IsStatic && 774if ((operatorMethod is null || !operatorMethod.IsStatic || (!operatorMethod.IsVirtual && !operatorMethod.IsAbstract)) && 775(unaryOperatorMethod is null || !unaryOperatorMethod.IsStatic || (!unaryOperatorMethod.IsVirtual && !unaryOperatorMethod.IsAbstract))) 876if (member is null || !member.IsStatic || (!member.IsVirtual && !member.IsAbstract)) 1758Assert.True(operation.Local.IsStatic);
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (1)
127if (staticConstructorType != null && targetField.IsStatic && targetField.ContainingType == staticConstructorType)
Diagnostics\OperationTestAnalyzer.cs (1)
1406if (memberSymbol.IsStatic)
Microsoft.CodeAnalysis.VisualBasic (4)
Operations\VisualBasicOperationFactory_Methods.vb (1)
282symbol.IsStatic AndAlso
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
619If symbol.IsStatic AndAlso
Symbols\Symbol.vb (1)
1265Protected Overridable ReadOnly Property ISymbol_IsStatic As Boolean Implements ISymbol.IsStatic, ISymbolInternal.IsStatic
VisualBasicExtensions.vb (1)
524Return symbol.IsStatic
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (6)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ConstructorGenerator.vb (1)
85If constructor.IsStatic Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (1)
172If [event].IsStatic Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\FieldGenerator.vb (1)
114If field.IsStatic AndAlso destination <> CodeGenerationDestination.ModuleType Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\MethodGenerator.vb (1)
165If method.IsStatic AndAlso destination <> CodeGenerationDestination.ModuleType Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (1)
191If [property].IsStatic AndAlso destination <> CodeGenerationDestination.ModuleType Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (1)
19If symbol.IsStatic AndAlso Not symbol.MethodKind = MethodKind.ReducedExtension Then
Microsoft.CodeAnalysis.VisualBasic.Features (4)
Completion\CompletionProviders\CrefCompletionProvider.vb (1)
189If Not constructor.IsStatic Then
Completion\CompletionProviders\ObjectInitializerCompletionProvider.vb (1)
114Not member.IsStatic AndAlso
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
648If method.IsStatic Then
ExtractMethod\VisualBasicSelectionValidator.vb (1)
209If Not local.IsStatic Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
Simplification\Simplifiers\ExpressionSimplifier.vb (1)
239If rightSymbol IsNot Nothing AndAlso (rightSymbol.IsStatic OrElse rightSymbol.Kind = SymbolKind.NamedType) Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ConstructorGenerator.vb (1)
85If constructor.IsStatic Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (1)
172If [event].IsStatic Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\FieldGenerator.vb (1)
114If field.IsStatic AndAlso destination <> CodeGenerationDestination.ModuleType Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\MethodGenerator.vb (1)
165If method.IsStatic AndAlso destination <> CodeGenerationDestination.ModuleType Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (1)
191If [property].IsStatic AndAlso destination <> CodeGenerationDestination.ModuleType Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (1)
19If symbol.IsStatic AndAlso Not symbol.MethodKind = MethodKind.ReducedExtension Then
Microsoft.CodeAnalysis.Workspaces (29)
Classification\SyntaxClassification\AbstractNameSyntaxClassifier.cs (1)
40if (!symbol.IsStatic)
Editing\DeclarationModifiers.cs (1)
80isStatic: symbol.IsStatic && !isConst,
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (1)
74IsStatic: false,
Recommendations\AbstractRecommendationService.cs (1)
125!symbol.IsStatic &&
Shared\Extensions\ISymbolExtensions.cs (2)
517if (left.IsStatic != right.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IMethodSymbolExtensions.cs (1)
104methodSymbol.IsStatic &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (5)
226if (member is IMethodSymbol { IsStatic: true, IsAbstract: true, MethodKind: MethodKind.UserDefinedOperator } method) 488!fieldSymbol.IsStatic) 499!propertySymbol.IsStatic && 540IsStatic: false, 659IsStatic: false,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
521=> symbol != null && symbol.Kind == SymbolKind.NamedType && symbol.IsStatic;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
144if (symbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
701if (!fieldSymbol.IsConst && !fieldSymbol.IsReadOnly && !fieldSymbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
62if (symbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
497(Modifier.IsStatic && symbol.IsStatic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
698=> symbol is INamespaceOrTypeSymbol or { IsStatic: true };
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (2)
174this.GetMembers().OfType<IMethodSymbol>().Where(m => m.MethodKind == MethodKind.Constructor && !m.IsStatic)); 184this.GetMembers().OfType<IMethodSymbol>().Where(m => m.MethodKind == MethodKind.StaticConstructor && m.IsStatic));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISymbolExtensions.cs (1)
18isStatic: symbol.IsStatic,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
121var through = throughMember.IsStatic 161else if (throughMember is IPropertySymbol { IsStatic: false, ExplicitInterfaceImplementations: [var explicitlyImplementedProperty, ..] })
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
446!method.IsStatic && 507.Where(field => !field.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (1)
208!method.IsStatic &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (1)
37s is { Kind: SymbolKind.NamedType, IsStatic: true };
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (1)
120if (symbol.IsStatic)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\Simplifiers\AbstractMemberAccessExpressionSimplifier.cs (1)
62if (!symbolInfo.Symbol.IsStatic && optionValue.Value)
Microsoft.Extensions.Options.SourceGeneration (4)
Parser.cs (2)
62if (validatorType.IsStatic) 537if (member.IsStatic)
ParserUtilities.cs (2)
83property.Kind == SymbolKind.Property && !property.IsStatic && property.GetMethod != null && property.Parameters.IsEmpty)) 97!property.IsStatic && property.GetMethod != null && property.Parameters.IsEmpty))
Microsoft.Gen.ContextualOptions (2)
Parser.cs (2)
26if (type.Symbol.IsStatic) 79.Where(prop => !prop.IsStatic)
Microsoft.Gen.Logging (7)
Parsing\Parser.cs (1)
381IsStatic = methodSymbol.IsStatic,
Parsing\Parser.LogProperties.cs (4)
250if ((property.DeclaredAccessibility != Accessibility.Public || property.IsStatic) 292if ((property.DeclaredAccessibility != Accessibility.Public || property.IsStatic) 306if ((property.DeclaredAccessibility != Accessibility.Public || property.IsStatic) 339!symType.IsStatic;
Parsing\Parser.Records.cs (1)
58m.IsStatic)
Parsing\Parser.TagProvider.cs (1)
95if (method.IsStatic
Microsoft.Gen.Metrics (2)
Parser.cs (2)
481bool isStatic = methodSymbol.IsStatic; 690member.IsStatic)
Microsoft.Gen.MetricsReports (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
481bool isStatic = methodSymbol.IsStatic; 690member.IsStatic)
Microsoft.Interop.ComInterfaceGenerator (3)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
65foreach (var method in type.GetMembers().OfType<IMethodSymbol>().Where(m => !m.IsStatic && m.IsAbstract))
ComMethodInfo.cs (2)
45if (member.IsStatic) 89Debug.Assert(method is { IsStatic: false, MethodKind: MethodKind.Ordinary });
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (1)
710if (marshallerType.IsReferenceType && marshallerType.IsStatic)
Analyzers\CustomMarshallerAttributeFixer.cs (1)
194if (marshallerType.IsStatic && marshallerType.IsReferenceType)
Microsoft.Interop.SourceGeneration (32)
CustomMarshallingInfoHelper.cs (2)
29if (!(entryPointType.IsStatic && entryPointType.TypeKind == TypeKind.Class) 145if (!(entryPointType.IsStatic && entryPointType.TypeKind == TypeKind.Class)
ManualTypeMarshallingHelper.cs (1)
412if (marshallerType is { IsStatic: true, TypeKind: TypeKind.Class })
MarshallerShape.cs (28)
209.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: true }); 219.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1 } and 262.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false } 274.Where(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false } 293.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false } 302.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false } 314.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false } 325.Where(m => m is { IsStatic: true, Parameters.Length: 3, ReturnsVoid: false } 346.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 356.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 366.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false } 376.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false } 386.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 396.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 565.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 1, ReturnsVoid: true } 576.Where(m => m is { IsStatic: false, Parameters.Length: 2, ReturnsVoid: true } 594.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnsByRef: false, ReturnsByRefReadonly: false } 602.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnsByRef: false, ReturnsByRefReadonly: false } 610.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnsByRef: false, ReturnsByRefReadonly: false }); 617.Where(m => m is { IsStatic: false, Parameters.Length: 1, ReturnsVoid: true }) 656.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: true }); 663.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: true }); 670.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1 } and 679.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0 } and 690.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 699.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 708.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 718.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType }
TypeSymbolExtensions.cs (1)
158if (!field.IsStatic)
Microsoft.ML.InternalCodeAnalyzer (2)
InstanceInitializerAnalyzer.cs (2)
45if (symbol.IsConst || symbol.IsStatic || symbol.IsImplicitlyDeclared) 66if (symbol.IsAbstract || symbol.IsImplicitlyDeclared || symbol.IsStatic)
Microsoft.VisualStudio.LanguageServices (2)
Progression\GraphBuilder.cs (1)
481if (symbol.IsStatic)
ProjectSystem\AbstractEntryPointFinder.cs (1)
34if (symbol.IsStatic &&
Microsoft.VisualStudio.LanguageServices.CSharp (2)
ObjectBrowser\DescriptionBuilder.cs (2)
170if (typeSymbol.IsStatic) 279if (memberSymbol.IsStatic &&
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
CodeModel\VisualBasicCodeModelService.vb (1)
2908symbol.IsStatic
ObjectBrowser\DescriptionBuilder.vb (1)
340If memberSymbol.IsStatic AndAlso
System.Text.Json.SourceGeneration (3)
Helpers\RoslynExtensions.cs (1)
117=> type.Constructors.Where(ctor => !ctor.IsStatic && !(ctor.IsImplicitlyDeclared && type.IsValueType && ctor.Parameters.Length == 0));
JsonSourceGenerator.Parser.cs (2)
933propertyInfo.IsStatic || propertyInfo.Parameters.Length > 0 || 954fieldInfo.IsStatic || fieldInfo.IsConst ||
System.Text.RegularExpressions.Generator (2)
UpgradeToGeneratedRegexAnalyzer.cs (2)
74method.IsStatic && 95if (!method.IsStatic || !SymbolEqualityComparer.Default.Equals(method.ContainingType, regexTypeSymbol))
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationInfo.cs (1)
22IsStatic: true,