共用方式為


IViewComponentActivator.ReleaseAsync(ViewComponentContext, Object) 方法

定義

釋放 ViewComponent 實例。

public virtual System.Threading.Tasks.ValueTask ReleaseAsync (Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context, object viewComponent);
abstract member ReleaseAsync : Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext * obj -> System.Threading.Tasks.ValueTask
override this.ReleaseAsync : Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext * obj -> System.Threading.Tasks.ValueTask
Public Overridable Function ReleaseAsync (context As ViewComponentContext, viewComponent As Object) As ValueTask

參數

context
ViewComponentContext

ViewComponentContext 關聯的 viewComponent

viewComponent
Object

要釋放的 ViewComponent

傳回

ValueTask 會在處置檢視元件時完成。

適用於