diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterScope.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterScope.cs
index 6d2ec86c05..e2f0da4b76 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterScope.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterScope.cs
@@ -3,10 +3,18 @@
namespace Microsoft.AspNet.Mvc
{
+ ///
+ /// Contains constant values for known filter scopes.
+ ///
+ /// Scope defines the ordering of filters that have the same order. Scope is by-default
+ /// defined by how a filter is registered.
+ ///
public static class FilterScope
{
- public static readonly int Action = 100;
- public static readonly int Controller = 200;
- public static readonly int Global = 300;
+ public static readonly int First = 0;
+ public static readonly int Global = 10;
+ public static readonly int Controller = 20;
+ public static readonly int Action = 30;
+ public static readonly int Last = 100;
}
}
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ReflectedActionDescriptorProviderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ReflectedActionDescriptorProviderTests.cs
index 6becd5361b..ff0afd091f 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ReflectedActionDescriptorProviderTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ReflectedActionDescriptorProviderTests.cs
@@ -45,7 +45,7 @@ namespace Microsoft.AspNet.Mvc.Test
// Assert
Assert.Equal(3, descriptor.FilterDescriptors.Count);
- var filter1 = descriptor.FilterDescriptors[2];
+ var filter1 = descriptor.FilterDescriptors[0];
Assert.Same(globalFilter, filter1.Filter);
Assert.Equal(FilterScope.Global, filter1.Scope);
@@ -53,7 +53,7 @@ namespace Microsoft.AspNet.Mvc.Test
Assert.Equal(2, Assert.IsType(filter2.Filter).Value);
Assert.Equal(FilterScope.Controller, filter2.Scope);
- var filter3 = descriptor.FilterDescriptors[0];
+ var filter3 = descriptor.FilterDescriptors[2];
Assert.Equal(3, Assert.IsType(filter3.Filter).Value); ;
Assert.Equal(FilterScope.Action, filter3.Scope);
}