Esempio n. 1
0
        public static bool IsSupportedFileFormat(this IHasSupportedFileFormats obj, string filePath)
        {
            string ext = PathUtilities.GetFileExtension(filePath).ToLowerInvariant();

            if (string.IsNullOrWhiteSpace(ext))
            {
                return(false);
            }

            return(obj.IsSupportedFileFormat(FileFormatFactory.Default.FromFileExtension(ext)));
        }
Esempio n. 2
0
 public static bool IsSupportedFileFormat(this IHasSupportedFileFormats obj, IFileFormat fileFormat)
 {
     return(obj.GetSupportedFileFormats().Any(supportedFileFormat => supportedFileFormat.Equals(fileFormat)));
 }