public void Dispose() { if (String.IsNullOrEmpty(parentName)) { PerformanceMap.StopActivity(name); } else { PerformanceMap.StopSubActivity(name); } }
public PerformanceMeter(string name, string parentName) { if (String.IsNullOrEmpty(parentName)) { PerformanceMap.StartActivity(name); } else { PerformanceMap.StartSubActivity(name, parentName); } this.name = name; this.parentName = parentName; }