コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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());
            }
        }
コード例 #3
0
 public abstract void Write(Azos.Pile.PilePointer value);
コード例 #4
0
 public override void Write(Azos.Pile.PilePointer value)
 {
     this.Write(value.NodeID);
     this.Write(value.Segment);
     this.Write(value.Address);
 }