Class SitecoreLayoutComponentFieldBindingSource

Version: 21.x

Binding source for binding Sitecore Component field data.

Inheritance

System.Object

SitecoreLayoutBindingSource

SitecoreLayoutComponentFieldBindingSource

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 SitecoreLayoutComponentFieldBindingSource : SitecoreLayoutBindingSource

Constructors

SitecoreLayoutComponentFieldBindingSource()

Initializes a new instance of the SitecoreLayoutComponentFieldBindingSource class.

Declaration
public SitecoreLayoutComponentFieldBindingSource()

SitecoreLayoutComponentFieldBindingSource(String)

Initializes a new instance of the SitecoreLayoutComponentFieldBindingSource class.

Declaration
public SitecoreLayoutComponentFieldBindingSource(string name)
Parameters
TypeNameDescription
System.StringnameThe name of the field in the Sitecore component to use for binding.

SitecoreLayoutComponentFieldBindingSource(String, String, Boolean, Boolean)

Initializes a new instance of the SitecoreLayoutComponentFieldBindingSource class.

Declaration
public SitecoreLayoutComponentFieldBindingSource(string id, string displayName, bool isGreedy, bool isFromRequest)
Parameters
TypeNameDescription
System.StringidThe binding source ID.
System.StringdisplayNameThe display name.
System.BooleanisGreedyA value indicating whether the source is greedy.
System.BooleanisFromRequestA value indicating whether the data comes from the HTTP request.

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!