// Token: 0x06000CBE RID: 3262 RVA: 0x0002F354 File Offset: 0x0002D554 private void Unsubscribe(string subscriptionId, SubscriptionParameters parameters) { BrokerHandlerReferenceCounter brokerHandlerReferenceCounter = null; lock (this.syncRoot) { if (this.isDisposed) { return; } BrokerHandlerReferenceCounter brokerHandlerReferenceCounter2; if (this.activeHandlers.TryGetValue(subscriptionId, out brokerHandlerReferenceCounter2)) { brokerHandlerReferenceCounter2.Remove(parameters.ChannelId); if (brokerHandlerReferenceCounter2.Count == 0) { this.activeHandlers.Remove(subscriptionId); brokerHandlerReferenceCounter = brokerHandlerReferenceCounter2; } } } if (brokerHandlerReferenceCounter != null) { brokerHandlerReferenceCounter.Dispose(); } }
// Token: 0x06000CB1 RID: 3249 RVA: 0x0002ED8B File Offset: 0x0002CF8B public void UnsubscribeToUnseenCountNotification(string subscriptionId, SubscriptionParameters parameters) { ArgumentValidator.ThrowIfNullOrEmpty("subscriptionId", subscriptionId); ArgumentValidator.ThrowIfNull("parameters", parameters); ArgumentValidator.ThrowIfNull("MailboxId", parameters.MailboxId); this.Unsubscribe(subscriptionId, parameters); }
protected BrokerHandler(string subscriptionId, SubscriptionParameters parameters, IMailboxContext userContext) { this.SubscriptionId = subscriptionId; this.Parameters = parameters; this.UserContext = userContext; this.BrokerSubscriptionId = Guid.NewGuid(); this.nextResubscribeTime = ExDateTime.MinValue; }
// Token: 0x06000CB0 RID: 3248 RVA: 0x0002ECF4 File Offset: 0x0002CEF4 public void SubscribeToUnseenCountNotification(string subscriptionId, SubscriptionParameters parameters, IRecipientSession adSession) { ArgumentValidator.ThrowIfNullOrEmpty("subscriptionId", subscriptionId); ArgumentValidator.ThrowIfNull("parameters", parameters); ArgumentValidator.ThrowIfNull("MailboxId", parameters.MailboxId); ArgumentValidator.ThrowIfNull("adSession", adSession); this.Subscribe(subscriptionId, parameters.ChannelId, () => new UnseenCountBrokerHandler(subscriptionId, parameters, this.userContext, adSession)); }
// Token: 0x06000D5D RID: 3421 RVA: 0x00032494 File Offset: 0x00030694 public ConversationRowNotificationHandler(string subscriptionId, SubscriptionParameters parameters, StoreObjectId folderId, IMailboxContext userContext, Guid mailboxGuid, ExTimeZone timeZone, bool remoteSubscription, IFeaturesManager featuresManager) : base(subscriptionId, parameters, folderId, userContext, mailboxGuid, timeZone, remoteSubscription) { this.conversationViewQuerySubscriptionProperties = ConversationRowNotificationHandler.GetSubscriptionProperties(parameters.ConversationShapeName, featuresManager); SimulatedWebRequestContext.Execute(userContext, "ConversationNotificationDraftFolderId", delegate(MailboxSession mailboxSession, IRecipientSession adSession, RequestDetailsLogger logger) { this.draftFolderId = mailboxSession.GetDefaultFolderId(DefaultFolderType.Drafts); }); }
// Token: 0x06000CB4 RID: 3252 RVA: 0x0002EE60 File Offset: 0x0002D060 public void UnsubscribeForRowNotifications(string subscriptionId, SubscriptionParameters parameters) { lock (this.syncRoot) { if (!this.isDisposed) { this.mapiNotificationManager.UnsubscribeForRowNotifications(subscriptionId, parameters); } } }
// Token: 0x06000CCC RID: 3276 RVA: 0x0002F804 File Offset: 0x0002DA04 public UnseenCountBrokerHandler(string subscriptionId, SubscriptionParameters parameters, IMailboxContext userContext, IRecipientSession adSession) : base(subscriptionId, parameters, userContext) { using (DisposeGuard disposeGuard = this.Guard()) { this.adSession = adSession; this.unseenItemNotifier = new UnseenItemNotifier(subscriptionId, userContext, null, null); this.unseenItemNotifier.RegisterWithPendingRequestNotifier(); disposeGuard.Success(); } }
// Token: 0x06000CAC RID: 3244 RVA: 0x0002EB74 File Offset: 0x0002CD74 public void SubscribeToRowNotification(string subscriptionId, SubscriptionParameters parameters, ExTimeZone timeZone, CallContext callContext, bool remoteSubscription) { lock (this.syncRoot) { if (!this.isDisposed) { this.mapiNotificationManager.SubscribeToRowNotification(subscriptionId, parameters, timeZone, callContext, remoteSubscription); } } }
public void SubscribeToPlayOnPhoneNotification(string subscriptionId, SubscriptionParameters parameters) { if (this.popHandler == null) { this.popHandler = new PlayOnPhoneNotificationHandler(this.userContext); } string callId = parameters.CallId; this.popHandler.Subscribe(subscriptionId, callId); }
// Token: 0x06000CFD RID: 3325 RVA: 0x000306DC File Offset: 0x0002E8DC protected RowNotificationHandler(string subscriptionId, SubscriptionParameters parameters, StoreObjectId folderId, IMailboxContext userContext, Guid mailboxGuid, RowNotifier notifier, bool remoteSubscription) : base(subscriptionId, userContext, remoteSubscription) { this.mailboxGuid = mailboxGuid; this.notifier = notifier; this.notifier.RegisterWithPendingRequestNotifier(); this.SetSubscriptionParameter(parameters); this.folderId = folderId; this.originalFolderId = folderId; this.originalFolderIdAsString = parameters.FolderId; }
// Token: 0x06000CAE RID: 3246 RVA: 0x0002EC1C File Offset: 0x0002CE1C public void SubscribeToNewMailNotification(string subscriptionId, SubscriptionParameters parameters) { lock (this.syncRoot) { if (!this.isDisposed) { this.mapiNotificationManager.SubscribeToNewMailNotification(subscriptionId, parameters); } } }
// Token: 0x06000CC5 RID: 3269 RVA: 0x0002F53C File Offset: 0x0002D73C public RowBrokerHandler(string subscriptionId, SubscriptionParameters parameters, ExTimeZone timeZone, IMailboxContext userContext) : base(subscriptionId, parameters, userContext) { using (DisposeGuard disposeGuard = this.Guard()) { this.rowNotifier = new RowNotifier(subscriptionId, userContext, userContext.ExchangePrincipal.MailboxInfo.MailboxGuid); this.rowNotifier.RegisterWithPendingRequestNotifier(); this.folderId = StoreId.EwsIdToFolderStoreObjectId(parameters.FolderId); this.timeZone = timeZone; disposeGuard.Success(); } }
// Token: 0x06000E8A RID: 3722 RVA: 0x000374C8 File Offset: 0x000356C8 public void UnsubscribeForRowNotifications(string subscriptionId, SubscriptionParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } ExTraceGlobals.NotificationsCallTracer.TraceDebug <string, string>((long)this.GetHashCode(), "[OwaMapiNotificationManager::UnsubscribeForRowNotifications] SubscriptionId: {0} ChannelId: {1}", subscriptionId, parameters.ChannelId); lock (this.syncRoot) { if (!this.isDisposed) { this.rowNotificationHandlerCache.ReleaseHandler(subscriptionId, parameters.ChannelId); } } }
// Token: 0x06000E84 RID: 3716 RVA: 0x00037244 File Offset: 0x00035444 public void SubscribeToNewMailNotification(string subscriptionId, SubscriptionParameters parameters) { lock (this.syncRoot) { if (!this.isDisposed) { if (this.newMailHandlerLoggedUser == null) { this.newMailHandlerLoggedUser = NewMailNotificationHandlerFactory.Create(subscriptionId, this.userContext, parameters); this.notificationHandlers.Add(this.newMailHandlerLoggedUser); this.WireConnectionDroppedHandler(this.newMailHandlerLoggedUser); } this.newMailHandlerLoggedUser.Subscribe(); } } }
// Token: 0x06000D10 RID: 3344 RVA: 0x000307C8 File Offset: 0x0002E9C8 private void SetSubscriptionParameter(SubscriptionParameters parameters) { this.SubscriptionParameters = parameters; if (parameters.SortBy != null) { this.sortBy = SortResults.ToXsoSortBy(parameters.SortBy); } if (parameters.Filter != ViewFilter.All) { this.viewFilter = parameters.Filter; } if (parameters.ClutterFilter != ClutterFilter.All) { this.clutterFilter = parameters.ClutterFilter; } if (!string.IsNullOrEmpty(parameters.FromFilter)) { this.fromFilter = parameters.FromFilter; } }
public static NewMailNotificationHandler Create(string subscriptionId, IMailboxContext userContext, SubscriptionParameters parameters) { if (parameters.InferenceEnabled) { return(new InferenceNewMailNotificationHandler(subscriptionId, userContext)); } return(new NewMailNotificationHandler(subscriptionId, userContext)); }
// Token: 0x06000D24 RID: 3364 RVA: 0x0003125C File Offset: 0x0002F45C public CalendarItemNotificationHandler(string subscriptionId, SubscriptionParameters parameters, StoreObjectId folderId, IMailboxContext userContext, Guid mailboxGuid, ExTimeZone timeZone, bool remoteSubscription) : base(subscriptionId, parameters, folderId, userContext, mailboxGuid, timeZone, remoteSubscription) { }
// Token: 0x06000EFE RID: 3838 RVA: 0x0003A5FC File Offset: 0x000387FC protected PeopleIKnowRowNotificationHandler(string subscriptionId, SubscriptionParameters parameters, StoreObjectId folderId, UserContext userContext, Guid mailboxGuid, RowNotifier notifier) : base(subscriptionId, parameters, folderId, userContext, mailboxGuid, notifier, false) { }
// Token: 0x06000EFD RID: 3837 RVA: 0x0003A5C8 File Offset: 0x000387C8 public PeopleIKnowRowNotificationHandler(string subscriptionId, SubscriptionParameters parameters, StoreObjectId folderId, IMailboxContext userContext, Guid mailboxGuid, ExTimeZone timeZone, CultureInfo cultureInfo) : base(subscriptionId, parameters, folderId, userContext, mailboxGuid, timeZone, false) { this.cultureInfo = cultureInfo; OwsLogRegistry.Register("PeopleIKnowRowNotification", typeof(FindPeopleMetadata), new Type[0]); }
public NewMailBrokerHandler(string subscriptionId, SubscriptionParameters parameters, IMailboxContext userContext) : base(subscriptionId, parameters, userContext) { this.newMailNotifier = new NewMailNotifier(subscriptionId, userContext); this.newMailNotifier.RegisterWithPendingRequestNotifier(); }
protected MessageItemRowNotificationHandler(string subscriptionId, SubscriptionParameters parameters, StoreObjectId folderId, IMailboxContext userContext, Guid mailboxGuid, RowNotifier notifier, IFeaturesManager featuresManager = null) : base(subscriptionId, parameters, folderId, userContext, mailboxGuid, notifier, false) { this.mailboxId = new MailboxId(mailboxGuid); this.subscriptionProperties = MessageItemRowNotificationHandler.GetSubscriptionProperties(featuresManager); }
// Token: 0x06000E82 RID: 3714 RVA: 0x00036E28 File Offset: 0x00035028 public void SubscribeToRowNotification(string subscriptionId, SubscriptionParameters parameters, ExTimeZone timeZone, CallContext callContext, bool remoteSubscription) { if (parameters == null) { throw new ArgumentNullException("parameters"); } if (parameters.FolderId == null) { throw new OwaInvalidOperationException("Folder Id must be specified when subscribing to row notifications"); } if (subscriptionId == null) { throw new ArgumentNullException("subscriptionId"); } if (timeZone == null) { throw new ArgumentNullException("timeZone"); } lock (this.syncRoot) { if (!this.isDisposed) { ExTraceGlobals.NotificationsCallTracer.TraceDebug <UserContextKey, string, string>((long)this.GetHashCode(), "[OwaMapiNotificationManager::SubscribeToRowNotification] START userContextKey: {0} SubscriptionId: {1} ChannelId: {2}", this.userContext.Key, subscriptionId, parameters.ChannelId); RowNotificationHandler rowNotificationHandler = null; this.rowNotificationHandlerCache.TryGetHandler(subscriptionId, out rowNotificationHandler); if (rowNotificationHandler == null) { StoreObjectId storeObjectId = StoreId.EwsIdToStoreObjectId(parameters.FolderId); if (storeObjectId == null) { throw new OwaInvalidOperationException("Invalid Folder Id. Could not be converted to a storeFolderId"); } if (parameters.NotificationType == NotificationType.CalendarItemNotification) { rowNotificationHandler = new CalendarItemNotificationHandler(subscriptionId, parameters, storeObjectId, this.userContext, this.userContext.ExchangePrincipal.MailboxInfo.MailboxGuid, timeZone, remoteSubscription); } else if (parameters.NotificationType == NotificationType.PeopleIKnowNotification) { rowNotificationHandler = new PeopleIKnowRowNotificationHandler(subscriptionId, parameters, storeObjectId, this.userContext, this.userContext.ExchangePrincipal.MailboxInfo.MailboxGuid, timeZone, callContext.ClientCulture); } else if (parameters.IsConversation) { UserContext fullUserContext = this.GetFullUserContext("Conversation row notification"); rowNotificationHandler = new ConversationRowNotificationHandler(subscriptionId, parameters, storeObjectId, this.userContext, this.userContext.ExchangePrincipal.MailboxInfo.MailboxGuid, timeZone, remoteSubscription, fullUserContext.FeaturesManager); } else { UserContext fullUserContext2 = this.GetFullUserContext("MessageItem row notification"); rowNotificationHandler = new MessageItemRowNotificationHandler(subscriptionId, parameters, storeObjectId, this.userContext, this.userContext.ExchangePrincipal.MailboxInfo.MailboxGuid, timeZone, fullUserContext2.FeaturesManager); } try { ExTraceGlobals.NotificationsCallTracer.TraceDebug <UserContextKey, string, string>((long)this.GetHashCode(), "[OwaMapiNotificationManager::SubscribeToRowNotification] userContextKey: {0} New subscription for subscriptionId: {1} ChannelId: {2}", this.userContext.Key, subscriptionId, parameters.ChannelId); this.WireConnectionDroppedHandler(rowNotificationHandler); rowNotificationHandler.Subscribe(); rowNotificationHandler.OnBeforeDisposed += this.BeforeDisposeRowNotificationHandler; this.rowNotificationHandlerCache.AddHandler(subscriptionId, rowNotificationHandler, parameters.ChannelId); rowNotificationHandler = null; goto IL_319; } finally { if (rowNotificationHandler != null) { try { this.userContext.LockAndReconnectMailboxSession(3000); rowNotificationHandler.Dispose(); rowNotificationHandler = null; } catch (OwaLockTimeoutException ex) { ExTraceGlobals.NotificationsCallTracer.TraceError <string>((long)this.GetHashCode(), "[OwaMapiNotificationManager::SubscribeToRowNotification] User context lock timed out in attempt to dispose handler. Exception: {0}", ex.Message); } finally { if (this.userContext.MailboxSessionLockedByCurrentThread()) { this.userContext.UnlockAndDisconnectMailboxSession(); } } } } } ExTraceGlobals.NotificationsCallTracer.TraceDebug((long)this.GetHashCode(), "[OwaMapiNotificationManager::SubscribeToRowNotification] userContextKey: {0} Reusing existing notification handler subscriptionId: {1} ChannelId: {2} Current RefCount: {3}. Setting MissedNotifications = false", new object[] { this.userContext.Key, subscriptionId, parameters.ChannelId, rowNotificationHandler.RefCount }); rowNotificationHandler.MissedNotifications = false; if (rowNotificationHandler.NeedToReinitSubscriptions) { ExTraceGlobals.NotificationsCallTracer.TraceDebug((long)this.GetHashCode(), "[OwaMapiNotificationManager::SubscribeToRowNotification] userContextKey: {0} Need to re-init subscriptionId: {1} ChannelId: {2} Refcount: {3}", new object[] { this.userContext.Key, subscriptionId, parameters.ChannelId, rowNotificationHandler.RefCount }); rowNotificationHandler.Subscribe(); } this.rowNotificationHandlerCache.AddHandler(subscriptionId, rowNotificationHandler, parameters.ChannelId); } IL_319 :; } }
// Token: 0x06000CFC RID: 3324 RVA: 0x000306AC File Offset: 0x0002E8AC public RowNotificationHandler(string subscriptionId, SubscriptionParameters parameters, StoreObjectId folderId, IMailboxContext userContext, Guid mailboxGuid, ExTimeZone timeZone, bool remoteSubscription) : this(subscriptionId, parameters, folderId, userContext, mailboxGuid, new RowNotifier(subscriptionId, userContext, mailboxGuid), remoteSubscription) { this.timeZone = timeZone; }
// Token: 0x06000E87 RID: 3719 RVA: 0x000373B0 File Offset: 0x000355B0 public void UnsubscribeToUnseenCountNotification(string subscriptionId, SubscriptionParameters parameters) { throw new NotSupportedException("UnSubscribeToUnseenCountNotification is only supported through Broker not in OwaMapiNotificationManager."); }
// Token: 0x06000E86 RID: 3718 RVA: 0x000373A4 File Offset: 0x000355A4 public void SubscribeToUnseenCountNotification(string subscriptionId, SubscriptionParameters parameters, IRecipientSession adSession) { throw new NotSupportedException("SubscribeToUnseenCountNotification is only supported through Broker not in OwaMapiNotificationManager."); }
// Token: 0x06000D25 RID: 3365 RVA: 0x000313E0 File Offset: 0x0002F5E0 protected CalendarItemNotificationHandler(string subscriptionId, SubscriptionParameters parameters, StoreObjectId folderId, IMailboxContext userContext, Guid mailboxGuid, RowNotifier notifier, bool remoteSubscription) : base(subscriptionId, parameters, folderId, userContext, mailboxGuid, notifier, remoteSubscription) { }