5 types derived from FieldSymbol
Microsoft.CodeAnalysis.CSharp (5)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
20private sealed class AnonymousTypeFieldSymbol : FieldSymbol
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
27internal sealed class PEFieldSymbol : FieldSymbol
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
19internal abstract class FieldSymbolWithAttributesAndModifiers : FieldSymbol, IAttributeTargetSymbol
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
18internal abstract class SynthesizedFieldSymbolBase : FieldSymbol
Symbols\Wrapped\WrappedFieldSymbol.cs (1)
21internal abstract class WrappedFieldSymbol : FieldSymbol
620 references to FieldSymbol
Microsoft.CodeAnalysis.CSharp (616)
Binder\Binder.CapturedParametersFinder.cs (4)
30public static IReadOnlyDictionary<ParameterSymbol, FieldSymbol> GetCapturedParameters(SynthesizedPrimaryConstructor primaryConstructor) 38return SpecializedCollections.EmptyReadOnlyDictionary<ParameterSymbol, FieldSymbol>(); 73return SpecializedCollections.EmptyReadOnlyDictionary<ParameterSymbol, FieldSymbol>(); 76var result = new Dictionary<ParameterSymbol, FieldSymbol>(ReferenceEqualityComparer.Instance);
Binder\Binder.cs (1)
470internal virtual ConsList<FieldSymbol> FieldsBeingBound
Binder\Binder.ValueChecks.cs (11)
1159primaryConstructor.GetCapturedParameters().TryGetValue(parameterSymbol, out FieldSymbol backingField)) 1342var fieldSymbol = fieldAccess.FieldSymbol; 1426private bool CanModifyReadonlyField(bool receiverIsThis, FieldSymbol fieldSymbol) 1497var fieldSymbol = fieldAccess.FieldSymbol; 1520var fieldSymbol = fieldAccess.FieldSymbol; 3246private static void ReportReadOnlyFieldError(FieldSymbol field, SyntaxNode node, BindValueKind kind, bool checkingReceiver, BindingDiagnosticBag diagnostics) 4145var fieldSymbol = fieldAccess.FieldSymbol; 4855var fieldSymbol = fieldAccess.FieldSymbol; 5854FieldSymbol field = fieldAccess.FieldSymbol; 5926return containingSymbol is MethodSymbol { MethodKind: MethodKind.StaticConstructor } or FieldSymbol { IsStatic: true }; 5930return (containingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor } or FieldSymbol { IsStatic: false } or MethodSymbol { IsInitOnly: true }) &&
Binder\Binder_AnonymousTypes.cs (1)
197return !((FieldSymbol)member).IsConst;
Binder\Binder_Attributes.cs (4)
565var fieldSymbol = namedArgumentNameSymbol as FieldSymbol; 629var fieldSymbol = (FieldSymbol)namedArgumentNameSymbol;
Binder\Binder_Await.cs (1)
159if (((FieldSymbol)containingMemberOrLambda).IsStatic)
Binder\Binder_Conversions.cs (1)
448FieldSymbol? elementField = source.Type.TryGetInlineArrayElementField();
Binder\Binder_Expressions.cs (11)
437FieldSymbol field, 2003FieldSymbol possibleField = null; 2017possibleField = lookupResult.SingleSymbolOrDefault as FieldSymbol; 2089(this.ContainingMember() is FieldSymbol || (object)primaryCtor == this.ContainingMember()) || 2177return BindFieldAccess(node, receiver, (FieldSymbol)symbol, diagnostics, resultKind, indexed, hasErrors: isError); 5869var fieldSymbol = ((BoundFieldAccess)boundMember).FieldSymbol; 8172resultType = ((FieldSymbol)symbolOpt).GetFieldType(this.FieldsBeingBound).Type; 8324result = BindFieldAccess(node, left, (FieldSymbol)symbol, diagnostics, lookupResult.Kind, indexed, hasErrors: wasError); 8513FieldSymbol fieldSymbol, 9020expr.Type.HasInlineArrayAttribute(out int length) && expr.Type.TryGetPossiblyUnsupportedByLanguageInlineArrayElementField() is FieldSymbol elementField) 9089BoundExpression bindInlineArrayElementAccess(ExpressionSyntax node, BoundExpression expr, int length, AnalyzedArguments analyzedArguments, BoundExpression convertedIndex, WellKnownType indexOrRangeWellknownType, FieldSymbol elementField, BindingDiagnosticBag diagnostics)
Binder\Binder_Initializers.cs (4)
88FieldSymbol fieldSymbol = initializer.FieldOpt; 145internal Binder GetFieldInitializerBinder(FieldSymbol fieldSymbol, bool suppressBinderFlagsFieldInitializer = false) 185var fieldSymbol = initializer.FieldOpt; 286private static BoundFieldEqualsValue BindFieldInitializer(Binder binder, FieldSymbol fieldSymbol, EqualsValueClauseSyntax equalsValueClauseNode,
Binder\Binder_Invocation.cs (2)
1411if (GetWellKnownTypeMember(Compilation, WellKnownMember.System_Type__Missing, diagnostics, syntax: syntax) is FieldSymbol fieldSymbol) 1527FieldSymbol { AssociatedSymbol: { } symbol } => symbol,
Binder\Binder_Lookup.cs (1)
1737type = ((FieldSymbol)symbol).GetFieldType(this.FieldsBeingBound).Type;
Binder\Binder_Operators.cs (1)
2574FieldSymbol fieldSymbol;
Binder\Binder_Patterns.cs (5)
1173FieldSymbol? foundField = null; 1296private static FieldSymbol? CheckIsTupleElement(SyntaxNode node, NamedTypeSymbol tupleType, string name, int tupleIndex, BindingDiagnosticBag diagnostics) 1298FieldSymbol? foundElement = null; 1301if (symbol is FieldSymbol field && field.IsTupleElement()) 1531FieldSymbol field => field.Type,
Binder\Binder_Statements.cs (1)
1797(member as FieldSymbol)?.IsStatic == isStatic;
Binder\BuckStopsHereBinder.cs (2)
81internal override ConsList<FieldSymbol> FieldsBeingBound 85return ConsList<FieldSymbol>.Empty;
Binder\DecisionDagBuilder.cs (3)
555ImmutableArray<FieldSymbol> elements = inputType.TupleElements; 562FieldSymbol field = elements[i]; 623case FieldSymbol field:
Binder\ExpressionVariableFinder.cs (2)
678private FieldSymbol _containingFieldOpt; 685FieldSymbol containingFieldOpt)
Binder\ForEachEnumeratorInfo.cs (1)
75(collectionType.HasInlineArrayAttribute(out _) && collectionType.TryGetInlineArrayElementField() is FieldSymbol elementField && elementType.Equals(elementField.TypeWithAnnotations, TypeCompareKind.ConsiderEverything)));
Binder\ForEachLoopBinder.cs (1)
816if (!isAsync && collectionExpr.Type?.HasInlineArrayAttribute(out _) == true && collectionExpr.Type.TryGetPossiblyUnsupportedByLanguageInlineArrayElementField() is FieldSymbol elementField)
Binder\ImplicitlyTypedFieldBinder.cs (3)
22private readonly ConsList<FieldSymbol> _fieldsBeingBound; 24public ImplicitlyTypedFieldBinder(Binder next, ConsList<FieldSymbol> fieldsBeingBound) 30internal override ConsList<FieldSymbol> FieldsBeingBound
Binder\PatternExplainer.cs (1)
653if (declaredMember is FieldSymbol { IsConst: true, IsStatic: true, DeclaredAccessibility: Accessibility.Public } field &&
BoundTree\BoundExpressionExtensions.cs (1)
70FieldSymbol f => f.RefKind,
BoundTree\Constructors.cs (5)
17FieldSymbol fieldSymbol, 27FieldSymbol fieldSymbol, 39FieldSymbol fieldSymbol, 51FieldSymbol fieldSymbol, 59private static bool NeedsByValueFieldAccess(BoundExpression? receiver, FieldSymbol fieldSymbol)
CodeGen\CodeGenerator.cs (1)
355private void EmitSymbolToken(FieldSymbol symbol, SyntaxNode syntaxNode)
CodeGen\EmitAddress.cs (4)
440FieldSymbol field = fieldAccess.FieldSymbol; 458private void EmitStaticFieldAddress(FieldSymbol field, SyntaxNode syntaxNode) 547var field = fieldAccess.FieldSymbol; 571var fixedElementField = fixedImpl.FixedElementField;
CodeGen\EmitExpression.cs (6)
1120var field = fieldAccess.FieldSymbol; 1154var field = fieldAccess.FieldSymbol; 1245var field = fieldAccess.FieldSymbol; 1299var field = fieldAccess.FieldSymbol; 3275var field = fieldAccess.FieldSymbol; 3573private void EmitHoistedVariableId(FieldSymbol field, SyntaxNode syntax)
CodeGen\Optimizer.cs (1)
1341var field = node.FieldSymbol;
Compilation\InitializerSemanticModel.cs (3)
39internal static InitializerSemanticModel Create(SyntaxTreeSemanticModel containingSemanticModel, CSharpSyntaxNode syntax, FieldSymbol fieldSymbol, Binder rootBinder) 152var field = (FieldSymbol)this.MemberSymbol;
Compilation\SyntaxTreeSemanticModel.cs (8)
377var fieldSymbol = GetDeclaredFieldSymbol(variableDecl.Variables.First()); 1125FieldSymbol fieldSymbol = GetDeclaredFieldSymbol(variableDecl); 1166var enumSymbol = GetDeclaredSymbol(enumDecl).GetSymbol<FieldSymbol>(); 1257private FieldSymbol GetDeclaredFieldSymbol(VariableDeclaratorSyntax variableDecl) 1266return declaredSymbol.GetSymbol<FieldSymbol>(); 1276private Binder GetFieldOrPropertyInitializerBinder(FieldSymbol symbol, Binder outer, EqualsValueClauseSyntax initializer) 1494return ((FieldSymbol)GetDeclaredMemberSymbol(declarationSyntax)).GetPublicSymbol();
Compiler\AnonymousTypeMethodBodySynthesizer.cs (1)
133var fields = ArrayBuilder<FieldSymbol>.GetInstance(anonymousType.Properties.Length);
Compiler\ClsComplianceChecker.cs (2)
400public override void VisitField(FieldSymbol symbol) 721type = ((FieldSymbol)symbol).Type;
Compiler\MethodBodySynthesizer.cs (3)
115var hostObjectField = synthesizedFields.GetHostObjectField(); 140foreach (var field in synthesizedFields.FieldSymbols) 239FieldSymbol field = eventSymbol.AssociatedField;
Compiler\MethodBodySynthesizer.Lowered.cs (1)
401ArrayBuilder<FieldSymbol> fields,
Compiler\MethodCompiler.cs (4)
553var fieldSymbol = (FieldSymbol)member; 880public override object VisitField(FieldSymbol symbol, TypeCompilationState argument) 1226IReadOnlyDictionary<ParameterSymbol, FieldSymbol> capturedParameters = primaryCtor.GetCapturedParameters();
DocumentationComments\DocumentationCommentIDVisitor.cs (1)
45public override object VisitField(FieldSymbol symbol, StringBuilder builder)
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
66public override object VisitField(FieldSymbol symbol, StringBuilder builder)
Emitter\EditAndContinue\CSharpDefinitionMap.cs (4)
80var field = (FieldSymbol)member; 98var field = (FieldSymbol)member;
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (3)
169public override Symbol? VisitField(FieldSymbol symbol) 585private bool AreFieldsEqual(FieldSymbol field, FieldSymbol other)
Emitter\Model\AttributeDataAdapter.cs (2)
164var fieldSymbol = symbol as FieldSymbol;
Emitter\Model\FieldSymbolAdapter.cs (2)
346internal FieldSymbolAdapter(FieldSymbol underlyingFieldSymbol) 352internal FieldSymbol AdaptedFieldSymbol { get; }
Emitter\Model\NamedTypeSymbolAdapter.cs (2)
429foreach (var f in AdaptedNamedTypeSymbol.GetFieldsToEmit()) 951internal abstract IEnumerable<FieldSymbol> GetFieldsToEmit();
Emitter\Model\PEModuleBuilder.cs (4)
48private Dictionary<FieldSymbol, NamedTypeSymbol> _fixedImplementationTypes; 418FieldSymbol field = ((EventSymbol)member).AssociatedField; 1168FieldSymbol fieldSymbol, 1467Interlocked.CompareExchange(ref _fixedImplementationTypes, new Dictionary<FieldSymbol, NamedTypeSymbol>(), null);
Emitter\Model\SpecializedFieldReference.cs (2)
22private readonly FieldSymbol _underlyingField; 24public SpecializedFieldReference(FieldSymbol underlyingField)
Emitter\NoPia\EmbeddedType.cs (1)
302TypeManager.EmbedField(this, ((FieldSymbol)s).GetCciAdapter(), syntaxNodeOpt, diagnostics);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
411foreach (FieldSymbol f in namedType.GetFieldsToEmit())
FlowAnalysis\AbstractFlowPass.cs (1)
2231private void VisitFieldAccessInternal(BoundExpression receiverOpt, FieldSymbol fieldSymbol)
FlowAnalysis\AlwaysAssignedWalker.cs (1)
62if (v.Exists && !(v.Symbol is FieldSymbol))
FlowAnalysis\DataFlowsOutWalker.cs (1)
173FieldSymbol associatedField = eventAccess.EventSymbol.AssociatedField;
FlowAnalysis\DefiniteAssignment.cs (36)
86private PooledHashSet<FieldSymbol>? _implicitlyInitializedFieldsOpt; 88private void AddImplicitlyInitializedField(FieldSymbol field) 92(_implicitlyInitializedFieldsOpt ??= PooledHashSet<FieldSymbol>.GetInstance()).Add(field); 356case (FieldSymbol or PropertySymbol) and { IsStatic: false, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } }: 476foreach (var field in _emptyStructTypeCache.GetStructInstanceFields(parameterType)) 510if (parameterType.HasInlineArrayAttribute(out int length) && length > 1 && parameterType.TryGetPossiblyUnsupportedByLanguageInlineArrayElementField() is FieldSymbol elementField) 546out ImmutableArray<FieldSymbol> implicitlyInitializedFieldsOpt, 624(DiagnosticBag, ImmutableArray<FieldSymbol> implicitlyInitializedFieldsOpt) analyze(bool strictAnalysis) 627ImmutableArray<FieldSymbol> implicitlyInitializedFieldsOpt = default; 643var builder = ArrayBuilder<FieldSymbol>.GetInstance(implicitlyInitializedFields.Count); 774_sourceAssembly.NoteFieldAccess((FieldSymbol)variable.OriginalDefinition, 810FieldSymbol associatedField = eventAccess.EventSymbol.AssociatedField; 856var field = (FieldSymbol)variable.OriginalDefinition; 968var field = fieldAccess.FieldSymbol.OriginalDefinition; 993FieldSymbol associatedField = eventAccess.EventSymbol.AssociatedField; 998var field = associatedField.OriginalDefinition; 1075var fieldSymbol = fieldAccess.FieldSymbol; 1134protected bool MayRequireTracking(BoundExpression receiverOpt, FieldSymbol fieldSymbol) 1231addDiagnosticForStructField(slot, (FieldSymbol)symbol); 1263foreach (var field in _emptyStructTypeCache.GetStructInstanceFields(containingType)) 1279if (!foundUnassignedField && containingType.HasInlineArrayAttribute(out int length) && length > 1 && containingType.TryGetPossiblyUnsupportedByLanguageInlineArrayElementField() is FieldSymbol elementField) 1306void addDiagnosticForStructField(int fieldSlot, FieldSymbol fieldSymbol) 1332AddImplicitlyInitializedField((FieldSymbol)fieldIdentifier.Symbol); 1368protected virtual void CheckAssigned(BoundExpression expr, FieldSymbol fieldSymbol, SyntaxNode node) 1490var fieldSymbol = fieldAccess.FieldSymbol; 1636if (_sourceAssembly is not null && member.MemberSymbol is FieldSymbol field) 1700foreach (var field in _emptyStructTypeCache.GetStructInstanceFields(structType)) 1738foreach (var field in _emptyStructTypeCache.GetStructInstanceFields(type)) 1773foreach (var field in _emptyStructTypeCache.GetStructInstanceFields(type)) 2037if (member.Symbol is FieldSymbol field) 2604var symbol = field.FieldSymbol; 2612FieldSymbol associatedField = @event.EventSymbol.AssociatedField; 2661FieldSymbol field = (FieldSymbol)symbol; 2749FieldSymbol associatedField = node.EventSymbol.AssociatedField;
FlowAnalysis\DefiniteAssignment.LocalFunctions.cs (1)
111foreach (var field in _emptyStructTypeCache.GetStructInstanceFields(type))
FlowAnalysis\EmptyStructTypeCache.cs (8)
144var field = GetActualField(member, type); 162public IEnumerable<FieldSymbol> GetStructInstanceFields(TypeSymbol type) 167return SpecializedCollections.EmptyEnumerable<FieldSymbol>(); 173public IEnumerable<FieldSymbol> GetStructFields(NamedTypeSymbol type, bool includeStatic) 183var field = GetActualField(member, type); 191private FieldSymbol GetActualField(Symbol member, NamedTypeSymbol type) 196var field = (FieldSymbol)member;
FlowAnalysis\FlowAnalysisPass.cs (5)
48ImmutableArray<FieldSymbol> implicitlyInitializedFields = default; 110private static BoundBlock PrependImplicitInitializations(BoundBlock body, MethodSymbol method, ImmutableArray<FieldSymbol> implicitlyInitializedFields, TypeCompilationState compilationState, BindingDiagnosticBag diagnostics) 123if (containingType.HasInlineArrayAttribute(out int length) && length > 1 && containingType.TryGetPossiblyUnsupportedByLanguageInlineArrayElementField() is FieldSymbol elementField) 136foreach (var field in implicitlyInitializedFields) 213out ImmutableArray<FieldSymbol> implicitlyInitializedFieldsOpt)
FlowAnalysis\LocalDataFlowPass.cs (2)
174var restField = containingType.GetMembers(NamedTypeSymbol.ValueTupleRestFieldName).FirstOrDefault(s => s is not TupleVirtualElementFieldSymbol) as FieldSymbol;
FlowAnalysis\NullableWalker.cs (17)
721FieldSymbol? field; 725case FieldSymbol f: 815case FieldSymbol { OriginalDefinition: SynthesizedPrimaryConstructorParameterBackingFieldSymbol }: 818case FieldSymbol { IsConst: true }: 820case FieldSymbol { AssociatedSymbol: SourcePropertySymbolBase { UsesFieldKeyword: false } prop }: 953if (requiredMember is FieldSymbol) 1949var fieldSymbol = fieldAccess.FieldSymbol; 2126primaryConstructor.GetCapturedParameters().TryGetValue(parameter, out FieldSymbol? field)) 2602foreach (var field in _emptyStructTypeCache.GetStructInstanceFields(targetType)) 3603(FieldSymbol { ContainingType: { IsTupleType: true }, TupleElementIndex: var oi } originalField, FieldSymbol { ContainingType: { IsTupleType: true }, TupleElementIndex: var ui } updatedField) => 8489tupleType.GetMembers(NamedTypeSymbol.ValueTupleRestFieldName).FirstOrDefault() is FieldSymbol restField) 8496void trackState(BoundExpression value, FieldSymbol field, TypeWithState valueType) 8554void trackConvertedValue(FieldSymbol targetField, Conversion conversion, FieldSymbol valueField) 10049private static FlowAnalysisAnnotations GetFieldAnnotations(FieldSymbol field) 10065var annotations = memberSymbol switch { PropertySymbol prop => prop.GetFlowAnalysisAnnotations(), FieldSymbol field => GetFieldAnnotations(field), _ => FlowAnalysisAnnotations.None };
FlowAnalysis\NullableWalker_Patterns.cs (4)
202FieldSymbol element = elements[i]; 488var field = (FieldSymbol)AsMemberOfType(inputType, e.Field); 492var originalTupleElement = e.Input.IsOriginalInput && !originalInputElementSlots.IsDefault
FlowAnalysis\ReadWriteWalker.cs (1)
139protected override void CheckAssigned(BoundExpression expr, FieldSymbol fieldSymbol, SyntaxNode node)
Generated\BoundNodes.xml.Generated.cs (32)
308public BoundFieldEqualsValue(SyntaxNode syntax, FieldSymbol field, ImmutableArray<LocalSymbol> locals, BoundExpression value, bool hasErrors = false) 319public FieldSymbol Field { get; } 324public BoundFieldEqualsValue Update(FieldSymbol field, ImmutableArray<LocalSymbol> locals, BoundExpression value) 2333public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2344public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2357public FieldSymbol? HoistedField { get; } 2362public BoundLocalId Update(LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2376public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2387public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2400public FieldSymbol? HoistedField { get; } 2405public BoundParameterId Update(ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2750public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type, bool hasErrors) 2761public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2773public FieldSymbol Field { get; } 2779public BoundFieldInfo Update(FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 5442public BoundDagFieldEvaluation(SyntaxNode syntax, FieldSymbol field, BoundDagTemp input, bool hasErrors = false) 5452public FieldSymbol Field { get; } 5457public BoundDagFieldEvaluation Update(FieldSymbol field, BoundDagTemp input) 7257public BoundFieldAccess(SyntaxNode syntax, BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type, bool hasErrors = false) 7274public FieldSymbol FieldSymbol { get; } 7283public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type) 7297public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type, bool hasErrors) 7307public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type) 7318public FieldSymbol FieldSymbol { get; } 7323public BoundHoistedFieldAccess Update(FieldSymbol fieldSymbol, TypeSymbol type) 12230FieldSymbol field = GetUpdatedSymbol(node, node.Field); 13016FieldSymbol? hoistedField = GetUpdatedSymbol(node, node.HoistedField); 13034FieldSymbol? hoistedField = GetUpdatedSymbol(node, node.HoistedField); 13165FieldSymbol field = GetUpdatedSymbol(node, node.Field); 13682FieldSymbol field = GetUpdatedSymbol(node, node.Field); 14414FieldSymbol fieldSymbol = GetUpdatedSymbol(node, node.FieldSymbol); 14432FieldSymbol fieldSymbol = GetUpdatedSymbol(node, node.FieldSymbol);
Lowering\AsyncRewriter\AsyncIteratorInfo.cs (8)
17internal FieldSymbol PromiseOfValueOrEndField { get; } 20internal FieldSymbol CombinedTokensField { get; } 23internal FieldSymbol CurrentField { get; } 26internal FieldSymbol DisposeModeField { get; } 34public AsyncIteratorInfo(FieldSymbol promiseOfValueOrEndField, FieldSymbol combinedTokensField, FieldSymbol currentField, FieldSymbol disposeModeField,
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (4)
53FieldSymbol state, 54FieldSymbol builder, 55FieldSymbol? instanceIdField, 138var currentField = _asyncIteratorInfo.CurrentField;
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (9)
33protected readonly FieldSymbol _asyncMethodBuilderField; 60private readonly Dictionary<TypeSymbol, FieldSymbol> _awaiterFields; 70FieldSymbol state, 71FieldSymbol builder, 72FieldSymbol? instanceIdField, 93_awaiterFields = new Dictionary<TypeSymbol, FieldSymbol>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 101private FieldSymbol GetAwaiterField(TypeSymbol awaiterType) 103FieldSymbol result; 456FieldSymbol awaiterField = GetAwaiterField(awaiterFieldType);
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (4)
25private FieldSymbol _promiseOfValueOrEndField; // this struct implements the IValueTaskSource logic 26private FieldSymbol _currentField; // stores the current/yielded value 27private FieldSymbol _disposeModeField; // whether the state machine is in dispose mode (ie. skipping all logic except that in `catch` and `finally`, yielding no new elements) 28private FieldSymbol _combinedTokensField; // CancellationTokenSource for combining tokens
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
21private FieldSymbol? _builderField;
Lowering\ClosureConversion\ClosureConversion.cs (2)
692FieldSymbol frameParent = capturedFrame.AsMember(frameType); 1056var field = containerAsFrame.SingletonCache.AsMember(constructedFrame);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
914return _bound.Convert(MemberInfoType, _bound.FieldInfo((FieldSymbol)symbol)); 929return _bound.Convert(MemberInfoType, _bound.FieldInfo((FieldSymbol)symbol));
Lowering\ClosureConversion\LambdaCapturedVariable.cs (1)
124internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound)
Lowering\ClosureConversion\SynthesizedClosureEnvironment.cs (3)
32internal readonly FieldSymbol SingletonCache; 131internal override IEnumerable<FieldSymbol> GetFieldsToEmit() 134: SpecializedCollections.EmptyEnumerable<FieldSymbol>();
Lowering\DiagnosticsPass_Warnings.cs (2)
58FieldSymbol fieldSymbol = fieldAccess.FieldSymbol; 87FieldSymbol fieldSymbol = fieldAccess.FieldSymbol;
Lowering\InitializerRewriter.cs (1)
91var field = fieldInit.Field;
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (4)
23private readonly FieldSymbol _current; 59FieldSymbol state, 60FieldSymbol current, 61FieldSymbol? instanceIdField,
Lowering\IteratorRewriter\IteratorRewriter.cs (1)
27private FieldSymbol _currentField;
Lowering\LocalRewriter\DelegateCacheContainer.cs (3)
18private readonly Dictionary<(TypeSymbol?, TypeSymbol, MethodSymbol), FieldSymbol> _delegateFields = new(CLRSignatureComparer.Instance); 54internal FieldSymbol GetOrAddCacheField(SyntheticBoundNodeFactory factory, BoundDelegateCreationExpression boundDelegateCreation) 64if (_delegateFields.TryGetValue((constrainedToTypeOpt, delegateType, targetMethod), out var field))
Lowering\LocalRewriter\DelegateCacheRewriter.cs (1)
52var cacheField = cacheContainer.GetOrAddCacheField(_factory, boundDelegateCreation);
Lowering\LocalRewriter\LocalRewriter.cs (2)
315primaryCtor.GetCapturedParameters().TryGetValue(node.ParameterSymbol, out var field)) 924var lhsField = ((BoundFieldAccess)assignment.Left).FieldSymbol;
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
142FieldSymbol field = f.Field; 623var field = loweredInput.Type.TupleElements[i].CorrespondingTupleField;
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
70_compilation.GetWellKnownTypeMember(WellKnownMember.System_Collections_Immutable_ImmutableArray_T__Empty) is FieldSymbol immutableArrayOfTEmpty) 72var immutableArrayOfTargetCollectionTypeEmpty = immutableArrayOfTEmpty.AsMember((NamedTypeSymbol)node.Type);
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
229FieldSymbol? fieldSymbol = eventSymbol.AssociatedField;
Lowering\LocalRewriter\LocalRewriter_Field.cs (7)
20FieldSymbol fieldSymbol, 52FieldSymbol tupleField, 58FieldSymbol underlyingField = tupleField.TupleUnderlyingField; 75var tupleRestField = (FieldSymbol?)NamedTypeSymbol.GetWellKnownMemberInType(currentLinkType.OriginalDefinition, wellKnownTupleRest, _diagnostics, syntax); 86FieldSymbol nestedFieldSymbol = tupleRestField.AsMember(currentLinkType); 98private BoundExpression MakeTupleFieldAccessAndReportUseSiteDiagnostics(BoundExpression tuple, SyntaxNode syntax, FieldSymbol field)
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (1)
18var hostObjectReference = _previousSubmissionFields.GetHostObjectField();
Lowering\LocalRewriter\LocalRewriter_Literal.cs (2)
93var fieldSymbol = (FieldSymbol)useField;
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
675var fieldSymbol = (FieldSymbol)memberSymbol;
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (1)
22var targetScriptReference = _previousSubmissionFields.GetOrMakeField(targetType);
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (5)
613FieldSymbol callSiteTargetFieldGeneric = (FieldSymbol)_factory.WellKnownMember(WellKnownMember.System_Runtime_CompilerServices_CallSite_T__Target); 644var callSiteTargetField = callSiteTargetFieldGeneric.AsMember(callSiteType); 645var callSiteField = DefineCallSiteStorageSymbol(containerDef, delegateTypeOverMethodTypeParameters, methodToContainerTypeParametersMap); 705internal FieldSymbol DefineCallSiteStorageSymbol(NamedTypeSymbol containerDefinition, NamedTypeSymbol delegateTypeOverMethodTypeParameters, TypeMap methodToContainerTypeParametersMap)
Lowering\MethodToClassRewriter.cs (12)
418=> TryGetHoistedField(node.Local, out var fieldSymbol) ? 423=> TryGetHoistedField(node.Parameter, out var fieldSymbol) ? 427private bool TryGetHoistedField(Symbol variable, [NotNullWhen(true)] out FieldSymbol? field) 433CapturedToStateMachineFieldReplacement stateMachineProxy => (FieldSymbol)stateMachineProxy.HoistedField, 547var rewrittenField = ((FieldSymbol)node.Field.OriginalDefinition) 556var fieldSymbol = ((FieldSymbol)node.FieldSymbol.OriginalDefinition) 688private FieldSymbol VisitFieldSymbol(FieldSymbol field) 691return ((FieldSymbol)field.OriginalDefinition) 707member = VisitFieldSymbol((FieldSymbol)member);
Lowering\SpillSequenceSpiller.cs (1)
406var fieldSymbol = field.FieldSymbol;
Lowering\StateMachineRewriter\CapturedSymbol.cs (2)
42var field = this.HoistedField.AsMember((NamedTypeSymbol)frame.Type); 60var field = this.HoistedField.AsMember((NamedTypeSymbol)frame.Type);
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
173if (!((FieldSymbol)symbol).IsConst)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (6)
28protected readonly FieldSymbol stateField; 52protected readonly FieldSymbol? instanceIdField; 103FieldSymbol state, 104FieldSymbol? instanceIdField, 425private void AddVariableCleanup(ArrayBuilder<BoundExpression> cleanup, FieldSymbol field) 445foreach (var f in _emptyStructTypeCache.GetStructInstanceFields(type))
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (1)
66internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound)
Lowering\StateMachineRewriter\StateMachineRewriter.cs (3)
29protected FieldSymbol? stateField; 30protected FieldSymbol? instanceIdField; 35protected FieldSymbol? initialThreadIdField;
Lowering\SynthesizedSubmissionFields.cs (11)
28private FieldSymbol _hostObjectField; 29private Dictionary<ImplicitNamedTypeSymbol, FieldSymbol> _previousSubmissionFieldMap; 48internal IEnumerable<FieldSymbol> FieldSymbols 52return _previousSubmissionFieldMap == null ? Array.Empty<FieldSymbol>() : (IEnumerable<FieldSymbol>)_previousSubmissionFieldMap.Values; 56internal FieldSymbol GetHostObjectField() 73internal FieldSymbol GetOrMakeField(ImplicitNamedTypeSymbol previousSubmissionType) 77_previousSubmissionFieldMap = new Dictionary<ImplicitNamedTypeSymbol, FieldSymbol>(); 80FieldSymbol previousSubmissionField; 96foreach (var field in FieldSymbols) 101FieldSymbol hostObjectField = GetHostObjectField();
Lowering\SyntheticBoundNodeFactory.cs (5)
165public BoundHoistedFieldAccess HoistedField(FieldSymbol field) 202public void AddField(NamedTypeSymbol containingType, FieldSymbol field) 241public BoundFieldAccess Field(BoundExpression? receiver, FieldSymbol f) 246public BoundFieldAccess InstanceField(FieldSymbol f) 1420public BoundExpression FieldInfo(FieldSymbol field)
Operations\CSharpOperationFactory.cs (3)
870var field = (FieldSymbol)memberSymbol; 2898case FieldSymbol field:
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (1)
38internal sealed override IEnumerable<FieldSymbol> GetFieldsToEmit()
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (2)
236internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => SpecializedCollections.EmptyEnumerable<FieldSymbol>();
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
30internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (2)
27private readonly FieldSymbol _backingField; 199public FieldSymbol BackingField
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (2)
113internal override IEnumerable<FieldSymbol> GetFieldsToEmit() 120yield return (FieldSymbol)m;
Symbols\BaseTypeAnalysis.cs (5)
95var field = member as FieldSymbol; 160FieldSymbol field; 164field = (FieldSymbol)member; 236internal static TypeSymbol NonPointerType(this FieldSymbol field) =>
Symbols\Compilation_WellKnownMembers.cs (13)
245internal static Symbol? GetRuntimeMember(NamedTypeSymbol declaringType, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 251internal static Symbol? GetRuntimeMember(ImmutableArray<Symbol> members, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 345if (!comparer.MatchFieldSignature((FieldSymbol)member, descriptor.Signature)) 720var ignoreSymbolStoreDebuggingMode = (FieldSymbol?)GetWellKnownTypeMember(WellKnownMember.System_Diagnostics_DebuggableAttribute_DebuggingModes__IgnoreSymbolStoreSequencePoints); 736var defaultDebuggingMode = (FieldSymbol?)GetWellKnownTypeMember(WellKnownMember.System_Diagnostics_DebuggableAttribute_DebuggingModes__Default); 742var disableOptimizationsDebuggingMode = (FieldSymbol?)GetWellKnownTypeMember(WellKnownMember.System_Diagnostics_DebuggableAttribute_DebuggingModes__DisableOptimizations); 754var enableEncDebuggingMode = (FieldSymbol?)GetWellKnownTypeMember(WellKnownMember.System_Diagnostics_DebuggableAttribute_DebuggingModes__EnableEditAndContinue); 1061internal class SpecialMembersSignatureComparer : SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> 1085protected override TypeSymbol GetFieldType(FieldSymbol field)
Symbols\ConstantValueUtils.cs (1)
57FieldSymbol fieldSymbol,
Symbols\ErrorTypeSymbol.cs (1)
164internal sealed override IEnumerable<FieldSymbol> GetFieldsToEmit()
Symbols\EventSymbol.cs (1)
122internal virtual FieldSymbol? AssociatedField
Symbols\FieldOrPropertyInitializer.cs (2)
20internal readonly FieldSymbol FieldOpt; 29public FieldOrPropertyInitializer(FieldSymbol fieldOpt, SyntaxNode syntax)
Symbols\FieldSymbol.cs (6)
39public new virtual FieldSymbol OriginalDefinition 62return GetFieldType(ConsList<FieldSymbol>.Empty); 77internal abstract TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound); 327internal virtual FieldSymbol AsMember(NamedTypeSymbol newOwner) 433public virtual FieldSymbol TupleUnderlyingField 446public virtual FieldSymbol CorrespondingTupleField
Symbols\MemberSymbolExtensions.cs (3)
272return ((FieldSymbol)s).AsMember(newOwner); 643internal static bool IsFieldOrFieldLikeEvent(this Symbol member, out FieldSymbol field) 648field = (FieldSymbol)member;
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (3)
174private static FieldSymbol FindFieldBySignature(TypeSymbol targetTypeSymbol, string targetMemberName, in FieldInfo<TypeSymbol> fieldInfo) 178var field = member as FieldSymbol;
Symbols\Metadata\PE\MetadataDecoder.cs (2)
21internal class MetadataDecoder : MetadataDecoder<PEModuleSymbol, TypeSymbol, MethodSymbol, FieldSymbol, Symbol> 515protected override FieldSymbol FindFieldSymbolInType(TypeSymbol typeSymbol, FieldDefinitionHandle fieldDef)
Symbols\Metadata\PE\PEEventSymbol.cs (1)
209internal override FieldSymbol? AssociatedField
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
395internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (13)
904private IEnumerable<FieldSymbol> GetEnumFieldsToEmit() 983internal override IEnumerable<FieldSymbol> GetFieldsToEmit() 992IEnumerable<FieldSymbol> nonEventFields = GetMembers<FieldSymbol>(this.GetMembers().WhereAsArray(m => !(m is TupleErrorFieldSymbol)), SymbolKind.Field, offset: 0); 995ArrayBuilder<FieldSymbol> eventFields = null; 999FieldSymbol associatedField = eventSymbol.AssociatedField; 1007eventFields = ArrayBuilder<FieldSymbol>.GetInstance(); 1021var handleToFieldMap = new SmallDictionary<FieldDefinitionHandle, FieldSymbol>(); 1038var result = ArrayBuilder<FieldSymbol>.GetInstance(count); 1044FieldSymbol field; 1527internal override FieldSymbol FixedElementField 1531FieldSymbol result = null; 1536result = candidates[0] as FieldSymbol;
Symbols\NamedTypeSymbol.cs (1)
1607internal virtual FieldSymbol FixedElementField
Symbols\NativeIntegerTypeSymbol.cs (1)
156internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => throw ExceptionUtilities.Unreachable();
Symbols\ObsoleteAttributeHelpers.cs (1)
66var associatedSymbol = ((FieldSymbol)symbol).AssociatedSymbol;
Symbols\PublicModel\FieldSymbol.cs (2)
15private readonly Symbols.FieldSymbol _underlying; 18public FieldSymbol(Symbols.FieldSymbol underlying)
Symbols\Retargeting\RetargetingEventSymbol.cs (1)
77internal override FieldSymbol? AssociatedField
Symbols\Retargeting\RetargetingFieldSymbol.cs (2)
35public RetargetingFieldSymbol(RetargetingModuleSymbol retargetingModule, FieldSymbol underlyingField) 60internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound)
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (2)
135internal override IEnumerable<FieldSymbol> GetFieldsToEmit() 137foreach (FieldSymbol f in _underlyingType.GetFieldsToEmit())
Symbols\Retargeting\RetargetingSymbolTranslator.cs (8)
38private readonly Func<Symbol, FieldSymbol> _createRetargetingField; 60private FieldSymbol CreateRetargetingField(Symbol symbol) 65var correspondingTupleField = tupleErrorField.CorrespondingTupleField; 83return new RetargetingFieldSymbol(this, (FieldSymbol)symbol); 919public FieldSymbol Retarget(FieldSymbol field) 921return (FieldSymbol)this.SymbolMap.GetOrAdd(field, _retargetingModule._createRetargetingField); 1359public override Symbol VisitField(FieldSymbol symbol, RetargetOptions options)
Symbols\Source\GlobalExpressionVariable.cs (7)
48FieldSymbol containingFieldOpt, 70internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound) 157protected virtual void InferFieldType(ConsList<FieldSymbol> fieldsBeingBound, Binder binder) 164private readonly FieldSymbol _containingFieldOpt; 174FieldSymbol containingFieldOpt, 184protected override void InferFieldType(ConsList<FieldSymbol> fieldsBeingBound, Binder binder) 193fieldsBeingBound = new ConsList<FieldSymbol>(this, fieldsBeingBound);
Symbols\Source\ModifierUtils.cs (2)
495case FieldSymbol when !symbol.IsAsRestrictive(symbol.ContainingType, ref useSiteInfo): 502case FieldSymbol when (modifiers & DeclarationModifiers.ReadOnly) != 0:
Symbols\Source\SourceAssemblySymbol.cs (12)
96private readonly ConcurrentDictionary<FieldSymbol, bool> _unassignedFieldsMap = new ConcurrentDictionary<FieldSymbol, bool>(); 101private readonly ConcurrentSet<FieldSymbol> _unreadFields = new ConcurrentSet<FieldSymbol>(); 1824var fieldRequestMinimum = (FieldSymbol)_compilation.GetWellKnownTypeMember(WellKnownMember.System_Security_Permissions_SecurityAction__RequestMinimum); 2609internal void NoteFieldAccess(FieldSymbol field, bool read, bool write) 2648internal void NoteFieldDefinition(FieldSymbol field, bool isInternal, bool isUnread) 2687HashSet<FieldSymbol> handledUnreadFields = null; 2689foreach (FieldSymbol field in _unassignedFieldsMap.Keys) // Not mutating, so no snapshot required. 2721handledUnreadFields = new HashSet<FieldSymbol>(); 2753foreach (FieldSymbol field in _unreadFields) // Not mutating, so no snapshot required.
Symbols\Source\SourceEnumConstantSymbol.cs (1)
60internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound)
Symbols\Source\SourceFieldLikeEventSymbol.cs (1)
133internal override FieldSymbol? AssociatedField => AssociatedEventField;
Symbols\Source\SourceFixedFieldSymbol.cs (2)
153private readonly FieldSymbol _internalField; 201internal override FieldSymbol FixedElementField
Symbols\Source\SourceMemberContainerSymbol.cs (18)
721FieldSymbol field; 1508internal override IEnumerable<FieldSymbol> GetFieldsToEmit() 1513var valueField = ((SourceNamedTypeSymbol)this).EnumValueField; 1528yield return (FieldSymbol)m; 1531FieldSymbol? associatedField = ((EventSymbol)m).AssociatedField; 1692else if (member is FieldSymbol field && field.AssociatedSymbol is EventSymbol e) 2383FieldSymbol? field; 2389field = (FieldSymbol)member; 2683FieldSymbol? f; 2689f = (FieldSymbol)m; 2727var f = m as FieldSymbol; 4011private static void AddInitializer(ref ArrayBuilder<FieldOrPropertyInitializer>? initializers, FieldSymbol? fieldOpt, CSharpSyntaxNode node) 4198case FieldSymbol { Name: var fieldName }: 4282Debug.Assert(positionalMembers.All(p => p is PropertySymbol or FieldSymbol)); 4545else if (existingMember is FieldSymbol { IsStatic: false } field 5027FieldSymbol? backingField = property.DeclaredBackingField; 5079FieldSymbol? associatedField = @event.AssociatedField;
Symbols\Source\SourceMemberFieldSymbol.cs (6)
288GetFieldType(ConsList<FieldSymbol>.Empty); 421public sealed override RefKind RefKind => GetTypeAndRefKind(ConsList<FieldSymbol>.Empty).RefKind; 431internal sealed override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound) 436private TypeAndRefKind GetTypeAndRefKind(ConsList<FieldSymbol> fieldsBeingBound) 534fieldsBeingBound = new ConsList<FieldSymbol>(this, fieldsBeingBound); 610internal bool FieldTypeInferred(ConsList<FieldSymbol> fieldsBeingBound)
Symbols\Source\SourceMemberMethodSymbol.cs (1)
880foreach (var field in primaryConstructor.GetBackingFields())
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1441static (m, systemType) => m is FieldSymbol { Type: ArrayTypeSymbol { ElementType: NamedTypeSymbol elementType } } && elementType.Equals(systemType, TypeCompareKind.ConsiderEverything),
Symbols\Source\SourceNamedTypeSymbol.cs (2)
1470foreach (var field in fields) 1830if (TryGetPossiblyUnsupportedByLanguageInlineArrayElementField() is FieldSymbol elementField)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
85internal FieldSymbol EnumValueField
Symbols\SubstitutedEventSymbol.cs (2)
77internal override FieldSymbol? AssociatedField 81FieldSymbol? originalAssociatedField = OriginalDefinition.AssociatedField;
Symbols\SubstitutedFieldSymbol.cs (6)
21internal SubstitutedFieldSymbol(SubstitutedNamedTypeSymbol containingType, FieldSymbol substitutedFrom) 22: base((FieldSymbol)substitutedFrom.OriginalDefinition) 27internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound) 54public override FieldSymbol OriginalDefinition 118var other = obj as FieldSymbol;
Symbols\SubstitutedNamedTypeSymbol.cs (1)
382internal override IEnumerable<FieldSymbol> GetFieldsToEmit()
Symbols\Symbol.cs (2)
1643var field = (FieldSymbol)this;
Symbols\SymbolExtensions.cs (7)
482FieldSymbol field => field.FlowAnalysisAnnotations, 493FieldSymbol field = (FieldSymbol)symbol; 549SymbolKind.Field => ((FieldSymbol)symbol).RequiresInstanceReceiver, 623internal static IFieldSymbol? GetPublicSymbol(this FieldSymbol? symbol) 754internal static ImmutableArray<IFieldSymbol> GetPublicSymbols(this ImmutableArray<FieldSymbol> symbols) 825internal static bool IsRequired(this Symbol symbol) => symbol is FieldSymbol { IsRequired: true } or PropertySymbol { IsRequired: true };
Symbols\SymbolVisitor.cs (1)
55public virtual void VisitField(FieldSymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
55public virtual TResult VisitField(FieldSymbol symbol)
Symbols\SymbolVisitor`2.cs (2)
197/// Called when visiting a <see cref="FieldSymbol" />; Override this with specific 203public virtual TResult VisitField(FieldSymbol symbol, TArgument argument)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListConstructor.cs (1)
30var field = ContainingType.GetFieldsToEmit().Single();
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorConstructor.cs (1)
30var field = ContainingType.GetFieldsToEmit().First();
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (8)
21private readonly FieldSymbol _itemField; 22private readonly FieldSymbol _moveNextCalledField; 55var itemField = containingType._itemField; 67var itemField = containingType._itemField; 79var moveNextCalledField = containingType._moveNextCalledField; 98var moveNextCalledField = containingType._moveNextCalledField; 226internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => _members.OfType<FieldSymbol>();
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (9)
259private readonly FieldSymbol _field; 474var field = containingType._field; 506var field = containingType._field; 558var field = containingType._field; 594var field = containingType._field; 651var field = containingType._field; 685var field = containingType._field; 908internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => _members.OfType<FieldSymbol>();
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (6)
17private IReadOnlyDictionary<ParameterSymbol, FieldSymbol>? _capturedParameters = null; 111public IEnumerable<FieldSymbol> GetBackingFields() 113IReadOnlyDictionary<ParameterSymbol, FieldSymbol> capturedParameters = GetCapturedParameters(); 117return SpecializedCollections.EmptyEnumerable<FieldSymbol>(); 123public IReadOnlyDictionary<ParameterSymbol, FieldSymbol> GetCapturedParameters() 132_capturedParameters = SpecializedCollections.EmptyReadOnlyDictionary<ParameterSymbol, FieldSymbol>();
Symbols\Synthesized\Records\SynthesizedPrimaryConstructorParameterBackingFieldSymbol.cs (1)
49internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound)
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
50foreach (var field in ContainingType.GetFieldsToEmit())
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (3)
26Debug.Assert(positionalMembers.All(p => p is PropertySymbol { GetMethod: not null } or FieldSymbol)); 69FieldSymbol field => field.Type, 87case FieldSymbol field:
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (2)
130var fields = ArrayBuilder<FieldSymbol>.GetInstance(); 132foreach (var f in ContainingType.GetFieldsToEmit())
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (1)
94foreach (var f in ContainingType.GetFieldsToEmit())
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
201SymbolKind.Field => F.Field(F.This(), (FieldSymbol)member),
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
122internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound)
Symbols\Synthesized\SynthesizedContainer.cs (2)
127internal override IEnumerable<FieldSymbol> GetFieldsToEmit() 134yield return (FieldSymbol)m;
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (2)
163internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => SpecializedCollections.EmptyEnumerable<FieldSymbol>();
Symbols\Synthesized\SynthesizedEmbeddedNativeIntegerAttributeSymbol.cs (3)
16private readonly ImmutableArray<FieldSymbol> _fields; 37_fields = ImmutableArray.Create<FieldSymbol>( 60internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => _fields;
Symbols\Synthesized\SynthesizedEmbeddedNullableAttributeSymbol.cs (3)
18private readonly ImmutableArray<FieldSymbol> _fields; 41_fields = ImmutableArray.Create<FieldSymbol>( 64internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => _fields;
Symbols\Synthesized\SynthesizedEmbeddedNullableContextAttributeSymbol.cs (3)
18private readonly ImmutableArray<FieldSymbol> _fields; 29_fields = ImmutableArray.Create<FieldSymbol>( 48internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => _fields;
Symbols\Synthesized\SynthesizedEmbeddedNullablePublicOnlyAttributeSymbol.cs (3)
18private readonly ImmutableArray<FieldSymbol> _fields; 29_fields = ImmutableArray.Create<FieldSymbol>( 48internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => _fields;
Symbols\Synthesized\SynthesizedEmbeddedRefSafetyRulesAttributeSymbol.cs (3)
16private readonly ImmutableArray<FieldSymbol> _fields; 27_fields = ImmutableArray.Create<FieldSymbol>( 43internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => _fields;
Symbols\Synthesized\SynthesizedEnumValueFieldSymbol.cs (1)
33internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound)
Symbols\Synthesized\SynthesizedFieldSymbol.cs (1)
45internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound)
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
87internal abstract override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound);
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (3)
50public FieldSymbol CodeField 51=> (FieldSymbol)_members[1]; 67internal override IEnumerable<FieldSymbol> GetFieldsToEmit()
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (3)
28private readonly ImmutableArray<FieldSymbol> _fields; 40_fields = ImmutableArray.Create<FieldSymbol>(field); 157internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => _fields;
Symbols\Synthesized\SynthesizedLambdaCacheFieldSymbol.cs (1)
40internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound)
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (1)
149internal override IEnumerable<FieldSymbol> GetFieldsToEmit() => throw ExceptionUtilities.Unreachable();
Symbols\Tuples\TupleErrorFieldSymbol.cs (5)
98public override FieldSymbol TupleUnderlyingField 107public override FieldSymbol OriginalDefinition 141public override FieldSymbol CorrespondingTupleField 161internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound) 193internal override FieldSymbol AsMember(NamedTypeSymbol newOwner)
Symbols\Tuples\TupleFieldSymbol.cs (14)
31protected readonly FieldSymbol _correspondingDefaultField; 39FieldSymbol underlyingField, 43FieldSymbol? correspondingDefaultFieldOpt = null) 88public sealed override FieldSymbol TupleUnderlyingField 104public override FieldSymbol OriginalDefinition 129internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound) 201public sealed override FieldSymbol CorrespondingTupleField 209internal override FieldSymbol AsMember(NamedTypeSymbol newOwner) 256FieldSymbol underlyingField, 262FieldSymbol? correspondingDefaultFieldOpt) 306public override FieldSymbol OriginalDefinition 322internal override TypeWithAnnotations GetFieldType(ConsList<FieldSymbol> fieldsBeingBound) 330internal override FieldSymbol AsMember(NamedTypeSymbol newOwner) 337FieldSymbol? newCorrespondingDefaultFieldOpt = null;
Symbols\Tuples\TupleTypeSymbol.cs (19)
562public sealed override ImmutableArray<FieldSymbol> TupleElements 582var currentFieldsForElements = ArrayBuilder<FieldSymbol?>.GetInstance(currentValueTuple.Arity); 596var field = (FieldSymbol)member; 605var underlyingField = field is TupleElementFieldSymbol tupleElement ? tupleElement.UnderlyingField.OriginalDefinition : field.OriginalDefinition; 634FieldSymbol defaultTupleField; 635var fieldSymbol = underlyingField.AsMember(currentValueTuple); 799static void collectTargetTupleFields(int arity, ImmutableArray<Symbol> members, ArrayBuilder<FieldSymbol?> fieldsForElements) 806fieldsForElements.Add((FieldSymbol?)getWellKnownMemberInType(members, wellKnownTupleField)); 832else if (member is FieldSymbol field) 911private ImmutableArray<FieldSymbol> _lazyDefaultElementFields; 1000public ImmutableArray<FieldSymbol> TupleElements(NamedTypeSymbol tuple) 1010ImmutableArray<FieldSymbol> collectTupleElementFields(NamedTypeSymbol tuple) 1012var builder = ArrayBuilder<FieldSymbol>.GetInstance(TupleElementTypesWithAnnotations(tuple).Length, fillWithValue: null!); 1021var candidate = (FieldSymbol)member; 1070var tupleUnderlyingField = ((FieldSymbol)member).TupleUnderlyingField; 1079var underlyingAssociatedField = underlyingEvent.AssociatedField;
Symbols\TypeSymbol.cs (7)
589public virtual ImmutableArray<FieldSymbol> TupleElements => default(ImmutableArray<FieldSymbol>); 2515internal FieldSymbol? TryGetPossiblyUnsupportedByLanguageInlineArrayElementField() 2519FieldSymbol? elementField = null; 2523foreach (FieldSymbol field in ((NamedTypeSymbol)this).OriginalDefinition.GetFieldsToEmit()) 2547internal FieldSymbol? TryGetInlineArrayElementField() 2552internal static bool IsInlineArrayElementFieldSupported(FieldSymbol elementField)
Symbols\Wrapped\WrappedFieldSymbol.cs (3)
26protected readonly FieldSymbol _underlyingField; 28public WrappedFieldSymbol(FieldSymbol underlyingField) 34public FieldSymbol UnderlyingField
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenTupleTest.cs (4)
27924var underlyingField = field.TupleUnderlyingField; 28761var underlying = field.TupleUnderlyingField; 28772var underlying = field.TupleUnderlyingField; 28932var underlying = field.TupleUnderlyingField;