示例#1
0
 protected override void EndProcessing()
 {
     base.EndProcessing();
     VerboseTracer.Flush(this);
     VerboseTracer.StopTracing();
     _cmdlet = null;
 }
 protected T HandleHttpOperationException <T>(Func <T> action)
 {
     try
     {
         return(action());
     }
     catch (HttpOperationException ex)
     {
         if (TryExtractErrorMessage(ex.Response?.Content, out var message, out var error))
         {
             WriteError(error, message);
         }
         throw;
     }
     finally
     {
         VerboseTracer.Flush(this);
     }
 }