-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathControllerActionResult.cs
More file actions
46 lines (38 loc) · 1.12 KB
/
ControllerActionResult.cs
File metadata and controls
46 lines (38 loc) · 1.12 KB
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
39
40
41
42
43
44
45
46
using System.Web;
using System.Web.Mvc;
namespace TestStack.FluentMVCTesting.MvcPipeline
{
public class ControllerActionResult
{
public ControllerContext ControllerContext { get; set; }
public ActionResult ActionResult { get; set; }
public dynamic ViewBag
{
get { return ControllerContext.Controller.ViewBag; }
}
public ViewDataDictionary ViewData
{
get { return ControllerContext.Controller.ViewData; }
}
public ModelStateDictionary ModelState
{
get { return ControllerContext.Controller.ViewData.ModelState; }
}
public HttpResponseBase Response
{
get { return ControllerContext.HttpContext.Response; }
}
public ControllerBase Controller
{
get { return ControllerContext.Controller; }
}
public HttpRequestBase Request
{
get { return ControllerContext.HttpContext.Request; }
}
public void ExecuteResult()
{
ActionResult.ExecuteResult(ControllerContext);
}
}
}