1 /* ****************************************************************************
\r
3 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5 * This software is subject to the Microsoft Public License (Ms-PL).
\r
6 * A copy of the license can be found in the license.htm file included
\r
7 * in this distribution.
\r
9 * You must not remove this notice, or any other, from this software.
\r
11 * ***************************************************************************/
\r
13 namespace System.Web.Mvc {
\r
15 using System.Diagnostics.CodeAnalysis;
\r
17 public class ActionExecutedContext : ControllerContext {
\r
19 private ActionResult _result;
\r
21 // parameterless constructor used for mocking
\r
22 public ActionExecutedContext() {
\r
25 [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
\r
26 Justification = "The virtual property setters are only to support mocking frameworks, in which case this constructor shouldn't be called anyway.")]
\r
27 public ActionExecutedContext(ControllerContext controllerContext, ActionDescriptor actionDescriptor, bool canceled, Exception exception)
\r
28 : base(controllerContext) {
\r
29 if (actionDescriptor == null) {
\r
30 throw new ArgumentNullException("actionDescriptor");
\r
33 ActionDescriptor = actionDescriptor;
\r
34 Canceled = canceled;
\r
35 Exception = exception;
\r
38 public virtual ActionDescriptor ActionDescriptor {
\r
43 public virtual bool Canceled {
\r
48 public virtual Exception Exception {
\r
53 public bool ExceptionHandled {
\r
58 public ActionResult Result {
\r
60 return _result ?? EmptyResult.Instance;
\r