Esempio n. 1
0
        public void Start()
        {
            if (_poller == null)
            {
                throw new InvalidOperationException("You need to call Setup first.");
            }

            _poller.Start();
        }
Esempio n. 2
0
 public void Start()
 {
     if (_poller != null)
     {
         _poller.Start();
     }
     else if (_queueOperator.IsEventDriven)
     {
         _queueOperator.RegisterHandler(async(e, oper) =>
         {
             var actor = (IProcessorActor)_serviceLocator.GetService(_actorDescriptor.ActorType);
             await ProcessEvent(actor, e, oper);
         }, _actorDescriptor);
     }
     else
     {
         throw new InvalidOperationException("You need to call setup first!");
     }
 }