Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MultiThreadPipe"/> class.
        /// </summary>
        public MultiThreadPipe(IAsyncLibLog log)
        {
            _log = log;

            // have at least one worker.
            IncreaseWorkerThreads(1);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionExecutionJob"/> class.
 /// </summary>
 public ActionExecutionJob(Action action, IModuleManager moduleManager, IAsyncLibLog log, ILocalContext context)
 {
     _action        = action;
     _moduleManager = moduleManager;
     _log           = log;
     _context       = context;
 }
Exemplo n.º 3
0
        public void Init()
        {
            _log           = MockRepository.GenerateStub <IAsyncLibLog>();
            _moduleManager = MockRepository.GenerateStub <IModuleManager>();
            _context       = MockRepository.GenerateStub <ILocalContext>();

            _sut = new MultiThreadPipe(_log);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Creates a new instance of the <see cref="SingleThreadPipe"/> class.
        /// </summary>
        public SingleThreadPipe(IAsyncLibLog log)
        {
            _log = log;

            var execThread = new Thread(ExecutionThread);

            execThread.IsBackground = true;
            execThread.Start();
        }
Exemplo n.º 5
0
 /// <summary>
 /// Creates a new <see cref="MessageHandlerExecutionJob&lt;T&gt;"/> instance.
 /// </summary>
 public MessageHandlerExecutionJob(
     TMessage message,
     IMessageHandlerCreator handleCreator,
     IModuleManager moduleManager,
     IAsyncLibLog log,
     ILocalContext context)
 {
     _message        = message;
     _handlerCreator = handleCreator;
     _moduleManager  = moduleManager;
     _log            = log;
     _context        = context;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExecutionModule"/> class.
 /// </summary>
 public ExecutionModule(
     IExecutionPipe execPipe,
     IMessageHandlerCreator handlerCreator,
     IModuleManager moduleManager,
     IAsyncLibLog log,
     ILocalContext context)
 {
     _execPipe       = execPipe;
     _handlerCreator = handlerCreator;
     _moduleManager  = moduleManager;
     _log            = log;
     _context        = context;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WorkingDirectoryScanner"/> class.
 /// </summary>
 public WorkingDirectoryScanner(IAsyncLibLog log)
 {
     _log = log;
 }