Ejemplo n.º 1
0
        public static RescueData Deserialize(RescueDataRaw raw)
        {
            var result = new RescueData();

            result.notes       = raw.notes;
            result.row_headers = raw.row_headers;
            result.rows        = new List <RescueDataEntry>();

            foreach (var list in raw.rows)
            {
                var entry = new RescueDataEntry()
                {
                    Rank             = Int32.Parse(list[0]),
                    TimeSpentSeconds = Int32.Parse(list[1]),
                    NumberOfPeople   = Int32.Parse(list[2]),
                    Activity         = list[3],
                    Category         = list[4],
                    Productivity     = Int32.Parse(list[5]),
                };

                result.rows.Add(entry);
            }

            return(result);
        }
Ejemplo n.º 2
0
        public static RescueData Deserialize(RescueDataRaw raw)
        {
            var result = new RescueData();

            result.notes = raw.notes;
            result.row_headers = raw.row_headers;
            result.rows = new List<RescueDataEntry>();

            foreach (var list in raw.rows)
            {
                var entry = new RescueDataEntry() {
                    Rank = Int32.Parse(list[0]),
                    TimeSpentSeconds = Int32.Parse(list[1]),
                    NumberOfPeople = Int32.Parse(list[2]),
                    Activity = list[3],
                    Category = list[4],
                    Productivity = Int32.Parse(list[5]),
                };

                result.rows.Add(entry);
            }

            return result;
        }