@@ -8,41 +8,27 @@ namespace Semmle.Extraction.CIL.Entities
88 /// <summary>
99 /// An entity representing a field.
1010 /// </summary>
11- internal abstract class Field : IGenericContext , IMember , ICustomModifierReceiver
11+ internal abstract class Field : LabelledEntity , IGenericContext , IMember , ICustomModifierReceiver
1212 {
13- protected Field ( Context cx )
13+ protected Field ( Context cx ) : base ( cx )
1414 {
15- Cx = cx ;
1615 }
1716
18- public Label Label { get ; set ; }
19-
20- public void WriteId ( TextWriter trapFile )
17+ public override void WriteId ( TextWriter trapFile )
2118 {
2219 trapFile . WriteSubId ( DeclaringType ) ;
2320 trapFile . Write ( '.' ) ;
2421 trapFile . Write ( Name ) ;
22+ trapFile . Write ( ";cil-field" ) ;
2523 }
2624
27- public void WriteQuotedId ( TextWriter trapFile )
28- {
29- trapFile . Write ( "@\" " ) ;
30- WriteId ( trapFile ) ;
31- trapFile . Write ( idSuffix ) ;
32- trapFile . Write ( '\" ' ) ;
33- }
34-
35- private const string idSuffix = ";cil-field" ;
36-
3725 public abstract string Name { get ; }
3826
3927 public abstract Type DeclaringType { get ; }
4028
41- public Location ReportingLocation => throw new NotImplementedException ( ) ;
42-
4329 public abstract Type Type { get ; }
4430
45- public virtual IEnumerable < IExtractionProduct > Contents
31+ public override IEnumerable < IExtractionProduct > Contents
4632 {
4733 get
4834 {
@@ -56,17 +42,8 @@ public virtual IEnumerable<IExtractionProduct> Contents
5642 }
5743 }
5844
59- public void Extract ( Context cx2 )
60- {
61- cx2 . Populate ( this ) ;
62- }
63-
64- public TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour . NoLabel ;
65-
6645 public abstract IEnumerable < Type > TypeParameters { get ; }
6746
6847 public abstract IEnumerable < Type > MethodParameters { get ; }
69-
70- public Context Cx { get ; }
7148 }
7249}
0 commit comments