Ejemplo n.º 1
0
 public Auditor(AuditorSave save)
 {
     this.Id          = save.id;
     this.GeneratorId = save.generatorId;
     //this.Count = save.count;
     this.Interval     = 10.0f; //save.interval;
     this.State        = save.state;
     this.timer        = save.timer;
     this.totalTimer   = save.totalTimer;
     this.WorkInterval = save.workInterval;
     this.WorkTimer    = save.workTimer;
     //if(save.adSave != null ) {
     //    adInfo.Load(save.adSave);
     //}
 }
Ejemplo n.º 2
0
        public override object GetSave()
        {
            Dictionary <int, Dictionary <string, AuditorSave> > auditorSaves = new Dictionary <int, Dictionary <string, AuditorSave> >();

            foreach (var kvp in Auditors)
            {
                if (kvp.Value.Count > 0)
                {
                    Dictionary <string, AuditorSave> generatorAuditors = new Dictionary <string, AuditorSave>();
                    foreach (var kvp2 in kvp.Value)
                    {
                        AuditorSave saveObj = kvp2.Value.GetSave();
                        generatorAuditors.Add(saveObj.id, saveObj);
                    }
                    auditorSaves.Add(kvp.Key, generatorAuditors);
                }
            }
            return(new AuditorServiceSave {
                auditors = auditorSaves,
                speedMults = SpeedMults.ToDictionary(kvp => kvp.Key, kvp => kvp.Value)
            });
        }