52 references to Static
Microsoft.CodeAnalysis.CSharp (52)
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (1)
163mods |= DeclarationModifiers.Static;
Parser\LanguageParser.cs (1)
1311return DeclarationModifiers.Static;
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
46=> (Modifiers & DeclarationModifiers.Static) != 0;
Symbols\Source\LocalFunctionSymbol.cs (1)
360public override bool IsStatic => (_declarationModifiers & DeclarationModifiers.Static) != 0;
Symbols\Source\ModifierUtils.cs (9)
57else if ((modifiers & allowedModifiers & DeclarationModifiers.Static) != 0) 156if ((modifiers & defaultInterfaceImplementationModifiers & DeclarationModifiers.Static) != 0 && 178if ((modifiers & defaultInterfaceImplementationModifiers & DeclarationModifiers.Static) != 0) 213if (isExplicitInterfaceImplementation && (mods & DeclarationModifiers.Static) != 0) 221ModifierUtils.ReportUnsupportedModifiersForLanguageVersion(mods, DeclarationModifiers.Static, location, diagnostics, availableVersion, requiredVersion); 235else if ((mods & DeclarationModifiers.Static) != 0) 283case DeclarationModifiers.Static: 343return DeclarationModifiers.Static; 471(modifiers & DeclarationModifiers.Static) == 0)
Symbols\Source\SourceConstructorSymbol.cs (1)
131DeclarationModifiers.Static |
Symbols\Source\SourceEnumConstantSymbol.cs (1)
77return DeclarationModifiers.Const | DeclarationModifiers.Static | DeclarationModifiers.Public;
Symbols\Source\SourceEventSymbol.cs (4)
380get { return (_modifiers & DeclarationModifiers.Static) != 0; } 458DeclarationModifiers.Static | 475DeclarationModifiers.Static | 490allowedModifiers |= DeclarationModifiers.Static;
Symbols\Source\SourceMemberContainerSymbol.cs (8)
324allowedModifiers |= DeclarationModifiers.Static; 356(mods & (DeclarationModifiers.Sealed | DeclarationModifiers.Static)) != 0) 362(mods & (DeclarationModifiers.Sealed | DeclarationModifiers.Static)) == (DeclarationModifiers.Sealed | DeclarationModifiers.Static)) 841public override bool IsStatic => HasFlag(DeclarationModifiers.Static); 4957DeclarationModifiers.Private | (modifiers & DeclarationModifiers.Static), 5061DeclarationModifiers.Private | (property.IsStatic ? DeclarationModifiers.Static : 0), 5099DeclarationModifiers.Private | (@event.IsStatic ? DeclarationModifiers.Static : 0),
Symbols\Source\SourceMemberFieldSymbol.cs (7)
176DeclarationModifiers.Static | 202reportBadMemberFlagIfAny(result, DeclarationModifiers.Static, diagnostics, errorLocation); 208result &= ~(DeclarationModifiers.Static | DeclarationModifiers.ReadOnly | DeclarationModifiers.Const | DeclarationModifiers.Volatile | DeclarationModifiers.Required); 214if ((result & DeclarationModifiers.Static) != 0) 229result |= DeclarationModifiers.Static; // "constants are considered static members" 233if ((result & DeclarationModifiers.Static) != 0 && (result & DeclarationModifiers.Required) != 0) 250reportBadMemberFlagIfAny(result, DeclarationModifiers.Static, diagnostics, errorLocation);
Symbols\Source\SourceMemberMethodSymbol.cs (2)
195bool isMetadataVirtual = (isExplicitInterfaceImplementation && (declarationModifiers & DeclarationModifiers.Static) == 0) || ModifiersRequireMetadataVirtual(declarationModifiers); 655return (this.DeclarationModifiers & DeclarationModifiers.Static) != 0;
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
705DeclarationModifiers.Static | 717DeclarationModifiers.Static | 734allowedModifiers |= DeclarationModifiers.Static;
Symbols\Source\SourcePropertySymbol.cs (5)
70(!containingType.IsInterface || hasGetAccessorImplementation || hasSetAccessorImplementation || (modifiers & DeclarationModifiers.Static) != 0) && 385allowedModifiers |= DeclarationModifiers.Static; 405(isIndexer ? 0 : DeclarationModifiers.Static) | 422allowedModifiers |= DeclarationModifiers.Static; 480if ((mods & DeclarationModifiers.Static) != 0 && (mods & DeclarationModifiers.Required) != 0)
Symbols\Source\SourcePropertySymbolBase.cs (1)
565get { return (_modifiers & DeclarationModifiers.Static) != 0; }
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (2)
130DeclarationModifiers.Static | 191else if ((result & DeclarationModifiers.Static) != 0 && syntax is OperatorDeclarationSyntax { OperatorToken: var opToken } && opToken.Kind() is not (SyntaxKind.EqualsEqualsToken or SyntaxKind.ExclamationEqualsToken))
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (1)
40DeclarationModifiers.Public | DeclarationModifiers.Static, hasAnyBody: true, isExpressionBodied: false, isIterator: false, isNullableAnalysisEnabled: false, diagnostics)
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
37(isStatic ? DeclarationModifiers.Static : DeclarationModifiers.None);
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (2)
38(isStatic ? DeclarationModifiers.Static : DeclarationModifiers.None); 178get { return (_modifiers & DeclarationModifiers.Static) != 0; }
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (1)
67DeclarationModifiers declarationModifiers = DeclarationModifiers.Static | DeclarationModifiers.Private | (hasAwait ? DeclarationModifiers.Async : DeclarationModifiers.None);