Browse Source

created new ctor with optional parameters in ProfilerOptions for better usability

pull/14/head
Siegfried Pammer 15 years ago
parent
commit
f45bf5e1d7
  1. 20
      src/AddIns/Analysis/Profiler/Controller/ProfilerOptions.cs

20
src/AddIns/Analysis/Profiler/Controller/ProfilerOptions.cs

@ -89,9 +89,13 @@ namespace ICSharpCode.Profiler.Controller
/// <summary> /// <summary>
/// Creates new ProfilerOptions using the selected settings. /// Creates new ProfilerOptions using the selected settings.
/// </summary> /// </summary>
public ProfilerOptions(bool enableDC, int sharedMemorySize, bool profileDotNetInternals, public ProfilerOptions(bool enableDC = true,
bool combineRecursiveFunction, bool enableDCAtStart, bool trackEvents, int sharedMemorySize = DefaultSharedMemorySize,
IEnumerable<PerformanceCounterDescriptor> counters) bool profileDotNetInternals = false,
bool combineRecursiveFunction = false,
bool enableDCAtStart = true,
bool trackEvents = false,
IEnumerable<PerformanceCounterDescriptor> counters = null)
{ {
this.enableDC = enableDC; this.enableDC = enableDC;
this.sharedMemorySize = sharedMemorySize; this.sharedMemorySize = sharedMemorySize;
@ -99,15 +103,7 @@ namespace ICSharpCode.Profiler.Controller
this.combineRecursiveFunction = combineRecursiveFunction; this.combineRecursiveFunction = combineRecursiveFunction;
this.enableDCAtStart = enableDCAtStart; this.enableDCAtStart = enableDCAtStart;
this.trackEvents = trackEvents; this.trackEvents = trackEvents;
this.counters = counters.ToArray(); this.counters = (counters ?? DefaultCounters).ToArray();
}
/// <summary>
/// Creates default ProfilerOptions.
/// </summary>
public ProfilerOptions()
: this(true, DefaultSharedMemorySize, false, false, true, false, DefaultCounters)
{
} }
} }
} }

Loading…
Cancel
Save