File: Infrastructure\IActionInvokerFactory.cs
Web Access
Project: src\src\Mvc\Mvc.Core\src\Microsoft.AspNetCore.Mvc.Core.csproj (Microsoft.AspNetCore.Mvc.Core)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
#nullable enable
 
using Microsoft.AspNetCore.Mvc.Abstractions;
 
namespace Microsoft.AspNetCore.Mvc.Infrastructure;
 
/// <summary>
/// Defines an interface for creating an <see cref="IActionInvoker"/> for the current request.
/// </summary>
/// <remarks>
/// The default <see cref="IActionInvokerFactory"/> implementation creates an <see cref="IActionInvoker"/> by
/// calling into each <see cref="IActionInvokerProvider"/>. See <see cref="IActionInvokerProvider"/> for more
/// details.
/// </remarks>
public interface IActionInvokerFactory
{
    /// <summary>
    /// Creates an <see cref="IActionInvoker"/> for the current request associated with
    /// <paramref name="actionContext"/>.
    /// </summary>
    /// <param name="actionContext">
    /// The <see cref="ActionContext"/> associated with the current request.
    /// </param>
    /// <returns>An <see cref="IActionInvoker"/> or <c>null</c>.</returns>
    IActionInvoker? CreateInvoker(ActionContext actionContext);
}