protected virtual void RaiseExceptionEvent(StateObject state) { //Logger.Debug("OnExceptionEvent"); //Logger.Trace(state); OnExceptionEventHandler handler = ExceptionEvent; handler?.Invoke(state); }
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); }