UrlResolutionTagHelper Класс

Определение

ITagHelper реализация, предназначенная для элементов, содержащих атрибуты с ожидаемыми значениями URL-адреса.

public ref class UrlResolutionTagHelper : Microsoft::AspNetCore::Razor::TagHelpers::TagHelper
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("*", Attributes="[itemid^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="[href^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("applet", Attributes="[archive^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("area", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("audio", Attributes="[src^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("base", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("blockquote", Attributes="[cite^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("button", Attributes="[formaction^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("del", Attributes="[cite^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("embed", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("form", Attributes="[action^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("html", Attributes="[manifest^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("iframe", Attributes="[src^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("img", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("img", Attributes="[srcset^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("input", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("input", Attributes="[formaction^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("ins", Attributes="[cite^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("link", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("menuitem", Attributes="[icon^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("object", Attributes="[archive^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("object", Attributes="[data^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("q", Attributes="[cite^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("script", Attributes="[src^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("source", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("source", Attributes="[srcset^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("track", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("video", Attributes="[src^='~/']")]
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("video", Attributes="[poster^='~/']")]
public class UrlResolutionTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("*", Attributes="[itemid^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("a", Attributes="[href^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("applet", Attributes="[archive^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("area", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("audio", Attributes="[src^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("base", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("blockquote", Attributes="[cite^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("button", Attributes="[formaction^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("del", Attributes="[cite^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("embed", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("form", Attributes="[action^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("html", Attributes="[manifest^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("iframe", Attributes="[src^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("img", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("img", Attributes="[srcset^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("input", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("input", Attributes="[formaction^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("ins", Attributes="[cite^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("link", Attributes="[href^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("menuitem", Attributes="[icon^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("object", Attributes="[archive^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("object", Attributes="[data^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("q", Attributes="[cite^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("script", Attributes="[src^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("source", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("source", Attributes="[srcset^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("track", Attributes="[src^='~/']", TagStructure=Microsoft.AspNetCore.Razor.TagHelpers.TagStructure.WithoutEndTag)>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("video", Attributes="[src^='~/']")>]
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("video", Attributes="[poster^='~/']")>]
type UrlResolutionTagHelper = class
    inherit TagHelper
Public Class UrlResolutionTagHelper
Inherits TagHelper
Наследование
UrlResolutionTagHelper
Производный
Атрибуты

Комментарии

Разрешает URL-адреса, начинающиеся с "~/" (относительно параметра "webroot" приложения), которые не предназначены для других ITagHelper. Выполняется раньше других ITagHelper, чтобы убедиться, что URL-адреса, связанные с приложением, разрешены.

Конструкторы

UrlResolutionTagHelper(IUrlHelperFactory, HtmlEncoder)

Создает новый экземпляр UrlResolutionTagHelper.

Свойства

HtmlEncoder

HtmlEncoder.

Order

При выполнении ITagHelperInit(TagHelperContext)набора объектов их сначала вызываются в указанном Orderобъекте ; затем их ProcessAsync(TagHelperContext, TagHelperOutput)вызываются в указанном Order. В первую очередь выполняются более низкие значения.

UrlHelperFactory

IUrlHelperFactory.

ViewContext

ViewContext.

Методы

Init(TagHelperContext)

Инициализирует ITagHelper с заданным context. В этом методе необходимо выполнить дополнения, Items чтобы убедиться, что они добавлены перед выполнением дочерних элементов.

(Унаследовано от TagHelper)
Process(TagHelperContext, TagHelperOutput)

Синхронно выполняет TagHelper с заданными context и output.

ProcessAsync(TagHelperContext, TagHelperOutput)

Асинхронно выполняет TagHelper с заданными context и output.

(Унаследовано от TagHelper)
ProcessUrlAttribute(String, TagHelperOutput)

Разрешает и обновляет значения URL-адресов, начиная с "~/" (относительно параметра "webroot" приложения) для output"s", Attributes для которых Name имеет значение attributeName.

TryResolveUrl(String, IHtmlContent)

Пытается разрешить заданное url значение относительно параметра "webroot" приложения.

TryResolveUrl(String, String)

Пытается разрешить заданное url значение относительно параметра "webroot" приложения.

Применяется к