public void OnCustomUpdateCallback(object key, object value, EventContext eventContext) { EventCacheItem item = EventUtil.ConvertToItem(eventContext.Item); EventCacheItem oldItem = EventUtil.ConvertToItem(eventContext.OldItem); _listener.OnCustomUpdateCallback((string)key, value, true, item, oldItem, null); }
public void OnItemUpdated(object key, EventContext eventContext) { EventCacheItem oldItem = null; EventCacheItem item = null; try { BitSet flag = new BitSet(0); if (eventContext != null) { if (eventContext.OldItem != null) { oldItem = EventUtil.ConvertToItem(eventContext.OldItem); } if (eventContext.Item != null) { item = EventUtil.ConvertToItem(eventContext.Item); } if (_listener != null) { _listener.OnItemUpdated((string)key, true, item, oldItem, flag); } } } catch { } }
public void OnItemRemoved(object key, object value, ItemRemoveReason reason, BitSet Flag, EventContext eventContext) { EventCacheItem item = null; try { BitSet flag = new BitSet(0); if (eventContext.Item != null) { item = EventUtil.ConvertToItem(eventContext.Item); } if (_listener != null) { _listener.OnItemRemoved((string)key, value, reason, Flag, true, item); } } catch { } }
public void OnCustomRemoveCallback(object key, object value, ItemRemoveReason reason, BitSet Flag, EventContext eventContext) { EventCacheItem item = EventUtil.ConvertToItem(eventContext.Item); CacheItemRemovedReason removeReason = EventUtil.ConvertToCIRemoveReason(reason); _listener.OnCustomRemoveCallback((string)key, value, removeReason, Flag, true, item); }
public void OnItemAdded(object key, EventContext eventContext) { try { BitSet flag = new BitSet(0); EventCacheItem item = EventUtil.ConvertToItem(eventContext.Item); if (_listener != null) { _listener.OnItemAdded((string)key, true, item, flag); } } catch { } }