Ответ 1
System.Runtime.Extensions определяет как UrlDecode
, так и HtmlDecode
.
namespace System.Net
{
public static partial class WebUtility
{
public static string HtmlDecode(string value) { return default(string); }
public static string HtmlEncode(string value) { return default(string); }
public static string UrlDecode(string encodedValue) { return default(string); }
public static byte[] UrlDecodeToBytes(byte[] encodedValue, int offset, int count) { return default(byte[]); }
public static string UrlEncode(string value) { return default(string); }
public static byte[] UrlEncodeToBytes(byte[] value, int offset, int count) { return default(byte[]); }
}
}
Обновление
Пока System.Runtime.Extensions
определяет расширение, так как вы можете заметить из него код, то фактический класс, который вам нужно вызвать, это System.Net.WebUtility
System.Net.WebUtility.HtmlEncode(myString)
System.Net.WebUtility.HtmlDecode(myString)
В настоящее время нет публично запланированных планов включения Decode
в Microsoft.Framework.WebEncoders
.