Files
linux-packaging-mono/mcs/class/referencesource/System.Web/ModelBinding/ArrayModelBinder`1.cs

14 lines
472 B
C#
Raw Normal View History

namespace System.Web.ModelBinding {
using System.Collections.Generic;
using System.Linq;
public class ArrayModelBinder<TElement> : CollectionModelBinder<TElement> {
protected override bool CreateOrReplaceCollection(ModelBindingExecutionContext modelBindingExecutionContext, ModelBindingContext bindingContext, IList<TElement> newCollection) {
bindingContext.Model = newCollection.ToArray();
return true;
}
}
}