Fix bugs in sizing TableLayoutPanel (Xamarin bug 18638)
[mono.git] / mcs / class / System.Web.Mvc2 / System.Web.Mvc / ActionExecutingContext.cs
1 /* ****************************************************************************\r
2  *\r
3  * Copyright (c) Microsoft Corporation. All rights reserved.\r
4  *\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
8  *\r
9  * You must not remove this notice, or any other, from this software.\r
10  *\r
11  * ***************************************************************************/\r
12 \r
13 namespace System.Web.Mvc {\r
14     using System;\r
15     using System.Collections.Generic;\r
16     using System.Diagnostics.CodeAnalysis;\r
17 \r
18     public class ActionExecutingContext : ControllerContext {\r
19 \r
20         // parameterless constructor used for mocking\r
21         public ActionExecutingContext() {\r
22         }\r
23 \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
30             }\r
31             if (actionParameters == null) {\r
32                 throw new ArgumentNullException("actionParameters");\r
33             }\r
34 \r
35             ActionDescriptor = actionDescriptor;\r
36             ActionParameters = actionParameters;\r
37         }\r
38 \r
39         public virtual ActionDescriptor ActionDescriptor {\r
40             get;\r
41             set;\r
42         }\r
43 \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
47             get;\r
48             set;\r
49         }\r
50 \r
51         public ActionResult Result {\r
52             get;\r
53             set;\r
54         }\r
55 \r
56     }\r
57 }\r