* Remove unused method of IModelMetadataProvider
* Fix warning in CollectionModelBinder
This commit is contained in:
parent
b6c78de4ea
commit
f1183f57af
|
|
@ -165,7 +165,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
return new[] { rawValue };
|
||||
}
|
||||
|
||||
internal static void CreateOrReplaceCollection<TElement>(ModelBindingContext bindingContext,
|
||||
internal static void CreateOrReplaceCollection(ModelBindingContext bindingContext,
|
||||
IEnumerable<TElement> incomingElements,
|
||||
Func<ICollection<TElement>> creator)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,17 +56,6 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
return CreateMetadataFromPrototype(prototype, modelAccessor);
|
||||
}
|
||||
|
||||
public ModelMetadata GetMetadataForParameter(ParameterInfo parameter)
|
||||
{
|
||||
if (parameter == null)
|
||||
{
|
||||
throw Error.ArgumentNull("parameter");
|
||||
}
|
||||
|
||||
TModelMetadata prototype = GetTypeInformation(parameter.ParameterType, parameter.GetCustomAttributes()).Prototype;
|
||||
return CreateMetadataFromPrototype(prototype, modelAccessor: null);
|
||||
}
|
||||
|
||||
// Override for creating the prototype metadata (without the accessor)
|
||||
protected abstract TModelMetadata CreateMetadataPrototype(IEnumerable<Attribute> attributes,
|
||||
Type containerType,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.ModelBinding
|
||||
{
|
||||
|
|
@ -11,7 +10,5 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
ModelMetadata GetMetadataForProperty(Func<object> modelAccessor, Type containerType, string propertyName);
|
||||
|
||||
ModelMetadata GetMetadataForType(Func<object> modelAccessor, Type modelType);
|
||||
|
||||
ModelMetadata GetMetadataForParameter(ParameterInfo parameterInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue