Exemple #1
0
 public bool Set(IList <IStatus> t)
 {
     Data = ZeroFormatterSerializer.Serialize(
         new StatusListCore()
     {
         list =
             (IList <FormattableStatus>)t.Select(ele => { var res = new FormattableStatus(); res.Set(ele); return(res); }).ToList()
     }
         );
     DataType = "not used";
     //Type template = typeof(List<>);
     //Type type=template.MakeGenericType(TypeUtils.StringToType(DataType));
     //Type type=t.GetType().GetGenericArguments().First();
     //DataType=TypeUtils.TypeToSTring(type);
     return(true);
 }
Exemple #2
0
        public bool Set(IStatusHolder t)
        {
            FormattableModifierList formmatable = new FormattableModifierList();

            formmatable.Set(t.permanentModifierList.ToList());
            var core = new StatusHolderCore {
                statusList = t.statusDictionary.Select(ele =>
                {
                    FormattableStatus status = new FormattableStatus();
                    status.Set(ele.Value);
                    return(status);
                }).ToList(),
                modifierList = formmatable
                               //.ToDictionary(ele=>ele.Item1,ele=>ele.status)
            };

            Data     = ZeroFormatterSerializer.Serialize(core);
            DataType = TypeUtils.TypeToString(t.GetType());
            return(true);
        }