Skip to content

Commit d2f15d4

Browse files
committed
Initialize IsCoreLibrary in the constructor
1 parent 9dcc8dc commit d2f15d4

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/coverlet.core/Instrumentation/Instrumenter.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,12 @@ public Instrumenter(string module, string identifier, string[] excludeFilters, s
4141
_includeFilters = includeFilters;
4242
_excludedFiles = excludedFiles ?? Array.Empty<string>();
4343
_excludedAttributes = excludedAttributes;
44-
}
4544

46-
private bool IsCoreLibrary
47-
{
48-
get
49-
{
50-
return Path.GetFileNameWithoutExtension(_module) == "System.Private.CoreLib";
51-
}
45+
IsCoreLibrary = Path.GetFileNameWithoutExtension(_module) == "System.Private.CoreLib";
5246
}
5347

48+
private bool IsCoreLibrary { get; }
49+
5450
public bool CanInstrument() => InstrumentationHelper.HasPdb(_module);
5551

5652
public InstrumenterResult Instrument()

0 commit comments

Comments
 (0)