Пример #1
0
        public static Effect ToEffect(this AtomicEffectModel effectModel, AccountWrapper accountWrapper)
        {
            var effect = XdrConverter.Deserialize <Effect>(effectModel.RawEffect);

            effect.AccountWrapper = accountWrapper;
            return(effect);
        }
Пример #2
0
 public void AddEffect(int account, AtomicEffectModel singleEffectModel)
 {
     if (!Effects.TryGetValue(account, out var effects))
     {
         effects = new EffectsModel
         {
             Id      = EffectModelIdConverter.EncodeId(Apex, account),
             Apex    = Apex,
             Account = account,
             Effects = new List <AtomicEffectModel>()
         };
         Effects.Add(account, effects);
     }
     effects.Effects.Add(singleEffectModel);
     EffectsCount++;
 }