/// <summary>
        /// Get supported file info by type. Supports 1 level of inheritance.
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static SupportedFileInfo GetSupportedFileInfo(Type type)
        {
            var info = SupportedFileInfos.FirstOrDefault(x => x.ClassType == type);

            while (info == null)
            {
                info = SupportedFileInfos.FirstOrDefault(x => x.ClassType.BaseType == type);
            }

            return(info);
        }
 public static SupportedFileInfo GetSupportedFileInfo(string extension)
 {
     return(SupportedFileInfos.Single(x => x.Extensions.Contains(extension, StringComparer.InvariantCultureIgnoreCase)));
 }
 public static SupportedFileInfo GetSupportedFileInfo(SupportedFileType type)
 {
     return(SupportedFileInfos.Single(x => x.EnumType == type));
 }