diff --git a/src/Microsoft.AspNet.Mvc.Abstractions/ParameterDescriptor.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ParameterDescriptor.cs
index 37d6d3d28a..fb8d068201 100644
--- a/src/Microsoft.AspNet.Mvc.Abstractions/ParameterDescriptor.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/ParameterDescriptor.cs
@@ -3,7 +3,6 @@
using System;
using Microsoft.AspNet.Mvc.ModelBinding;
-using Microsoft.AspNet.Mvc.ModelBinding.Metadata;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ParameterModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ParameterModel.cs
index 57c0f94abf..795985b58a 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ParameterModel.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ParameterModel.cs
@@ -1,12 +1,10 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using Microsoft.AspNet.Mvc.ModelBinding;
-using Microsoft.AspNet.Mvc.ModelBinding.Metadata;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.ApplicationModels
diff --git a/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorBuilder.cs
index f1f892d0f7..48ffceedbb 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorBuilder.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorBuilder.cs
@@ -281,11 +281,12 @@ namespace Microsoft.AspNet.Mvc
private static ParameterDescriptor CreateParameterDescriptor(ParameterModel parameterModel)
{
- var parameterDescriptor = new ParameterDescriptor()
+ var parameterDescriptor = new ControllerParameterDescriptor()
{
Name = parameterModel.ParameterName,
ParameterType = parameterModel.ParameterInfo.ParameterType,
- BindingInfo = parameterModel.BindingInfo
+ BindingInfo = parameterModel.BindingInfo,
+ ParameterInfo = parameterModel.ParameterInfo,
};
return parameterDescriptor;
@@ -293,11 +294,12 @@ namespace Microsoft.AspNet.Mvc
private static ParameterDescriptor CreateParameterDescriptor(PropertyModel propertyModel)
{
- var parameterDescriptor = new ParameterDescriptor()
+ var parameterDescriptor = new ControllerBoundPropertyDescriptor()
{
BindingInfo = propertyModel.BindingInfo,
Name = propertyModel.PropertyName,
ParameterType = propertyModel.PropertyInfo.PropertyType,
+ PropertyInfo = propertyModel.PropertyInfo,
};
return parameterDescriptor;
diff --git a/src/Microsoft.AspNet.Mvc.Core/ControllerBoundPropertyDescriptor.cs b/src/Microsoft.AspNet.Mvc.Core/ControllerBoundPropertyDescriptor.cs
new file mode 100644
index 0000000000..e055ffe224
--- /dev/null
+++ b/src/Microsoft.AspNet.Mvc.Core/ControllerBoundPropertyDescriptor.cs
@@ -0,0 +1,18 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Reflection;
+
+namespace Microsoft.AspNet.Mvc
+{
+ ///
+ /// A descriptor for model bound properties of a controller.
+ ///
+ public class ControllerBoundPropertyDescriptor : ParameterDescriptor
+ {
+ ///
+ /// Gets or sets the for this property.
+ ///
+ public PropertyInfo PropertyInfo { get; set; }
+ }
+}
diff --git a/src/Microsoft.AspNet.Mvc.Core/ControllerParameterDescriptor.cs b/src/Microsoft.AspNet.Mvc.Core/ControllerParameterDescriptor.cs
new file mode 100644
index 0000000000..100198d98a
--- /dev/null
+++ b/src/Microsoft.AspNet.Mvc.Core/ControllerParameterDescriptor.cs
@@ -0,0 +1,18 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Reflection;
+
+namespace Microsoft.AspNet.Mvc
+{
+ ///
+ /// A descriptor for method parameters of an action method.
+ ///
+ public class ControllerParameterDescriptor : ParameterDescriptor
+ {
+ ///
+ /// Gets or sets the .
+ ///
+ public ParameterInfo ParameterInfo { get; set; }
+ }
+}
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorBuilderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorBuilderTest.cs
index 2fe4708b23..da4aa2289f 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorBuilderTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorBuilderTest.cs
@@ -17,11 +17,14 @@ namespace Microsoft.AspNet.Mvc
{
// Arrange
var applicationModel = new ApplicationModel();
- var controller = new ControllerModel(typeof(TestController).GetTypeInfo(),
- new List