RestImageResize/OpenWaveRestApiEncoder.cs
/// <summary>
/// Determines whether URL is supported to encode (contains image resizing request).
/// </summary>
/// <param name="uri">The target URI.</param>
/// <returns>
///   <c>true</c> if target URI is supported; otherwise, <c>false</c>
/// </returns>
Determines whether URL is supported to encode (contains image resizing request).
Determines whether URL is supported to encode ( contains image resizing request ) .
public bool IsSupportedUri(Uri uri)
        {
            string fileExtension = (Path.GetExtension(uri.GetFileName()) ?? string.Empty).ToLower();
            if (ValidImageExtensions.Contains(fileExtension))
            {
                var queryString = uri.GetQueryString();
                if (!ImageTransformQuery.FromQueryString(queryString, DefaultImageTransform).IsEmpty)
                {
                    return true;
                }
            }
            return false;
        }
public bool IsSupportedUri ( Uri uri ) { string fileExtension = ( Path . GetExtension ( uri . GetFileName ( ) ) ?? string . Empty ) . ToLower ( ) ; if ( ValidImageExtensions . Contains ( fileExtension ) ) { var queryString = uri . GetQueryString ( ) ; if ( ! ImageTransformQuery . FromQueryString ( queryString , DefaultImageTransform ) . IsEmpty ) { return true ; } } return false ; }
Determines whether URL is supported to encode (contains image resizing request).
Determines whether URL is supported to encode ( contains image resizing request ) .
// if some transformation requested.
None
uri
Uri
The target URI.
The target URI .