1 interface inheriting from IFieldDefinition
Microsoft.CodeAnalysis (1)
PEWriter\Members.cs (1)
974internal interface IGlobalFieldDefinition : IFieldDefinition
3 implementations of IFieldDefinition
Microsoft.CodeAnalysis (2)
CodeGen\PrivateImplementationDetails.cs (1)
835internal abstract class SynthesizedStaticFieldBase : Cci.IFieldDefinition
Emit\NoPia\CommonEmbeddedField.cs (1)
35internal abstract class CommonEmbeddedField : CommonEmbeddedMember<TFieldSymbol>, Cci.IFieldDefinition
Microsoft.CodeAnalysis.CSharp (1)
Emitter\Model\FieldSymbolAdapter.cs (1)
23Cci.IFieldDefinition,
135 references to IFieldDefinition
Microsoft.CodeAnalysis (67)
CodeGen\PrivateImplementationDetails.cs (7)
460public override IEnumerable<Cci.IFieldDefinition> GetFields(EmitContext context) 731private readonly ImmutableArray<Cci.IFieldDefinition> _fields; 788public Cci.IFieldDefinition Field => _fields[0]; 793public override IEnumerable<Cci.IFieldDefinition> GetFields(EmitContext context) => _fields; 909public Cci.IFieldDefinition GetResolvedField(EmitContext context) => this; 1031public virtual IEnumerable<Cci.IFieldDefinition> GetFields(EmitContext context) 1032=> SpecializedCollections.EmptyEnumerable<Cci.IFieldDefinition>();
Emit\CommonPEModuleBuilder.cs (5)
878public ConcurrentQueue<Cci.IFieldDefinition> Fields; 910foreach (var field in Fields) 1009public virtual void AddSynthesizedDefinition(TNamedTypeSymbol container, Cci.IFieldDefinition field) 1016Interlocked.CompareExchange(ref defs.Fields, new ConcurrentQueue<Cci.IFieldDefinition>(), null); 1044public IEnumerable<Cci.IFieldDefinition> GetSynthesizedFields(TNamedTypeSymbol container)
Emit\EditAndContinue\DeletedSourceTypeDefinition.cs (1)
115public IEnumerable<IFieldDefinition> GetFields(EmitContext context)
Emit\EditAndContinue\DeltaMetadataWriter.cs (8)
40private readonly DefinitionIndex<IFieldDefinition> _fieldDefs; 103_fieldDefs = new DefinitionIndex<IFieldDefinition>(this.TryGetExistingFieldDefIndex, sizes[(int)TableIndex.Field]); 336protected override FieldDefinitionHandle GetFieldDefinitionHandle(IFieldDefinition def) 341protected override IReadOnlyList<IFieldDefinition> GetFieldDefs() 677foreach (var fieldDef in typeDef.GetFields(this.Context)) 773IFieldDefinition fieldDef => TryGetExistingFieldDefIndex(fieldDef, out _), 1676private bool TryGetExistingFieldDefIndex(IFieldDefinition item, out int index) 1896public override void Visit(IFieldDefinition fieldDefinition)
Emit\EditAndContinue\EmitBaseline.cs (4)
179fieldsAdded: new Dictionary<Cci.IFieldDefinition, int>(), 237internal readonly IReadOnlyDictionary<Cci.IFieldDefinition, int> FieldsAdded; 300IReadOnlyDictionary<Cci.IFieldDefinition, int> fieldsAdded, 399IReadOnlyDictionary<Cci.IFieldDefinition, int> fieldsAdded,
Emit\EditAndContinue\SymbolChanges.cs (2)
297if (item is IFieldDefinition fieldDefinition && 536internal IDefinition? GetContainingDefinitionForBackingField(IFieldDefinition fieldDefinition)
Emit\NoPia\CommonEmbeddedField.cs (14)
67MetadataConstant Cci.IFieldDefinition.GetCompileTimeValue(EmitContext context) 72ImmutableArray<byte> Cci.IFieldDefinition.MappedData 80bool Cci.IFieldDefinition.IsCompileTimeConstant 88bool Cci.IFieldDefinition.IsNotSerialized 96bool Cci.IFieldDefinition.IsReadOnly 104bool Cci.IFieldDefinition.IsRuntimeSpecial 112bool Cci.IFieldDefinition.IsSpecialName 120bool Cci.IFieldDefinition.IsStatic 128bool Cci.IFieldDefinition.IsMarshalledExplicitly 136Cci.IMarshallingInformation Cci.IFieldDefinition.MarshallingInformation 144ImmutableArray<byte> Cci.IFieldDefinition.MarshallingDescriptor 152int Cci.IFieldDefinition.Offset 183visitor.Visit((Cci.IFieldDefinition)this); 208Cci.IFieldDefinition Cci.IFieldReference.GetResolvedField(EmitContext context)
Emit\NoPia\CommonEmbeddedType.cs (3)
46private ImmutableArray<Cci.IFieldDefinition> _lazyFields; 273IEnumerable<Cci.IFieldDefinition> Cci.ITypeDefinition.GetFields(EmitContext context) 279var builder = ArrayBuilder<Cci.IFieldDefinition>.GetInstance();
PEWriter\FullMetadataWriter.cs (5)
21private readonly DefinitionIndex<IFieldDefinition> _fieldDefs; 94_fieldDefs = new DefinitionIndex<IFieldDefinition>(numFieldDefsGuess); 161protected override FieldDefinitionHandle GetFieldDefinitionHandle(IFieldDefinition def) 166protected override IReadOnlyList<IFieldDefinition> GetFieldDefs() 392foreach (IFieldDefinition fieldDef in typeDef.GetFields(Context))
PEWriter\Members.cs (1)
277IFieldDefinition? GetResolvedField(EmitContext context);
PEWriter\MetadataVisitor.cs (4)
92public void Visit(IEnumerable<IFieldDefinition> fields) 94foreach (IFieldDefinition field in fields) 100public virtual void Visit(IFieldDefinition fieldDefinition) 190this.Visit((IFieldDefinition)globalFieldDefinition);
PEWriter\MetadataWriter.cs (10)
203protected abstract FieldDefinitionHandle GetFieldDefinitionHandle(IFieldDefinition def); 209protected abstract IReadOnlyList<IFieldDefinition> GetFieldDefs(); 753public static FieldAttributes GetFieldAttributes(IFieldDefinition fieldDef) 828IFieldDefinition fieldDef = null; 1679IFieldDefinition fieldDef => GetFieldDefinitionHandle(fieldDef), 2279foreach (IFieldDefinition fieldDef in this.GetFieldDefs()) 2294foreach (IFieldDefinition fieldDef in this.GetFieldDefs()) 2336foreach (IFieldDefinition fieldDef in this.GetFieldDefs()) 2376foreach (IFieldDefinition fieldDef in fieldDefs) 2392foreach (IFieldDefinition fieldDef in this.GetFieldDefs())
PEWriter\RootModuleType.cs (2)
93public IEnumerable<IFieldDefinition> GetFields(EmitContext context) 95return SpecializedCollections.EmptyEnumerable<IFieldDefinition>();
PEWriter\Types.cs (1)
480IEnumerable<IFieldDefinition> GetFields(EmitContext context);
Microsoft.CodeAnalysis.CSharp (23)
Compiler\MethodCompiler.cs (1)
1786IEnumerable<Cci.IFieldDefinition> fieldDefs,
Emitter\Model\FieldSymbolAdapter.cs (15)
58Cci.IFieldDefinition Cci.IFieldReference.GetResolvedField(EmitContext context) 63private Cci.IFieldDefinition ResolvedFieldImpl(PEModuleBuilder moduleBeingBuilt) 113visitor.Visit((Cci.IFieldDefinition)this); 144MetadataConstant Cci.IFieldDefinition.GetCompileTimeValue(EmitContext context) 170ImmutableArray<byte> Cci.IFieldDefinition.MappedData 179bool Cci.IFieldDefinition.IsCompileTimeConstant 190bool Cci.IFieldDefinition.IsNotSerialized 199bool Cci.IFieldDefinition.IsReadOnly 208bool Cci.IFieldDefinition.IsRuntimeSpecial 217bool Cci.IFieldDefinition.IsSpecialName 226bool Cci.IFieldDefinition.IsStatic 235bool Cci.IFieldDefinition.IsMarshalledExplicitly 244Cci.IMarshallingInformation Cci.IFieldDefinition.MarshallingInformation 253ImmutableArray<byte> Cci.IFieldDefinition.MarshallingDescriptor 262int Cci.IFieldDefinition.Offset
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
425IEnumerable<Cci.IFieldDefinition> Cci.ITypeDefinition.GetFields(EmitContext context) 442IEnumerable<Cci.IFieldDefinition> generated = ((PEModuleBuilder)context.Module).GetSynthesizedFields(AdaptedNamedTypeSymbol); 446foreach (var f in generated)
Emitter\Model\PEModuleBuilder.cs (1)
2123public override void AddSynthesizedDefinition(NamedTypeSymbol container, Cci.IFieldDefinition field)
Emitter\Model\SpecializedFieldReference.cs (1)
82Cci.IFieldDefinition Cci.IFieldReference.GetResolvedField(EmitContext context)
Symbols\Source\ExtensionGroupingInfo.cs (2)
624IEnumerable<IFieldDefinition> ITypeDefinition.GetFields(EmitContext context) 626return SpecializedCollections.EmptyEnumerable<IFieldDefinition>();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
Emit\EmitMetadataTests.cs (3)
1384var fieldDefinition = (Microsoft.Cci.IFieldDefinition)field.GetCciAdapter(); 1420var fieldDefinition = typeDefinition.GetFields(context).First();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (42)
Emit\EditAndContinue\SymbolMatcherTests.cs (42)
504var x1 = fields[0]; 505var x2 = fields[1]; 511var mappedX1 = (Cci.IFieldDefinition)matcher.MapDefinition(x1); 512var mappedX2 = (Cci.IFieldDefinition)matcher.MapDefinition(x2); 576var x1 = fields.Where(f => f.Name == "x1").Single(); 577var x2 = fields.Where(f => f.Name == "x2").Single(); 581var mappedX1 = (Cci.IFieldDefinition)matcher.MapDefinition(x1); 582var mappedX2 = (Cci.IFieldDefinition)matcher.MapDefinition(x2); 1130var y1 = fields.Where(f => f.Name == "y1").Single(); 1131var y2 = fields.Where(f => f.Name == "y2").Single(); 1135var mappedY1 = (Cci.IFieldDefinition)matcher.MapDefinition(y1); 1136var mappedY2 = (Cci.IFieldDefinition)matcher.MapDefinition(y2); 1483var field1 = fields[1]; 1484var field2 = fields[2]; 1485var field3 = fields[3]; 1492var mappedField1 = (Cci.IFieldDefinition)matcher.MapDefinition(field1); 1493var mappedField2 = (Cci.IFieldDefinition)matcher.MapDefinition(field2); 1494var mappedField3 = (Cci.IFieldDefinition)matcher.MapDefinition(field3); 1545var field0 = displayClass.GetFields(emitContext).Single(f => f.Name == "<>9__0_0"); 1549var field1 = (Cci.IFieldDefinition)matcher.MapDefinition(field0); 1611var field1 = fields[1]; 1612var field2 = fields[2]; 1613var field3 = fields[3]; 1681var field1 = fields[1]; 1682var field2 = fields[2]; 1683var field3 = fields[3]; 1690var mappedField1 = (Cci.IFieldDefinition)matcher.MapDefinition(field1); 1691var mappedField2 = (Cci.IFieldDefinition)matcher.MapDefinition(field2); 1692var mappedField3 = (Cci.IFieldDefinition)matcher.MapDefinition(field3);