コード例 #1
0
        /// ------------------------------------------------------------------------------------
        public IEnumerable <ComponentRoleStatistics> GetComponentRoleStatisticsPairs()
        {
            foreach (var role in _componentRoles.Where(def => def.MeasurementType == ComponentRole.MeasurementTypes.Time))
            {
                long bytes = GetTotalComponentRoleFileSizes(role);
                var  size  = (bytes == 0 ? "---" : ComponentFile.GetDisplayableFileSize(bytes, false));

                yield return(new ComponentRoleStatistics
                {
                    Name = role.Name,
                    Length = GetRecordingDurations(role).ToString(),
                    Size = size
                });
            }
        }