Skip to content

Commit

Permalink
Remove unnecessary type and property instrumentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjp committed May 1, 2018
1 parent ab5ea14 commit a94f010
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/coverlet.core/Instrumentation/Instrumenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,31 +79,6 @@ private void InstrumentType(TypeDefinition type)
if (!method.CustomAttributes.Any(IsExcludeAttribute))
InstrumentMethod(method);
}

foreach (var property in type.Properties)
{
if (!property.CustomAttributes.Any(IsExcludeAttribute))
InstrumentProperty(property);
}

if (type.HasNestedTypes)
{
foreach (var nestedType in type.NestedTypes)
InstrumentType(nestedType);
}
}

private void InstrumentProperty(PropertyDefinition property)
{
if (property.GetMethod != null && !property.GetMethod.IsAbstract)
{
InstrumentMethod(property.GetMethod);
}

if (property.SetMethod != null && !property.SetMethod.IsAbstract)
{
InstrumentMethod(property.SetMethod);
}
}

private void InstrumentMethod(MethodDefinition method)
Expand Down

0 comments on commit a94f010

Please sign in to comment.