Fix IModelBinder docs

This commit is contained in:
Ryan Nowak 2015-12-17 12:37:00 -08:00
parent 43226fe54d
commit 67b9414ccf
1 changed files with 15 additions and 10 deletions

View File

@ -6,22 +6,27 @@ using System.Threading.Tasks;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding
{ {
/// <summary> /// <summary>
/// Interface for model binding. /// Defines an interface for model binders.
/// </summary> /// </summary>
public interface IModelBinder public interface IModelBinder
{ {
/// <summary> /// <summary>
/// Async function to bind to a particular model. /// Attempts to bind a model.
/// </summary> /// </summary>
/// <param name="bindingContext">The binding context which has the object to be bound.</param> /// <param name="bindingContext">The <see cref="ModelBindingContext"/>.</param>
/// <returns>A Task which on completion returns a <see cref="ModelBindingResult"/> which represents the result /// <returns>
/// of the model binding process. /// <para>
/// A <see cref="Task"/> which on completion returns a <see cref="ModelBindingResult"/> which
/// represents the result of the model binding process.
/// </para>
/// <para>
/// If model binding was successful, the <see cref="ModelBindingResult"/> should be a value created
/// with <see cref="ModelBindingResult.Success"/>. If model binding failed, the
/// <see cref="ModelBindingResult"/> should be a value created with <see cref="ModelBindingResult.Failed"/>.
/// If there was no data, or this model binder cannot handle the operation, the
/// <see cref="ModelBindingResult"/> should be <see cref="ModelBindingResult.NoResult"/>.
/// </para>
/// </returns> /// </returns>
/// <remarks>
/// A <c>null</c> return value means that this model binder was not able to handle the request.
/// Returning <c>null</c> ensures that subsequent model binders are run. If a non <c>null</c> value indicates
/// that the model binder was able to handle the request.
/// </remarks>
Task<ModelBindingResult> BindModelAsync(ModelBindingContext bindingContext); Task<ModelBindingResult> BindModelAsync(ModelBindingContext bindingContext);
} }
} }