// 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.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Internal; namespace Microsoft.AspNetCore.Mvc { /// /// A default implementation of . /// public abstract class ActionResult : IActionResult { /// /// Executes the result operation of the action method asynchronously. This method is called by MVC to process /// the result of an action method. /// The default implementation of this method calls the method and /// returns a completed task. /// /// The context in which the result is executed. The context information includes /// information about the action that was executed and request information. /// A task that represents the asynchronous execute operation. public virtual Task ExecuteResultAsync(ActionContext context) { ExecuteResult(context); return TaskCache.CompletedTask; } /// /// Executes the result operation of the action method synchronously. This method is called by MVC to process /// the result of an action method. /// /// The context in which the result is executed. The context information includes /// information about the action that was executed and request information. public virtual void ExecuteResult(ActionContext context) { } } }