From 04c7b50726c104ab92dbe308e7ce718479b88d7c Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 26 Feb 2014 13:40:35 -0800 Subject: [PATCH] Removing IsFromBody property from ModelMetadata --- .../Binders/CompositeModelBinder.cs | 1 - .../Metadata/CachedModelMetadata.cs | 5 ----- .../Metadata/ModelMetadata.cs | 5 ----- 3 files changed, 11 deletions(-) diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs index a231befcb6..85ac2dc38b 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs @@ -73,7 +73,6 @@ namespace Microsoft.AspNet.Mvc.ModelBinding // Protects against stack overflow for deeply nested model binding // RuntimeHelpers.EnsureSufficientExecutionStack(); - bool requiresBodyBinder = bindingContext.ModelMetadata.IsFromBody; foreach (IModelBinder binder in Binders) { if (binder.BindModel(bindingContext)) diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/CachedModelMetadata.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/CachedModelMetadata.cs index 8dab52cbeb..58ae174f7c 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/CachedModelMetadata.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/CachedModelMetadata.cs @@ -132,10 +132,5 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { return base.IsComplexType; } - - protected virtual bool ComputeIsFromBody() - { - return base.IsFromBody; - } } } diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs index d9c523159e..9128b59ec4 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs @@ -54,11 +54,6 @@ namespace Microsoft.AspNet.Mvc.ModelBinding public virtual string Description { get; set; } - /// - /// Determines if the model needs to be consumed from the body. - /// - public virtual bool IsFromBody { get; set; } - public virtual bool IsComplexType { get { return !ModelType.HasStringConverter(); }