Skip to content

Commit 43ca130

Browse files
Mohammad DehghanMohammad Dehghan
authored andcommitted
Oooops! Revert "Move InstrumentationUniqueIdAttribute to where it belongs"
This reverts commit ca9d2c8. The attribute is added to every instrumented assembly. It should be in the Recorder assembly, because only the Recorder assembly is being (should be) referenced by instrumented assemblies.
1 parent 11bc116 commit 43ca130

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

SG.CodeCoverage/Instrumentation/InstrumentationUniqueIdAttribute.cs renamed to SG.CodeCoverage.Recorder/InstrumentationUniqueIdAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace SG.CodeCoverage.Instrumentation
3+
namespace SG.CodeCoverage.Recorder
44
{
55
[AttributeUsage(AttributeTargets.Assembly)]
66
public sealed class InstrumentationUniqueIdAttribute : Attribute

SG.CodeCoverage/Instrumentation/Instrumenter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ private InstrumentedTypeMap InstrumentType(TypeDefinition type)
154154
private void AddUniqueIdAssemblyAttribute(AssemblyDefinition assembly)
155155
{
156156
var module = assembly.MainModule;
157-
var attribType = typeof(InstrumentationUniqueIdAttribute);
157+
var attribType = typeof(Recorder.InstrumentationUniqueIdAttribute);
158158
var attribTypeRef = module.ImportReference(attribType);
159159
var attrib = assembly.CustomAttributes.FirstOrDefault(a => a.AttributeType == attribTypeRef);
160160
var attribArgument = new CustomAttributeArgument(module.ImportReference(typeof(string)), UniqueId.ToString());

SG.CodeCoverage/SG.CodeCoverage.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
<Compile Include="Coverage\CoverageTypeResult.cs" />
5959
<Compile Include="Coverage\SummaryResult.cs" />
6060
<Compile Include="Instrumentation\InstrumentationOptions.cs" />
61-
<Compile Include="Instrumentation\InstrumentationUniqueIdAttribute.cs" />
6261
<Compile Include="Metadata\InstrumentedAssemblyMap.cs" />
6362
<Compile Include="Instrumentation\AssemblyResolver.cs" />
6463
<Compile Include="Instrumentation\Instrumenter.cs" />

0 commit comments

Comments
 (0)