private void HandleItemListener(IData itemData, String uuid, ItemEventType eventType, IItemListener <E> listener, bool includeValue) { var item = includeValue ? ToObject <E>(itemData) : default(E); var member = GetContext().GetClusterService().GetMember(uuid); var itemEvent = new ItemEvent <E>(GetName(), eventType, item, member); if (eventType == ItemEventType.Added) { listener.ItemAdded(itemEvent); } else { listener.ItemRemoved(itemEvent); } }
protected void HandleItemListener(IData itemData, Guid uuid, ItemEventType eventType, IItemListener <T> listener, bool includeValue) { var item = includeValue ? ToObject <T>(itemData) : default(T); var member = Client.ClusterService.GetMember(uuid); var itemEvent = new ItemEvent <T>(Name, eventType, item, member); if (eventType == ItemEventType.Added) { listener.ItemAdded(itemEvent); } else { listener.ItemRemoved(itemEvent); } }