public void StartMeasure(MethodBase methodToMeasure) { var method = new MethodMetadata(methodToMeasure); if (methodsStack.Count != 0) { methodsStack.Peek().NewInnerMethod(method); } else {// this is last-stackframe-level method Methods.Add(method); } methodsStack.Push(method); method.StartMeasure(); }
public void NewInnerMethod(MethodMetadata method) { InnerMethods.Add(method); }