DefaultViewComponentHelper Class¶
Default implementation for Microsoft.AspNetCore.Mvc.IViewComponentHelper.
- Namespace
Microsoft.AspNetCore.Mvc.ViewComponents- Assemblies
- Microsoft.AspNetCore.Mvc.ViewFeatures
Syntax¶
public class DefaultViewComponentHelper : IViewComponentHelper, IViewContextAware
-
class
Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper
Constructors¶
-
DefaultViewComponentHelper(Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorCollectionProvider, System.Text.Encodings.Web.HtmlEncoder, Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentSelector, Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentInvokerFactory, Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.IViewBufferScope)¶ Initializes a new instance of
Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.Arguments: - descriptorProvider (Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorCollectionProvider) – The
Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorCollectionProviderused to locate view components. - htmlEncoder (System.Text.Encodings.Web.HtmlEncoder) – The
System.Text.Encodings.Web.HtmlEncoder. - selector (Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentSelector) – The
Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentSelector. - invokerFactory (Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentInvokerFactory) – The
Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentInvokerFactory. - viewBufferScope (Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.IViewBufferScope) – The
Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.IViewBufferScopethat manages the lifetime ofMicrosoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewBufferinstances.
public DefaultViewComponentHelper(IViewComponentDescriptorCollectionProvider descriptorProvider, HtmlEncoder htmlEncoder, IViewComponentSelector selector, IViewComponentInvokerFactory invokerFactory, IViewBufferScope viewBufferScope)
- descriptorProvider (Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorCollectionProvider) – The
-
Methods¶
-
Contextualize(Microsoft.AspNetCore.Mvc.Rendering.ViewContext)¶ public void Contextualize(ViewContext viewContext)
-
InvokeAsync(System.String, System.Object)¶ Return type: System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> public Task<IHtmlContent> InvokeAsync(string name, object arguments)
-
InvokeAsync(System.Type, System.Object) Return type: System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> public Task<IHtmlContent> InvokeAsync(Type componentType, object arguments)
-