Sdl.Web.Mvc/Html/BaseMediaHelper.cs
/// <summary>
/// Returns true if format defined by extension is supported.
/// </summary>
/// <param name="extension">File Extension of media file.</param>
/// <returns></returns>
Returns true if format defined by extension is supported.
Returns true if format defined by extension is supported .
public virtual bool IsSupported(string extension)
        {
            if (string.IsNullOrEmpty(extension)) return false;
            switch (extension.TrimStart('.').ToLower())
            {
                case "jpg":
                case "jpeg":
                    return true;
                case "gif":
                    return true;
                case "bmp":
                    return true;
                case "png":
                    return true;
            }
            return false;
        }
public virtual bool IsSupported ( string extension ) { if ( string . IsNullOrEmpty ( extension ) ) return false ; switch ( extension . TrimStart ( ' ' ) . ToLower ( ) ) { case " " : case " " : return true ; case " " : return true ; case " " : return true ; case " " : return true ; } return false ; }
Returns true if format defined by extension is supported.
Returns true if format defined by extension is supported .
None
extension
string
File Extension of media file.
File Extension of media file .