Example #1
0
        /// ------------------------------------------------------------------------------------
        private long GetTotalComponentRoleFileSizes(ComponentRole role)
        {
            long bytes = 0;

            foreach (var info in _backgroundStatisticsGather.GetAllFileData())
            {
                if (role.IsMatch(info.MediaFilePath))
                {
                    bytes += info.LengthInBytes;
                }
            }

            return(bytes);
        }
Example #2
0
 private IEnumerable <MediaFileInfo> GetFilteredFileData(ComponentRole role)
 {
     // SP-2171: i.MediaFilePath will be empty if the file is zero length (see MediaFileInfo.GetInfo()). This happens often with the generated oral annotation file.
     return(_backgroundStatisticsGather.GetAllFileData()
            .Where(i => !string.IsNullOrEmpty(i.MediaFilePath) && !i.MediaFilePath.EndsWith(Settings.Default.OralAnnotationGeneratedFileSuffix) &&
                   role.IsMatch(i.MediaFilePath)));
 }