/// <summary> /// Creates events subscription for mailbox. /// </summary> /// <param name="mailbox">Mailbox unique identifier.</param> protected void StartSubscription(Mailbox mailbox) { try { if (ListenerManager.GetIsServiceAvaliable()) { ListenerManager.RecreateListener(mailbox.Id); } } catch (Exception e) { _log.ErrorFormat("Events listener subscription for {0} mailbox create failed.", e, mailbox.Id); } }
/// <summary> /// Checks that exchange listeners service avaliable. /// </summary> /// <returns><c>True</c> if exchange listeners service avaliable. Otherwise returns <c>false</c>.</returns> protected bool GetIsListenerServiceAvaliable() { return(ListenerManager.GetIsServiceAvaliable()); }