コード例 #1
0
 public void Dispose()
 {
     if (_bus != null)
     {
         _bus.Dispose();
         _bus = null;
     }
 }
コード例 #2
0
        public bool Stop()
        {
            if (bus != null)
            {
                bus.Dispose();
            }

            return(true);
        }
コード例 #3
0
        void OnCriticalError(string errorMessage, Exception exception)
        {
            // If you want the process to be active, dispose the bus.
            // Note that when the bus is disposed sending messages will throw with an ObjectDisposedException.
            bus.Dispose();

            // If you want to kill the process, raise a fail fast error as shown below.
            //string failMessage = string.Format("Critical error shutting down:'{0}'.", errorMessage);
            //Environment.FailFast(failMessage, exception);
        }
コード例 #4
0
        void OnCriticalError(string errorMessage, Exception exception)
        {
            // To leave the process active, dispose the bus.
            // When the bus is disposed sending messages will throw an ObjectDisposedException.
            bus.Dispose();

            // To kill the process, raise a fail fast error as shown below.
            // var failMessage = $"Critical error shutting down:'{errorMessage}'.";
            // Environment.FailFast(failMessage, exception);
        }
コード例 #5
0
        void OnCriticalError()
        {
            //Write log entry in version 3 since this is not done by default.
            Logger.Fatal("CRITICAL Error");

            // If you want the process to be active, dispose the bus.
            // Note that when the bus is disposed sending messages will throw with an ObjectDisposedException.
            bus.Dispose();

            // If you want to kill the process, raise a fail fast error as shown below.
            //string failMessage = string.Format("Critical error shutting down:'{0}'.", errorMessage);
            //Environment.FailFast(failMessage, exception);
        }
コード例 #6
0
 void OnCriticalError(string errorMessage, Exception exception)
 {
     try
     {
         // To leave the process active, dispose the bus.
         // When the bus is disposed, the attempt to send message will cause an ObjectDisposedException.
         bus.Dispose();
         // Perform custom actions here, e.g.
         // NLog.LogManager.Shutdown();
     }
     finally
     {
         var failMessage = $"Critical error shutting down:'{errorMessage}'.";
         Environment.FailFast(failMessage, exception);
     }
 }
コード例 #7
0
ファイル: NSBMessageBus.cs プロジェクト: darrenferne/stuff
        private void Dispose(bool destruct)
        {
            if (!_disposed)
            {
                if (_bus != null)
                {
                    _bus.Dispose();
                    _bus = null;
                }

                if (_factory != null)
                {
                    _factory.Dispose();
                    _factory = null;
                }

                _disposed = true;
            }
        }
コード例 #8
0
 protected void Application_End()
 {
     startableBus.Dispose();
 }
コード例 #9
0
 public void Stop()
 {
     bus.Dispose();
 }
コード例 #10
0
 public void Dispose()
 {
     startableBus.Dispose();
 }