コード例 #1
0
        public bool FileFormatSupported(string fileExtension)
        {
            if (string.IsNullOrEmpty(fileExtension))
            {
                return(false);
            }

            return(SupportedFormats.Any(f => f.Equals(fileExtension, StringComparison.OrdinalIgnoreCase)));
        }
コード例 #2
0
 /// <summary>
 /// Indicates if a file with the specifies file extension is of this type
 /// </summary>
 /// <param name="fileExtension">The file extension to check</param>
 /// <returns>True if it is of this type, otherwise false</returns>
 public virtual bool IsOfType(FileExtension fileExtension) => SupportedFormats.Any(x => GetFormat(x) == fileExtension);