コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StopThread"/> class.
        /// </summary>
        /// <param name="abortWorkerThread">The abort worker thread.</param>
        /// <param name="waitForThreadToFinish">The wait for thread to finish.</param>
        public StopThread(IAbortWorkerThread abortWorkerThread,
                          WaitForThreadToFinish waitForThreadToFinish)
        {
            Guard.NotNull(() => abortWorkerThread, abortWorkerThread);
            Guard.NotNull(() => waitForThreadToFinish, waitForThreadToFinish);

            _abortWorkerThread     = abortWorkerThread;
            _waitForThreadToFinish = waitForThreadToFinish;
        }
コード例 #2
0
ファイル: StopThread.cs プロジェクト: blehnen/DotNetWorkQueue
        /// <summary>
        /// Initializes a new instance of the <see cref="StopThread"/> class.
        /// </summary>
        /// <param name="abortWorkerThread">The abort worker thread.</param>
        /// <param name="waitForThreadToFinish">The wait for thread to finish.</param>
        public StopThread(IAbortWorkerThread abortWorkerThread,
            WaitForThreadToFinish waitForThreadToFinish)
        {
            Guard.NotNull(() => abortWorkerThread, abortWorkerThread);
            Guard.NotNull(() => waitForThreadToFinish, waitForThreadToFinish);

            _abortWorkerThread = abortWorkerThread;
            _waitForThreadToFinish = waitForThreadToFinish; 
        }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AbortWorkerThreadDecorator" /> class.
        /// </summary>
        /// <param name="log">The log.</param>
        /// <param name="configuration">The configuration.</param>
        /// <param name="messageMode">The message mode.</param>
        /// <param name="handler">The handler.</param>
        public AbortWorkerThreadDecorator(ILogFactory log,
                                          IWorkerConfiguration configuration,
                                          MessageProcessingMode messageMode,
                                          IAbortWorkerThread handler)
        {
            Guard.NotNull(() => log, log);
            Guard.NotNull(() => handler, handler);
            Guard.NotNull(() => configuration, configuration);
            Guard.NotNull(() => messageMode, messageMode);

            _log           = log.Create();
            _handler       = handler;
            _configuration = configuration;
            _messageMode   = messageMode;
        }
コード例 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AbortWorkerThreadDecorator" /> class.
        /// </summary>
        /// <param name="log">The log.</param>
        /// <param name="configuration">The configuration.</param>
        /// <param name="messageMode">The message mode.</param>
        /// <param name="handler">The handler.</param>
        public AbortWorkerThreadDecorator(ILogFactory log,
            IWorkerConfiguration configuration,
            MessageProcessingMode messageMode,
            IAbortWorkerThread handler)
        {
            Guard.NotNull(() => log, log);
            Guard.NotNull(() => handler, handler);
            Guard.NotNull(() => configuration, configuration);
            Guard.NotNull(() => messageMode, messageMode);

            _log = log.Create();
            _handler = handler;
            _configuration = configuration;
            _messageMode = messageMode;
        }