Class SitecoreLayoutBindingSource
Utilities for binding Sitecore layout data.
Inheritance
Namespace: Sitecore.AspNet.RenderingEngine.Binding.Sources
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
Constructors
SitecoreLayoutBindingSource(String, String, Boolean, Boolean)
Initializes a new instance of the SitecoreLayoutBindingSource class.
Declaration
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. |
Properties
Name
Gets or sets the binding source name.
Declaration
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
GetFieldModel<T>(ModelBindingContext, T, Route)
Get the value of an object's field.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext | bindingContext |
The Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext. |
| T | source |
The source object to process. |
| Route | currentRoute |
The route for the current page. |
Returns
| Type | Description |
|---|---|
| System.Object |
A field object. |
Type Parameters
| Name | Description |
|---|---|
| T |
The type of the source object. |
GetModel(IServiceProvider, ModelBindingContext, ISitecoreRenderingContext)
Gets the model for binding.
Declaration
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. |
GetPropertyModel<T>(ModelBindingContext, T)
Gets the value of an object's property.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext | bindingContext |
The Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext. |
| T | source |
The source object to process. |
Returns
| Type | Description |
|---|---|
| System.Object |
A property object. |
Type Parameters
| Name | Description |
|---|---|
| T |
The type of the source object. |