private void SendObjectSubscriptionNotifications(ObjectSubscription subscription) { CheckLocked(); RefreshSubscriptions(); SendJoinedSubscriptionNotifications(subscription); SendCreatedNotifications(subscription); SendUpdatedNotifications(subscription); SendJoinedAndUnjoinedNotifications(subscription); SendActivatedNotifications(subscription); SendDeactivatedNotifications(subscription); SendUnjoinedSubscriptionNotifications(subscription); subscription.PreviousObjects = subscription.Objects; subscription.Objects = new Dictionary <Guid, MockObject>(); if (subscription.Root?.IsDeleted ?? false && subscription.EndIfRootDeleted) { subscription.Callbacks.SubscriptionEnded?.Invoke(subscription.Uuid, $"Object Deleted: {subscription.Root.Uri(subscription.Version)}"); ObjectSubscriptionsByRequestUuid.Remove(subscription.Uuid); } subscription.LastNotificationTime = StoreLastWrite; subscription.SendHistoricalChanges = false; // Only send historical changes the first time. }
private void RefreshObjectSubscription(ObjectSubscription subscription) { var @objects = GetObjects(subscription.Version, subscription.SubscriptionInfo.Context); RefreshSubscriptionObjects(subscription, objects); }