语言

DefaultViewComponentActivator 类

定义

的默认实现 IViewComponentActivator。

public ref class DefaultViewComponentActivator : Microsoft::AspNetCore::Mvc::ViewComponents::IViewComponentActivator
public class DefaultViewComponentActivator : Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentActivator
type DefaultViewComponentActivator = class
    interface IViewComponentActivator
Public Class DefaultViewComponentActivator
Implements IViewComponentActivator
继承
DefaultViewComponentActivator
实现

注解

DefaultViewComponentActivator可以将 的当前实例ViewComponentContext提供给用 ViewComponentContextAttribute标记的视图组件的公共属性。

构造函数

名称 说明
DefaultViewComponentActivator(ITypeActivatorCache)

初始化 DefaultViewComponentActivator 类的新实例。

方法

名称 说明
Create(ViewComponentContext)

实例化 ViewComponent。

Release(ViewComponentContext, Object)

释放 ViewComponent 实例。

适用于