public void Dispose()
 {
     if (this.mustDispose)
     {
         this.mustDispose = false;
         if (this.emitTransfer)
         {
             DiagnosticTrace.TraceTransfer(this.oldGuid);
         }
         DiagnosticTrace.SetActivityId(this.oldGuid);
     }
 }
 private Activity(ref Guid newGuid, bool emitTransfer)
 {
     this.emitTransfer = emitTransfer;
     if (DiagnosticTrace.ShouldCorrelate && (newGuid != Guid.Empty))
     {
         this.newGuid = newGuid;
         this.oldGuid = DiagnosticTrace.GetActivityId();
         if (this.oldGuid != newGuid)
         {
             this.mustDispose = true;
             if (this.emitTransfer)
             {
                 DiagnosticTrace.TraceTransfer(newGuid);
             }
             DiagnosticTrace.SetActivityId(newGuid);
         }
     }
 }