Beispiel #1
0
        protected virtual void RaiseExceptionEvent(StateObject state)
        {
            //Logger.Debug("OnExceptionEvent");
            //Logger.Trace(state);

            OnExceptionEventHandler handler = ExceptionEvent;

            handler?.Invoke(state);
        }
Beispiel #2
0
        public static void Register(OnNewQuestionEventHandler onNewQuestion, OnExceptionEventHandler onException, ExchangeSite site = ExchangeSite.AllSites)
        {
            var poller = new ActiveQuestionsPoller(site);

            poller.OnNewQuestion += onNewQuestion;
            poller.OnException   += onException;
            poller.Connect();
            Pollers.Add(poller);
        }