Ejemplo n.º 1
0
 public void BeginSubsegment(string name, DateTime?timestamp = null)
 {
     if (CurrentSubsegment == null)
     {
         CurrentSubsegment = new TestSubsegment
         {
             Name = name
         };
         Subsegments.Add(CurrentSubsegment);
     }
     else
     {
         throw new InvalidOperationException("New subsegment was began without ending previous one");
     }
 }
Ejemplo n.º 2
0
 public void EndSubsegment(DateTime?timestamp = null)
 {
     CurrentSubsegment = null;
 }