TunnelVisionLabs.Net.UriTemplate/UriTemplatePart.cs
/// <summary>
/// Determines if an ASCII character matches the <c>unreserved</c> pattern defined
/// in RFC 6570.
/// </summary>
/// <param name="b">The ASCII character to test.</param>
/// <returns><see langword="true"/> if <paramref name="b"/> is an <c>unreserved</c> character; otherwise, <see langword="false"/>.</returns>
Determines if an ASCII character matches the unreserved
Determines if an ASCII character matches the unreserved
protected static bool IsUnreserved(byte b)
        {
            if (b >= 'a' && b <= 'z')
                return true;
            if (b >= 'A' && b <= 'Z')
                return true;
            if (b >= '0' && b <= '9')
                return true;
            switch ((char)b)
            {
            case '-':
            case '.':
            case '_':
            case '~':
                return true;
            default:
                return false;
            }
        }
protected static bool IsUnreserved ( byte b ) { if ( b >= ' ' && b <= ' ' ) return true ; if ( b >= ' ' && b <= ' ' ) return true ; if ( b >= ' ' && b <= ' ' ) return true ; switch ( ( char ) b ) { case ' ' : case ' ' : case ' ' : case ' ' : return true ; default : return false ; } }
Determines if an ASCII character matches the unreserved
Determines if an ASCII character matches the unreserved
if  is an unreserved.
if is an unreserved .
b
byte
The ASCII character to test.
The ASCII character to test .