Remove redundant IEntity implemented interface declaration and explit interface member implemenration

This commit is contained in:
Tamas Vajk
2021-02-11 11:27:31 +01:00
parent 61e952766c
commit 67caf3cad0
4 changed files with 6 additions and 12 deletions

View File

@@ -61,7 +61,7 @@ namespace Semmle.Extraction.CIL.Entities
cx2.Populate(this);
}
TrapStackBehaviour IEntity.TrapStackBehaviour => TrapStackBehaviour.NoLabel;
public TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
public abstract IEnumerable<Type> TypeParameters { get; }

View File

@@ -8,7 +8,7 @@ namespace Semmle.Extraction.CIL.Entities
/// <summary>
/// A CIL instruction.
/// </summary>
internal class Instruction : UnlabelledEntity, IEntity
internal class Instruction : UnlabelledEntity
{
/// <summary>
/// The additional data following the opcode, if any.
@@ -289,11 +289,6 @@ namespace Semmle.Extraction.CIL.Entities
}
}
Label IEntity.Label
{
get; set;
}
private readonly byte[] data;
private int PayloadSize => payloadSizes[(int)PayloadType];

View File

@@ -31,8 +31,6 @@ namespace Semmle.Extraction.CIL.Entities
public abstract string IdSuffix { get; }
Location IEntity.ReportingLocation => throw new NotImplementedException();
public void Extract(Context cx2) { cx2.Populate(this); }
public abstract IEnumerable<IExtractionProduct> Contents { get; }
@@ -44,7 +42,8 @@ namespace Semmle.Extraction.CIL.Entities
return writer.ToString();
}
TrapStackBehaviour IEntity.TrapStackBehaviour => TrapStackBehaviour.NoLabel;
public TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
public Location ReportingLocation => throw new NotImplementedException();
public abstract IEnumerable<Type> MethodParameters { get; }
public abstract IEnumerable<Type> TypeParameters { get; }

View File

@@ -71,7 +71,7 @@ namespace Semmle.Extraction.CIL
cx.Cx.AddFreshLabel(this);
}
TrapStackBehaviour IEntity.TrapStackBehaviour => TrapStackBehaviour.NoLabel;
public TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
}
/// <summary>
@@ -115,7 +115,7 @@ namespace Semmle.Extraction.CIL
return writer.ToString();
}
TrapStackBehaviour IEntity.TrapStackBehaviour => TrapStackBehaviour.NoLabel;
public TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
}
/// <summary>