コード例 #1
0
 public void StopProcessProtocol(string protocolId, bool immediate)
 {
     try
     {
         if (protocolId == null)
         {
             throw new ArgumentNullException("protocolId");
         }
         ProcessProtocolHandler handler = null;
         lock (this)
         {
             handler = this._protocolHandlers[protocolId] as ProcessProtocolHandler;
             if (handler != null)
             {
                 this._protocolHandlers.Remove(protocolId);
             }
         }
         if (handler != null)
         {
             handler.StopProtocol(immediate);
         }
     }
     catch (Exception exception)
     {
         using (new ProcessImpersonationContext())
         {
             Misc.ReportUnhandledException(exception, new string[] { System.Web.SR.GetString("Failure_Stop_Process_Prot") });
         }
         throw;
     }
 }