forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFallbackRouteService.cs
More file actions
34 lines (31 loc) · 812 Bytes
/
Copy pathFallbackRouteService.cs
File metadata and controls
34 lines (31 loc) · 812 Bytes
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
using Check.ServiceModel;
using ServiceStack;
namespace Check.ServiceInterface
{
[FallbackRoute("{PathInfo*}")]
public class FallbackRoute
{
public string PathInfo { get; set; }
}
public class FallbackRouteService : Service
{
public object Any(FallbackRoute request)
{
if (request.PathInfo == "TestView")
{
return new HttpResult(base.ExecuteRequest(new CachedEcho
{
Reload = true,
Sentence = "Echo Result",
}))
{
View = "TestView"
};
}
return new HttpResult(request)
{
View = "/default.cshtml"
};
}
}
}