forked from smartstore/SmartStoreNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRouteInfo.cs
More file actions
71 lines (59 loc) · 1.6 KB
/
Copy pathRouteInfo.cs
File metadata and controls
71 lines (59 loc) · 1.6 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Routing;
namespace SmartStore
{
public class RouteInfo
{
public RouteInfo(RouteInfo cloneFrom)
: this(cloneFrom.Action, cloneFrom.Controller, new RouteValueDictionary(cloneFrom.RouteValues))
{
Guard.NotNull(cloneFrom, nameof(cloneFrom));
}
public RouteInfo(string action, object routeValues)
: this(action, null, routeValues)
{
}
public RouteInfo(string action, string controller, object routeValues)
: this(action, controller, new RouteValueDictionary(routeValues))
{
}
public RouteInfo(string action, IDictionary<string, object> routeValues)
: this(action, null, routeValues)
{
}
public RouteInfo(string action, string controller, IDictionary<string, object> routeValues)
: this(action, controller, new RouteValueDictionary(routeValues))
{
Guard.NotNull(routeValues, nameof(routeValues));
}
public RouteInfo(string action, RouteValueDictionary routeValues)
: this(action, null, routeValues)
{
}
public RouteInfo(string action, string controller, RouteValueDictionary routeValues)
{
Guard.NotEmpty(action, nameof(action));
Guard.NotNull(routeValues, nameof(routeValues));
this.Action = action;
this.Controller = controller;
this.RouteValues = routeValues;
}
public string Action
{
get;
private set;
}
public string Controller
{
get;
private set;
}
public RouteValueDictionary RouteValues
{
get;
private set;
}
}
}