Beispiel #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            UID = new DonationProfileSerial(reader);

            DonationEntries = new List <DonationEntry>();

            switch (version)
            {
            case 0:
            {
                Email          = reader.ReadString();
                TotalDonations = reader.ReadInt();

                int count = reader.ReadInt();

                if (count > 0)
                {
                    for (int i = 0; i < count; i++)
                    {
                        var entry = new DonationEntry(reader);
                        DonationEntries.Add(entry);
                    }
                }
            }
            break;
            }
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            UID = new DonationProfileSerial(reader);

            DonationEntries = new List<DonationEntry>();

            switch (version)
            {
                case 0:
                {
                    Email = reader.ReadString();
                    TotalDonations = reader.ReadInt();

                    int count = reader.ReadInt();

                    if (count > 0)
                    {
                        for (int i = 0; i < count; i++)
                        {
                            var entry = new DonationEntry(reader);
                            DonationEntries.Add(entry);
                        }
                    }
                }
                    break;
            }
        }