public TrackingItem(Key key, TrackingItemState state, DifferentialTuple tuple) { if (key == null) { throw new ArgumentNullException("key"); } if (state != TrackingItemState.Deleted && tuple == null) { throw new ArgumentNullException("tuple"); } Key = key; if (tuple != null) { RawData = (DifferentialTuple)tuple.Clone(); } State = state; }
public void DifferentialTest() { TupleDescriptor descriptor = TupleDescriptor.Create(fieldTypes); Xtensive.Tuples.Tuple t1 = Tuple.Create(descriptor); Xtensive.Tuples.Tuple t2 = t1.Clone(); PopulateData(fieldTypes, t2, t1); DifferentialTuple d = new DifferentialTuple(t1); AssertAreSame(t1, d); PopulateData(fieldTypes, t1, d); AssertAreSame(t1, d); DifferentialTuple c = (DifferentialTuple)d.Clone(); AssertAreSame(d, c); d.Reset(); AssertAreSame(t2, d); AssertAreSame(t1, c.ToRegular()); }