// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Html;
namespace Microsoft.AspNetCore.Mvc
{
///
/// Supports the rendering of view components in a view.
///
public interface IViewComponentHelper
{
///
/// Invokes a view component with the specified .
///
/// The name of the view component.
///
/// An with properties representing arguments to be passed to the invoked view component
/// method. Alternatively, an instance
/// containing the invocation arguments.
///
/// A that on completion returns the rendered .
///
Task InvokeAsync(string name, object arguments);
///
/// Invokes a view component of type .
///
/// The view component .
///
/// An with properties representing arguments to be passed to the invoked view component
/// method. Alternatively, an instance
/// containing the invocation arguments.
///
/// A that on completion returns the rendered .
///
Task InvokeAsync(Type componentType, object arguments);
}
}