public override void Rehydrate(IDataRehydrator rehydrator)
        {
            base.Rehydrate(rehydrator);

            this.Balance.Rehydrate(rehydrator);

            this.AccountFreezes.Clear();
            bool any = rehydrator.ReadBool();

            if (any)
            {
                int count = rehydrator.ReadByte();

                for (int i = 0; i < count; i++)
                {
                    INeuraliumAccountFreeze freeze = new NeuraliumAccountFreeze();

                    freeze.FreezeId = rehydrator.ReadInt();
                    Amount amount = new Amount();
                    amount.Rehydrate(rehydrator);
                    freeze.Amount = amount.Value;

                    this.AccountFreezes.Add(freeze);
                }
            }
        }
예제 #2
0
        protected override void RehydrateHeader(IDataRehydrator rehydrator)
        {
            base.RehydrateHeader(rehydrator);

            this.AcceptSAFUTermsOfService = rehydrator.ReadBool();
            this.Total.Rehydrate(rehydrator);
            this.DailyProtection.Rehydrate(rehydrator);
            this.Start = rehydrator.ReadNullableDateTime();
        }
예제 #3
0
        public void Rehydrate(IDataRehydrator rehydrator, IElectionContextRehydrationFactory electionContextRehydrationFactory)
        {
            this.Bounty.Rehydrate(rehydrator);
            this.MaintenanceServiceFeesEnabled = rehydrator.ReadBool();
            this.MaintenanceServiceFees        = rehydrator.ReadRehydratable <SimplePercentage>();

            this.BountyAllocationMethod          = BountyAllocationMethodRehydrator.Rehydrate(rehydrator);
            this.TransactionTipsAllocationMethod = TransactionTipsAllocationMethodRehydrator.Rehydrate(rehydrator);
        }