Class SitecoreLayoutRouteFieldBindingSource

Version: 21.x

Binding source for binding Sitecore Route field data.

Inheritance
System.Object
SitecoreLayoutRouteFieldBindingSource
Namespace: Sitecore.AspNet.RenderingEngine.Binding.Sources
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
RequestResponse
public class SitecoreLayoutRouteFieldBindingSource : SitecoreLayoutBindingSource

Constructors

SitecoreLayoutRouteFieldBindingSource(String)

Initializes a new instance of the SitecoreLayoutRouteFieldBindingSource class.

Declaration
RequestResponse
public SitecoreLayoutRouteFieldBindingSource(string name)
Parameters
TypeNameDescription
System.Stringname

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
TypeNameDescription
System.Stringid

The binding source ID.

System.StringdisplayName

The display name.

System.BooleanisGreedy

A value indicating whether the source is greedy.

System.BooleanisFromRequest

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
TypeNameDescription
System.IServiceProviderserviceProvider

The System.IServiceProvider.

Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContextbindingContext

The Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext.

ISitecoreRenderingContextcontext

The ISitecoreRenderingContext.

Returns
TypeDescription
System.Object

The bound model.

Overrides

Do you have some feedback for us?

If you have suggestions for improving this article,