diff --git a/src/AddIns/Analysis/Profiler/Controller/ProfilerOptions.cs b/src/AddIns/Analysis/Profiler/Controller/ProfilerOptions.cs
index a02a9ee68c..1c443b608c 100644
--- a/src/AddIns/Analysis/Profiler/Controller/ProfilerOptions.cs
+++ b/src/AddIns/Analysis/Profiler/Controller/ProfilerOptions.cs
@@ -89,9 +89,13 @@ namespace ICSharpCode.Profiler.Controller
///
/// Creates new ProfilerOptions using the selected settings.
///
- public ProfilerOptions(bool enableDC, int sharedMemorySize, bool profileDotNetInternals,
- bool combineRecursiveFunction, bool enableDCAtStart, bool trackEvents,
- IEnumerable counters)
+ public ProfilerOptions(bool enableDC = true,
+ int sharedMemorySize = DefaultSharedMemorySize,
+ bool profileDotNetInternals = false,
+ bool combineRecursiveFunction = false,
+ bool enableDCAtStart = true,
+ bool trackEvents = false,
+ IEnumerable counters = null)
{
this.enableDC = enableDC;
this.sharedMemorySize = sharedMemorySize;
@@ -99,15 +103,7 @@ namespace ICSharpCode.Profiler.Controller
this.combineRecursiveFunction = combineRecursiveFunction;
this.enableDCAtStart = enableDCAtStart;
this.trackEvents = trackEvents;
- this.counters = counters.ToArray();
- }
-
- ///
- /// Creates default ProfilerOptions.
- ///
- public ProfilerOptions()
- : this(true, DefaultSharedMemorySize, false, false, true, false, DefaultCounters)
- {
+ this.counters = (counters ?? DefaultCounters).ToArray();
}
}
}