blob: e027dbef2148e616552678190fbe331462beee80 (
plain)
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
|
namespace System.Web.Mvc
{
public class Filter
{
public const int DefaultOrder = -1;
public Filter(object instance, FilterScope scope, int? order)
{
if (instance == null)
{
throw new ArgumentNullException("instance");
}
if (order == null)
{
IMvcFilter mvcFilter = instance as IMvcFilter;
if (mvcFilter != null)
{
order = mvcFilter.Order;
}
}
Instance = instance;
Order = order ?? DefaultOrder;
Scope = scope;
}
public object Instance { get; protected set; }
public int Order { get; protected set; }
public FilterScope Scope { get; protected set; }
}
}
|