1 interface inheriting from IFieldDefinition
Microsoft.CodeAnalysis (1)
PEWriter\Members.cs (1)
974internal interface IGlobalFieldDefinition : IFieldDefinition
4 implementations of IFieldDefinition
Microsoft.CodeAnalysis (2)
CodeGen\PrivateImplementationDetails.cs (1)
466internal abstract class SynthesizedStaticField : 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,
Microsoft.CodeAnalysis.VisualBasic (1)
Emit\FieldSymbolAdapter.vb (1)
19Implements IFieldDefinition
169 references to IFieldDefinition
Microsoft.CodeAnalysis (65)
CodeGen\PrivateImplementationDetails.cs (4)
294public override IEnumerable<Cci.IFieldDefinition> GetFields(EmitContext context) 545public Cci.IFieldDefinition GetResolvedField(EmitContext context) => this; 628public virtual IEnumerable<Cci.IFieldDefinition> GetFields(EmitContext context) 629=> SpecializedCollections.EmptyEnumerable<Cci.IFieldDefinition>();
Emit\CommonPEModuleBuilder.cs (5)
770public ConcurrentQueue<Cci.IFieldDefinition> Fields; 802foreach (var field in Fields) 901public void AddSynthesizedDefinition(TNamedTypeSymbol container, Cci.IFieldDefinition field) 908Interlocked.CompareExchange(ref defs.Fields, new ConcurrentQueue<Cci.IFieldDefinition>(), null); 936public IEnumerable<Cci.IFieldDefinition> GetSynthesizedFields(TNamedTypeSymbol container)
Emit\EditAndContinue\DefinitionMap.cs (1)
109internal abstract bool TryGetFieldHandle(Cci.IFieldDefinition def, out FieldDefinitionHandle handle);
Emit\EditAndContinue\DeletedTypeDefinition.cs (1)
129public IEnumerable<IFieldDefinition> GetFields(EmitContext context)
Emit\EditAndContinue\DeltaMetadataWriter.cs (8)
45private readonly DefinitionIndex<IFieldDefinition> _fieldDefs; 110_fieldDefs = new DefinitionIndex<IFieldDefinition>(this.TryGetExistingFieldDefIndex, sizes[(int)TableIndex.Field]); 330protected override FieldDefinitionHandle GetFieldDefinitionHandle(IFieldDefinition def) 335protected override IReadOnlyList<IFieldDefinition> GetFieldDefs() 587foreach (var fieldDef in typeDef.GetFields(this.Context)) 680IFieldDefinition fieldDef => TryGetExistingFieldDefIndex(fieldDef, out _), 1540private bool TryGetExistingFieldDefIndex(IFieldDefinition item, out int index) 1769public override void Visit(IFieldDefinition fieldDefinition)
Emit\EditAndContinue\EmitBaseline.cs (4)
235fieldsAdded: new Dictionary<Cci.IFieldDefinition, int>(), 295internal readonly IReadOnlyDictionary<Cci.IFieldDefinition, int> FieldsAdded; 356IReadOnlyDictionary<Cci.IFieldDefinition, int> fieldsAdded, 461IReadOnlyDictionary<Cci.IFieldDefinition, int> fieldsAdded,
Emit\EditAndContinue\SymbolChanges.cs (2)
378if (item is IFieldDefinition fieldDefinition && 586internal 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)
45private ImmutableArray<Cci.IFieldDefinition> _lazyFields; 271IEnumerable<Cci.IFieldDefinition> Cci.ITypeDefinition.GetFields(EmitContext context) 277var builder = ArrayBuilder<Cci.IFieldDefinition>.GetInstance();
PEWriter\FullMetadataWriter.cs (5)
23private readonly DefinitionIndex<IFieldDefinition> _fieldDefs; 96_fieldDefs = new DefinitionIndex<IFieldDefinition>(numFieldDefsGuess); 163protected override FieldDefinitionHandle GetFieldDefinitionHandle(IFieldDefinition def) 168protected override IReadOnlyList<IFieldDefinition> GetFieldDefs() 394foreach (IFieldDefinition fieldDef in typeDef.GetFields(Context))
PEWriter\Members.cs (1)
277IFieldDefinition? GetResolvedField(EmitContext context);
PEWriter\MetadataVisitor.cs (4)
91public void Visit(IEnumerable<IFieldDefinition> fields) 93foreach (IFieldDefinition field in fields) 99public virtual void Visit(IFieldDefinition fieldDefinition) 189this.Visit((IFieldDefinition)globalFieldDefinition);
PEWriter\MetadataWriter.cs (10)
199protected abstract FieldDefinitionHandle GetFieldDefinitionHandle(IFieldDefinition def); 205protected abstract IReadOnlyList<IFieldDefinition> GetFieldDefs(); 748public static FieldAttributes GetFieldAttributes(IFieldDefinition fieldDef) 823IFieldDefinition fieldDef = null; 1680IFieldDefinition fieldDef => GetFieldDefinitionHandle(fieldDef), 2259foreach (IFieldDefinition fieldDef in this.GetFieldDefs()) 2274foreach (IFieldDefinition fieldDef in this.GetFieldDefs()) 2313foreach (IFieldDefinition fieldDef in this.GetFieldDefs()) 2343foreach (IFieldDefinition fieldDef in fieldDefs) 2359foreach (IFieldDefinition fieldDef in this.GetFieldDefs())
PEWriter\RootModuleType.cs (2)
91public IEnumerable<IFieldDefinition> GetFields(EmitContext context) 93return SpecializedCollections.EmptyEnumerable<IFieldDefinition>();
PEWriter\Types.cs (1)
470IEnumerable<IFieldDefinition> GetFields(EmitContext context);
Microsoft.CodeAnalysis.CSharp (26)
Compiler\MethodCompiler.cs (1)
1687IEnumerable<Cci.IFieldDefinition> fieldDefs,
Emitter\EditAndContinue\CSharpDefinitionMap.cs (1)
83internal override bool TryGetFieldHandle(Cci.IFieldDefinition def, out FieldDefinitionHandle handle)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (5)
142if (def is Cci.IFieldDefinition field) 154protected abstract IEnumerable<Cci.IFieldDefinition> GetFields(Cci.ITypeDefinition def); 232protected override IEnumerable<Cci.IFieldDefinition> GetFields(Cci.ITypeDefinition def) 235return type.GetFieldsToEmit().Cast<Cci.IFieldDefinition>(); 276protected override IEnumerable<Cci.IFieldDefinition> GetFields(Cci.ITypeDefinition def)
Emitter\Model\FieldSymbolAdapter.cs (15)
55Cci.IFieldDefinition Cci.IFieldReference.GetResolvedField(EmitContext context) 60private Cci.IFieldDefinition ResolvedFieldImpl(PEModuleBuilder moduleBeingBuilt) 110visitor.Visit((Cci.IFieldDefinition)this); 141MetadataConstant Cci.IFieldDefinition.GetCompileTimeValue(EmitContext context) 167ImmutableArray<byte> Cci.IFieldDefinition.MappedData 176bool Cci.IFieldDefinition.IsCompileTimeConstant 187bool Cci.IFieldDefinition.IsNotSerialized 196bool Cci.IFieldDefinition.IsReadOnly 205bool Cci.IFieldDefinition.IsRuntimeSpecial 214bool Cci.IFieldDefinition.IsSpecialName 223bool Cci.IFieldDefinition.IsStatic 232bool Cci.IFieldDefinition.IsMarshalledExplicitly 241Cci.IMarshallingInformation Cci.IFieldDefinition.MarshallingInformation 250ImmutableArray<byte> Cci.IFieldDefinition.MarshallingDescriptor 259int Cci.IFieldDefinition.Offset
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
410IEnumerable<Cci.IFieldDefinition> Cci.ITypeDefinition.GetFields(EmitContext context) 427IEnumerable<Cci.IFieldDefinition> generated = ((PEModuleBuilder)context.Module).GetSynthesizedFields(AdaptedNamedTypeSymbol); 431foreach (var f in generated)
Emitter\Model\SpecializedFieldReference.cs (1)
82Cci.IFieldDefinition Cci.IFieldReference.GetResolvedField(EmitContext context)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (45)
Emit\EditAndContinue\SymbolMatcherTests.cs (42)
578var x1 = fields[0]; 579var x2 = fields[1]; 585var mappedX1 = (Cci.IFieldDefinition)matcher.MapDefinition(x1); 586var mappedX2 = (Cci.IFieldDefinition)matcher.MapDefinition(x2); 649var x1 = fields.Where(f => f.Name == "x1").Single(); 650var x2 = fields.Where(f => f.Name == "x2").Single(); 654var mappedX1 = (Cci.IFieldDefinition)matcher.MapDefinition(x1); 655var mappedX2 = (Cci.IFieldDefinition)matcher.MapDefinition(x2); 1348var y1 = fields.Where(f => f.Name == "y1").Single(); 1349var y2 = fields.Where(f => f.Name == "y2").Single(); 1353var mappedY1 = (Cci.IFieldDefinition)matcher.MapDefinition(y1); 1354var mappedY2 = (Cci.IFieldDefinition)matcher.MapDefinition(y2); 1781var field1 = fields[1]; 1782var field2 = fields[2]; 1783var field3 = fields[3]; 1790var mappedField1 = (Cci.IFieldDefinition)matcher.MapDefinition(field1); 1791var mappedField2 = (Cci.IFieldDefinition)matcher.MapDefinition(field2); 1792var mappedField3 = (Cci.IFieldDefinition)matcher.MapDefinition(field3); 1842var field0 = displayClass.GetFields(emitContext).Single(f => f.Name == "<>9__0_0"); 1846var field1 = (Cci.IFieldDefinition)matcher.MapDefinition(field0); 1905var field1 = fields[1]; 1906var field2 = fields[2]; 1907var field3 = fields[3]; 1972var field1 = fields[1]; 1973var field2 = fields[2]; 1974var field3 = fields[3]; 1981var mappedField1 = (Cci.IFieldDefinition)matcher.MapDefinition(field1); 1982var mappedField2 = (Cci.IFieldDefinition)matcher.MapDefinition(field2); 1983var mappedField3 = (Cci.IFieldDefinition)matcher.MapDefinition(field3);
Emit\EmitMetadataTests.cs (3)
1383var fieldDefinition = (Microsoft.Cci.IFieldDefinition)field.GetCciAdapter(); 1419var fieldDefinition = typeDefinition.GetFields(context).First();
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler.Utilities (1)
NamespaceTypeDefinitionNoBase.cs (1)
112IEnumerable<IFieldDefinition> ITypeDefinition.GetFields(EmitContext context) => UnderlyingType.GetFields(context);
Microsoft.CodeAnalysis.VisualBasic (24)
Compilation\MethodCompiler.vb (1)
1700fieldDefs As IEnumerable(Of Cci.IFieldDefinition),
Emit\EditAndContinue\VisualBasicDefinitionMap.vb (1)
94Friend Overrides Function TryGetFieldHandle(def As Cci.IFieldDefinition, <Out> ByRef handle As FieldDefinitionHandle) As Boolean
Emit\EditAndContinue\VisualBasicSymbolMatcher.vb (5)
113Dim field = TryCast(def, Cci.IFieldDefinition) 125Protected MustOverride Function GetFields(def As Cci.ITypeDefinition) As IEnumerable(Of Cci.IFieldDefinition) 188Protected Overrides Function GetFields(def As Cci.ITypeDefinition) As IEnumerable(Of Cci.IFieldDefinition) 189Return (DirectCast(def, PENamedTypeSymbol)).GetFieldsToEmit().Cast(Of Cci.IFieldDefinition)() 221Protected Overrides Function GetFields(def As Cci.ITypeDefinition) As IEnumerable(Of Cci.IFieldDefinition)
Emit\FieldSymbolAdapter.vb (15)
47Private Function IFieldReferenceGetResolvedField(context As EmitContext) As IFieldDefinition Implements IFieldReference.GetResolvedField 51Private Function ResolvedFieldImpl(moduleBeingBuilt As PEModuleBuilder) As IFieldDefinition 87visitor.Visit(DirectCast(Me, IFieldDefinition)) 111Private Function IFieldDefinition_GetCompileTimeValue(context As EmitContext) As MetadataConstant Implements IFieldDefinition.GetCompileTimeValue 127Private ReadOnly Property IFieldDefinitionFieldMapping As ImmutableArray(Of Byte) Implements IFieldDefinition.MappedData 133Private ReadOnly Property IFieldDefinitionIsCompileTimeConstant As Boolean Implements IFieldDefinition.IsCompileTimeConstant 147Private ReadOnly Property IFieldDefinitionIsNotSerialized As Boolean Implements IFieldDefinition.IsNotSerialized 154Private ReadOnly Property IFieldDefinitionIsReadOnly As Boolean Implements IFieldDefinition.IsReadOnly 164Private ReadOnly Property IFieldDefinitionIsRuntimeSpecial As Boolean Implements IFieldDefinition.IsRuntimeSpecial 171Private ReadOnly Property IFieldDefinitionIsSpecialName As Boolean Implements IFieldDefinition.IsSpecialName 178Private ReadOnly Property IFieldDefinitionIsStatic As Boolean Implements IFieldDefinition.IsStatic 185Private ReadOnly Property IFieldDefinitionIsMarshalledExplicitly As Boolean Implements IFieldDefinition.IsMarshalledExplicitly 192Private ReadOnly Property IFieldDefinitionMarshallingInformation As IMarshallingInformation Implements IFieldDefinition.MarshallingInformation 199Private ReadOnly Property IFieldDefinitionMarshallingDescriptor As ImmutableArray(Of Byte) Implements IFieldDefinition.MarshallingDescriptor 206Private ReadOnly Property IFieldDefinitionOffset As Integer Implements IFieldDefinition.Offset
Emit\NamedTypeSymbolAdapter.vb (1)
328Private Iterator Function ITypeDefinitionGetFields(context As EmitContext) As IEnumerable(Of IFieldDefinition) Implements ITypeDefinition.GetFields
Emit\SpecializedFieldReference.vb (1)
76Private Function IFieldReferenceGetResolvedField(context As EmitContext) As Cci.IFieldDefinition Implements Cci.IFieldReference.GetResolvedField
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (6)
Emit\EditAndContinue\SymbolMatcherTests.vb (6)
363Dim mappedX1 = DirectCast(matcher.MapDefinition(x1), Cci.IFieldDefinition) 364Dim mappedX2 = DirectCast(matcher.MapDefinition(x2), Cci.IFieldDefinition) 434Dim mappedX1 = DirectCast(matcher.MapDefinition(x1), Cci.IFieldDefinition) 435Dim mappedX2 = DirectCast(matcher.MapDefinition(x2), Cci.IFieldDefinition) 511Dim mappedX1 = DirectCast(matcher.MapDefinition(x1), Cci.IFieldDefinition) 512Dim mappedX2 = DirectCast(matcher.MapDefinition(x2), Cci.IFieldDefinition)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Semantics\FieldInitializerBindingTests.vb (1)
1515Return (DirectCast(symbol.GetCciAdapter(), Microsoft.Cci.IFieldDefinition)).IsStatic
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Source\EnumTests.vb (1)
1370Dim fieldDefinition = DirectCast(field.GetCciAdapter(), Cci.IFieldDefinition)