public void OnStorageUpdate(string server, int deviceChannel, StorageNotificationType type) { _isStorageUpdated = true; _storageUpdate = new CallbackObjects.StorageUpdate { DeviceChannel = deviceChannel, NotificationType = type, ServerName = server }; }
void NotifyListeners(StorageNotificationType notificationType, IDictionary <StorageNotificationType, List <Action <ItemSnapshot> > > notification, ItemSnapshot itemSnapshot) { if (notification.ContainsKey(notificationType)) { var events = notification[notificationType]; foreach (var evt in events) { evt.Invoke(itemSnapshot); } if (notificationType == StorageNotificationType.ONCE) { notification[notificationType].Clear(); } } }