示例#1
0
        public override void Rehydrate(IDataRehydrator rehydrator, IBlockchainEventsRehydrationFactory rehydrationFactory)
        {
            base.Rehydrate(rehydrator, rehydrationFactory);

            this.supportedChains.Value = rehydrator.ReadByte();
            this.Status = (Statuses)rehydrator.ReadByte();
        }
        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);
                }
            }
        }