Ejemplo n.º 1
0
        public void Serialize(GenericWriter writer)
        {
            var version = writer.SetVersion(0);

            switch (version)
            {
            case 0:
            {
                writer.Write(Deleted);
                writer.Write(Owner);
                writer.Write(_Points);

                writer.WriteBlock(w => w.WriteType(_History, t => _History.Serialize(w)));

                writer.WriteBlockList(Subscriptions, (w, b) => w.WriteType(b.Serial, t => b.Serial.Serialize(w)));
            }
            break;
            }
        }
Ejemplo n.º 2
0
        public void Serialize(GenericWriter writer)
        {
            int version = writer.SetVersion(0);

            switch (version)
            {
            case 0:
            {
                writer.Write(Deleted);
                writer.Write(Owner);
                writer.Write(_Points);

                writer.WriteBlock(
                    () => writer.WriteType(
                        _History,
                        t =>
                    {
                        if (t != null)
                        {
                            _History.Serialize(writer);
                        }
                    }));

                writer.WriteBlockList(
                    Subscriptions,
                    b => writer.WriteType(
                        b.Serial,
                        t =>
                    {
                        if (t != null)
                        {
                            b.Serial.Serialize(writer);
                        }
                    }));
            }
            break;
            }
        }