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.Collections.Generic;
\r
16 using System.Diagnostics.CodeAnalysis;
\r
18 public class ActionExecutingContext : ControllerContext {
\r
20 // parameterless constructor used for mocking
\r
21 public ActionExecutingContext() {
\r
24 [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
\r
25 Justification = "The virtual property setters are only to support mocking frameworks, in which case this constructor shouldn't be called anyway.")]
\r
26 public ActionExecutingContext(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary<string, object> actionParameters)
\r
27 : base(controllerContext) {
\r
28 if (actionDescriptor == null) {
\r
29 throw new ArgumentNullException("actionDescriptor");
\r
31 if (actionParameters == null) {
\r
32 throw new ArgumentNullException("actionParameters");
\r
35 ActionDescriptor = actionDescriptor;
\r
36 ActionParameters = actionParameters;
\r
39 public virtual ActionDescriptor ActionDescriptor {
\r
44 [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
\r
45 Justification = "The property setter is only here to support mocking this type and should not be called at runtime.")]
\r
46 public virtual IDictionary<string, object> ActionParameters {
\r
51 public ActionResult Result {
\r