Exemple #1
0
        private int GetMegabytes(SessionComponentDefinition definition)
        {
            long bytes = 0;

            foreach (FileStatistics stat in _backgroundStatisticsGather.GetAllStatistics())
            {
                if (definition.MatchFilter(stat.Path))
                {
                    bytes += stat.LengthInBytes;
                }
            }
            return((int)((float)bytes / (float)(1024 * 1024)));
        }
Exemple #2
0
        public TimeSpan GetRecordingDurations(SessionComponentDefinition definition)
        {
            var total = new TimeSpan(0);

            foreach (FileStatistics stat in _backgroundStatisticsGather.GetAllStatistics())
            {
                if (definition.MatchFilter(stat.Path))
                {
                    total += stat.Duration;
                }
            }

            return(total);
        }