CompositeModelBinder Class

Summary

Represents an [Microsoft.AspNet.Mvc.ModelBinding.IModelBinder]() that delegates to one of a collection of [Microsoft.AspNet.Mvc.ModelBinding.IModelBinder]() instances.

Syntax

public class CompositeModelBinder : ICompositeModelBinder, IModelBinder

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.ModelBinding.CompositeModelBinder

Constructors

CompositeModelBinder(System.Collections.Generic.IEnumerable<Microsoft.AspNet.Mvc.ModelBinding.IModelBinder>)

Initializes a new instance of the CompositeModelBinder class.

Arguments:
  • modelBinders (System.Collections.Generic.IEnumerable{Microsoft.AspNet.Mvc.ModelBinding.IModelBinder}) – A collection of [Microsoft.AspNet.Mvc.ModelBinding.IModelBinder]() instances.
public CompositeModelBinder(IEnumerable<IModelBinder> modelBinders)

Properties

ModelBinders()
Return type:System.Collections.Generic.IReadOnlyList{Microsoft.AspNet.Mvc.ModelBinding.IModelBinder}
public IReadOnlyList<IModelBinder> ModelBinders { get; }

Methods

BindModelAsync(Microsoft.AspNet.Mvc.ModelBinding.ModelBindingContext)
Arguments:
Return type:

System.Threading.Tasks.Task{Microsoft.AspNet.Mvc.ModelBinding.ModelBindingResult}

public virtual Task<ModelBindingResult> BindModelAsync(ModelBindingContext bindingContext)