New tests.
[mono.git] / mcs / class / System.Web.Mvc2 / System.Web.Mvc / ResultExecutedContext.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.Diagnostics.CodeAnalysis;\r
16 \r
17     public class ResultExecutedContext : ControllerContext {\r
18 \r
19         // parameterless constructor used for mocking\r
20         public ResultExecutedContext() {\r
21         }\r
22 \r
23         [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",\r
24             Justification = "The virtual property setters are only to support mocking frameworks, in which case this constructor shouldn't be called anyway.")]\r
25         public ResultExecutedContext(ControllerContext controllerContext, ActionResult result, bool canceled, Exception exception)\r
26             : base(controllerContext) {\r
27             if (result == null) {\r
28                 throw new ArgumentNullException("result");\r
29             }\r
30 \r
31             Result = result;\r
32             Canceled = canceled;\r
33             Exception = exception;\r
34         }\r
35 \r
36         public virtual bool Canceled {\r
37             get;\r
38             set;\r
39         }\r
40 \r
41         public virtual Exception Exception {\r
42             get;\r
43             set;\r
44         }\r
45 \r
46         public bool ExceptionHandled {\r
47             get;\r
48             set;\r
49         }\r
50 \r
51         public virtual ActionResult Result {\r
52             get;\r
53             set;\r
54         }\r
55 \r
56     }\r
57 }\r