Class SitecoreLayoutRouteFieldBindingSource
Version: 21.x
Binding source for binding Sitecore Route field data.
Inherited Members
Namespace: Sitecore.AspNet.RenderingEngine.Binding.Sources
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
RequestResponse
public class SitecoreLayoutRouteFieldBindingSource : SitecoreLayoutBindingSourceConstructors
SitecoreLayoutRouteFieldBindingSource(String)
Initializes a new instance of the SitecoreLayoutRouteFieldBindingSource class.
Declaration
RequestResponse
public SitecoreLayoutRouteFieldBindingSource(string name)Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name |
The name of the field in the Sitecore route to use for binding. |
SitecoreLayoutRouteFieldBindingSource(String, String, Boolean, Boolean)
Initializes a new instance of the SitecoreLayoutRouteFieldBindingSource class.
Declaration
RequestResponse
public SitecoreLayoutRouteFieldBindingSource(string id, string displayName, bool isGreedy, bool isFromRequest)Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id |
The binding source ID. |
| System.String | displayName |
The display name. |
| System.Boolean | isGreedy |
A value indicating whether the source is greedy. |
| System.Boolean | isFromRequest |
A value indicating whether the data comes from the HTTP request. |
Methods
GetModel(IServiceProvider, ModelBindingContext, ISitecoreRenderingContext)
Gets the model for binding.
Declaration
RequestResponse
public override object GetModel(IServiceProvider serviceProvider, ModelBindingContext bindingContext, ISitecoreRenderingContext context)Parameters
| Type | Name | Description |
|---|---|---|
| System.IServiceProvider | serviceProvider |
The System.IServiceProvider. |
| Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext | bindingContext |
The Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext. |
| ISitecoreRenderingContext | context |
Returns
| Type | Description |
|---|---|
| System.Object |
The bound model. |