Пример #1
0
        public static List <CallStat> StatsFromBytes(byte[] data, int pos, int size)
        {
            var results = new List <CallStat>();

            for (int i = pos; i < pos + size; i += 16)
            {
                var stat = new CallStat();
                stat.ID                   = BitConverter.ToInt32(data, i);
                stat.TotalHits            = BitConverter.ToInt32(data, i + 4);
                stat.TotalCallTime        = BitConverter.ToInt32(data, i + 8);
                stat.TotalTimeOutsideDest = BitConverter.ToInt32(data, i + 12);

                results.Add(stat);
            }

            return(results);
        }
Пример #2
0
        public static List<CallStat> StatsFromBytes(byte[] data, int pos, int size)
        {
            var results = new List<CallStat>();

            for (int i = pos; i < pos + size; i += 16)
            {
                var stat = new CallStat();
                stat.ID = BitConverter.ToInt32(data, i);
                stat.TotalHits = BitConverter.ToInt32(data, i + 4);
                stat.TotalCallTime = BitConverter.ToInt32(data, i + 8);
                stat.TotalTimeOutsideDest = BitConverter.ToInt32(data, i + 12);

                results.Add(stat);
            }

            return results;
        }