MvcRazorMvcBuilderExtensions.InitializeTagHelper<TTagHelper> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an initialization callback for a given TTagHelper
.
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder InitializeTagHelper<TTagHelper> (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<TTagHelper,Microsoft.AspNetCore.Mvc.Rendering.ViewContext> initialize) where TTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper;
static member InitializeTagHelper : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Action<'agHelper, Microsoft.AspNetCore.Mvc.Rendering.ViewContext (requires 'agHelper :> Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper)> -> Microsoft.Extensions.DependencyInjection.IMvcBuilder (requires 'agHelper :> Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper)
<Extension()>
Public Function InitializeTagHelper(Of TTagHelper As ITagHelper) (builder As IMvcBuilder, initialize As Action(Of TTagHelper, ViewContext)) As IMvcBuilder
Type Parameters
- TTagHelper
The type of ITagHelper being initialized.
Parameters
- builder
- IMvcBuilder
The IMvcBuilder instance this method extends.
- initialize
- Action<TTagHelper,ViewContext>
An action to initialize the TTagHelper
.
Returns
The IMvcBuilder instance this method extends.
Remarks
The callback will be invoked on any TTagHelper
instance before the ProcessAsync(TagHelperContext, TagHelperOutput) method is called.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for