public void T13_Struct1_PilePointer() { using (var ms = new MemoryStream()) { var s = new SlimSerializer(); var s1 = new Azos.Pile.PilePointer(10, 231, 223421); s.Serialize(ms, s1); ms.Seek(0, SeekOrigin.Begin); var s2 = (Azos.Pile.PilePointer)s.Deserialize(ms); Azos.Serialization.JSON.JsonWriter.Write(s1).See(); Azos.Serialization.JSON.JsonWriter.Write(s2).See(); Aver.IsTrue(s1 == s2); } }
public void PilePointer() { using (var ms = new MemoryStream()) { var r = SlimFormat.Instance.MakeReadingStreamer(); var w = SlimFormat.Instance.MakeWritingStreamer(); r.BindStream(ms); w.BindStream(ms); var pp = new Azos.Pile.PilePointer(10, 20, 30); w.Write(pp); ms.Seek(0, SeekOrigin.Begin); Aver.AreEqual(pp, r.ReadPilePointer()); } }
public abstract void Write(Azos.Pile.PilePointer value);
public override void Write(Azos.Pile.PilePointer value) { this.Write(value.NodeID); this.Write(value.Segment); this.Write(value.Address); }