/// <summary>
 /// Dispatches all the edits in the snapshot to the appropriate <paramref name="visitor"/> methods.
 /// </summary>
 /// <param name="visitor">The visitor to dispatch to.</param>
 /// <remarks>
 /// There will be at most one edit per key/value store entry sharing the same key. The order of the edits in a snapshot is
 /// undefined and does not reflect the order in which edits took place. Snapshots reconcile edits to the same entries by
 /// only retaining the last edit for each key.
 /// </remarks>
 public void Accept(ISnapshotVisitor <TKey, TValue> visitor)
 {
     foreach (var edit in _edits)
     {
         edit.Accept(visitor);
     }
 }
示例#2
0
 /// <summary>
 /// Dispatches to the <see cref="ISnapshotVisitor{TKey, TValue}.Delete(TKey)"/> method on the <paramref name="visitor"/>.
 /// </summary>
 /// <param name="visitor">The visitor to dispatch to.</param>
 public override void Accept(ISnapshotVisitor <TKey, TValue> visitor) => visitor.Delete(_key);
示例#3
0
 /// <summary>
 /// Dispatches to the <see cref="ISnapshotVisitor{TKey, TValue}.AddOrUpdate(TKey, TValue)"/> method on the <paramref name="visitor"/>.
 /// </summary>
 /// <param name="visitor">The visitor to dispatch to.</param>
 public override void Accept(ISnapshotVisitor <TKey, TValue> visitor) => visitor.AddOrUpdate(_key, _value);
示例#4
0
 /// <summary>
 /// Dispatches to the <paramref name="visitor"/> method corresponding to the edit type.
 /// </summary>
 /// <param name="visitor">The visitor to dispatch to.</param>
 public abstract void Accept(ISnapshotVisitor <TKey, TValue> visitor);
 public override IReadOnlyList <ISendable <ITransmittable> > Accept(ISnapshotVisitor <IReadOnlyList <ISendable <ITransmittable> > > visitor) => visitor.Visit(this);
示例#6
0
 public abstract IReadOnlyList <ISendable <ITransmittable> > Accept(ISnapshotVisitor <IReadOnlyList <ISendable <ITransmittable> > > visitor);
示例#7
0
 public SendableFactory(ILogger logger, ISnapshotVisitor <IReadOnlyList <ISendable <ITransmittable> > > snapshotVisitor)
 {
     _logger          = logger;
     _snapshotVisitor = snapshotVisitor;
 }