This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
ActionResult.cs
38 lines (35 loc) · 1.69 KB
/
ActionResult.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// 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;
namespace Microsoft.AspNetCore.Mvc
{
/// <summary>
/// A default implementation of <see cref="IActionResult"/>.
/// </summary>
public abstract class ActionResult : IActionResult
{
/// <summary>
/// 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 <see cref="ExecuteResult(ActionContext)"/> method and
/// returns a completed task.
/// </summary>
/// <param name="context">The context in which the result is executed. The context information includes
/// information about the action that was executed and request information.</param>
/// <returns>A task that represents the asynchronous execute operation.</returns>
public virtual Task ExecuteResultAsync(ActionContext context)
{
ExecuteResult(context);
return Task.CompletedTask;
}
/// <summary>
/// Executes the result operation of the action method synchronously. This method is called by MVC to process
/// the result of an action method.
/// </summary>
/// <param name="context">The context in which the result is executed. The context information includes
/// information about the action that was executed and request information.</param>
public virtual void ExecuteResult(ActionContext context)
{
}
}
}