Example #1
0
        /// <summary>
        /// Dispose pattern.
        /// </summary>
        /// <param name="disposing"></param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_operationEnablementTask != null)
                {
                    _operationEnablementTask.Dispose();
                    _operationEnablementTask = null;
                }

                foreach (var folder in _workflowFolders)
                {
                    folder.Dispose();
                }

                if (_itemTools != null)
                {
                    _itemTools.Dispose();
                    _itemTools = null;
                }
                if (_folderTools != null)
                {
                    _folderTools.Dispose();
                    _folderTools = null;
                }
            }
        }
Example #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            try
            {
                _cleanupOldTrackedErrorsTask.Dispose();
            }
            finally
            {
                _disposed = true;
            }
        }
Example #3
0
        /// <summary>
        /// Shuts down the background timer
        /// </summary>
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            try
            {
                _expiredMessagesCleanupTask.Dispose();
            }
            finally
            {
                _disposed = true;
            }
        }
            void DisposeTask()
            {
                if (_workerStopped)
                {
                    return;
                }

                try
                {
                    _workerTask.Dispose();
                    _log.Debug("Worker {0} stopped", Name);
                }
                finally
                {
                    _workerStopped = true;
                }
            }
Example #5
0
        /// <summary>
        /// Stops the background task
        /// </summary>
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            try
            {
                if (disposing)
                {
                    _dueMessagesSenderBackgroundTask.Dispose();
                }
            }
            finally
            {
                _disposed = true;
            }
        }
Example #6
0
 protected virtual void Dispose(bool disposing)
 {
     _dueMessagesSenderBackgroundTask.Dispose();
 }