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