Class SitecoreLayoutModelBinder
Version: 21.x
Implements model binding for Sitecore layout data specified by the SitecoreLayoutBindingSource.
Inheritance
System.Object
SitecoreLayoutModelBinder
Implements
Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder
Namespace: Sitecore.AspNet.RenderingEngine.Binding
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
Type Parameters
| Name | Description |
|---|---|
| T | The type of the binding source. |
Constructors
SitecoreLayoutModelBinder(IServiceProvider, ILogger<SitecoreLayoutModelBinder>)
Initializes a new instance of the SitecoreLayoutModelBinder
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.IServiceProvider | serviceProvider | The System.IServiceProvider. |
| Microsoft.Extensions.Logging.ILogger < SitecoreLayoutModelBinder | logger | The Microsoft.Extensions.Logging.ILogger to use for logging. |
Methods
BindModelAsync(ModelBindingContext)
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext | bindingContext |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Implements
Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder
If you have suggestions for improving this article, let us know!