Microsoft.AspNetCore.WebUtilities项目提供助手类(QueryHelper、Base64UrlTextEncoder)
程序集:Microsoft.AspNetCore.WebUtilities
命名空间:Microsoft.AspNetCore.WebUtilities
QueryHelpers:
public static class QueryHelpers { // // 摘要: // /// Append the given query keys and values to the uri. /// // // 参数: // uri: // The base uri. // // queryString: // A collection of name value query pairs to append. // // 返回结果: // The combined result. public static string AddQueryString(string uri, IDictionary<string, string> queryString) { throw null; } // // 摘要: // /// Append the given query key and value to the URI. /// // // 参数: // uri: // The base URI. // // name: // The name of the query key. // // value: // The query value. // // 返回结果: // The combined result. public static string AddQueryString(string uri, string name, string value) { throw null; } // // 摘要: // /// Parse a query string into its component key and value parts. /// // // 参数: // queryString: // The raw query string value, with or without the leading '?'. // // 返回结果: // A collection of parsed keys and values, null if there are no entries. public static Dictionary<string, StringValues> ParseNullableQuery(string queryString) { throw null; } // // 摘要: // /// Parse a query string into its component key and value parts. /// // // 参数: // queryString: // The raw query string value, with or without the leading '?'. // // 返回结果: // A collection of parsed keys and values. public static Dictionary<string, StringValues> ParseQuery(string queryString) { throw null; } }
Base64UrlTextEncoder:
public static class Base64UrlTextEncoder { // // 摘要: // /// Decodes supplied string by replacing the non-URL encodable characters with // URL encodable characters and /// then decodes the Base64 string. /// // // 参数: // text: // The string to be decoded. // // 返回结果: // The decoded data. public static byte[] Decode(string text) { throw null; } // // 摘要: // /// Encodes supplied data into Base64 and replaces any URL encodable characters // into non-URL encodable /// characters. /// // // 参数: // data: // Data to be encoded. // // 返回结果: // Base64 encoded string modified with non-URL encodable characters public static string Encode(byte[] data) { throw null; } }