/// <summary> /// スナップの追加 /// </summary> public void AddSnap(int priority, BaseSnap snap, Action callback = null) { PrioritySnap pSnap = new PrioritySnap(priority, snap); snaps.Add(pSnap); if (callback != null) { callbackDic.Add(pSnap, callback); } }
/// <summary> /// スナップの追加 /// </summary> public void AddSnap(int precedence, BaseSnap snap, Action callback = null) { PrecedenceSnap pre = new PrecedenceSnap(precedence, snap); snaps.Add(pre); if (callback != null) { callbackDic.Add(pre, callback); } }
/// <summary> /// スナップの追加 /// </summary> public void AddSnap(int priority, BaseSnap snap, Action callback = null) { PrioritySnap pSnap = new PrioritySnap(priority, snap); snaps.Add(pSnap); addSnaps.Add(pSnap); if (callback != null) { addSnapCallbackDic.Add(pSnap, callback); } //表示 if (show) { Show(); } }
public void Load(string streamId) { try { var snap = EventStore .Advanced .GetSnapshot(streamId, int.MaxValue); if (snap == null || snap.Payload == null) { return; } var items = snap.Payload as List <object>; switch (items) { case null: return; default: items.AsParallel().ForAll(p => { var item = p as TrackedTag; var result = new BaseSnap { Id = item.Id, Version = item.Version }; snapshotContentDictionary.TryAdd(result.Id, result); }); return; } } catch (Exception e) { throw e; } }
public PrioritySnap(int priority, BaseSnap snap) { this.priority = priority; this.snap = snap; }
public PrecedenceSnap(int precedence, BaseSnap snap) { this.precedence = precedence; this.snap = snap; }