public bool FileFormatSupported(string fileExtension) { if (string.IsNullOrEmpty(fileExtension)) { return(false); } return(SupportedFormats.Any(f => f.Equals(fileExtension, StringComparison.OrdinalIgnoreCase))); }
/// <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);