Class SitecoreLayoutRoutePropertyBindingSource

Version: 21.x

Binding source for binding Sitecore Route property data.

Inheritance

System.Object

SitecoreLayoutBindingSource

SitecoreLayoutRoutePropertyBindingSource

Inherited Members

SitecoreLayoutBindingSource.GetPropertyModel(ModelBindingContext, T)

SitecoreLayoutBindingSource.GetFieldModel(ModelBindingContext, T, Route)

SitecoreLayoutBindingSource.Name

Namespace: Sitecore.AspNet.RenderingEngine.Binding.Sources

Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
public class SitecoreLayoutRoutePropertyBindingSource : SitecoreLayoutBindingSource

Constructors

SitecoreLayoutRoutePropertyBindingSource(String)

Initializes a new instance of the SitecoreLayoutRoutePropertyBindingSource class.

Declaration
public SitecoreLayoutRoutePropertyBindingSource(string name)
Parameters
TypeNameDescription
System.StringnameThe name of the property in the Sitecore route to use for binding.

Methods

GetModel(IServiceProvider, ModelBindingContext, ISitecoreRenderingContext)

Gets the model for binding.

Declaration
public override object GetModel(IServiceProvider serviceProvider, ModelBindingContext bindingContext, ISitecoreRenderingContext context)
Parameters
TypeNameDescription
System.IServiceProviderserviceProviderThe System.IServiceProvider.
Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContextbindingContextThe Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext.
ISitecoreRenderingContextcontextThe ISitecoreRenderingContext.
Returns
TypeDescription
System.ObjectThe bound model.
Overrides

SitecoreLayoutBindingSource.GetModel(IServiceProvider, ModelBindingContext, ISitecoreRenderingContext)

If you have suggestions for improving this article, let us know!