Class SitecoreLayoutBindingSource
- Namespace
- Sitecore.AspNetCore.SDK.RenderingEngine.Binding.Sources
- Assembly
- Sitecore.AspNetCore.SDK.RenderingEngine.dll
Utilities for binding Sitecore layout data.
public abstract class SitecoreLayoutBindingSource : BindingSource, IEquatable<BindingSource?>
- Inheritance
-
SitecoreLayoutBindingSource
- Implements
- Derived
- Inherited Members
Remarks
Initializes a new instance of the SitecoreLayoutBindingSource class.
Constructors
SitecoreLayoutBindingSource(string, string, bool, bool)
Utilities for binding Sitecore layout data.
protected SitecoreLayoutBindingSource(string id, string displayName, bool isGreedy, bool isFromRequest)
Parameters
idstringThe binding source ID.
displayNamestringThe display name.
isGreedyboolA value indicating whether the source is greedy.
isFromRequestboolA value indicating whether the data comes from the HTTP request.
Remarks
Initializes a new instance of the SitecoreLayoutBindingSource class.
Properties
Name
Gets or sets the binding source name.
public string? Name { get; set; }
Property Value
Methods
GetFieldModel<T>(ModelBindingContext, T?, Route?)
Get the value of an object's field.
protected object? GetFieldModel<T>(ModelBindingContext bindingContext, T? source, Route? currentRoute) where T : IFieldsReader
Parameters
bindingContextModelBindingContextThe ModelBindingContext.
sourceTThe source object to process.
currentRouteRouteThe route for the current page.
Returns
- object
A field object.
Type Parameters
TThe type of the source object.
GetModel(IServiceProvider, ModelBindingContext, ISitecoreRenderingContext)
Gets the model for binding.
public abstract object? GetModel(IServiceProvider serviceProvider, ModelBindingContext bindingContext, ISitecoreRenderingContext context)
Parameters
serviceProviderIServiceProviderThe IServiceProvider.
bindingContextModelBindingContextThe ModelBindingContext.
contextISitecoreRenderingContext
Returns
- object
The bound model.
GetPropertyModel<T>(ModelBindingContext, T?)
Gets the value of an object's property.
protected object? GetPropertyModel<T>(ModelBindingContext bindingContext, T? source) where T : class
Parameters
bindingContextModelBindingContextThe ModelBindingContext.
sourceTThe source object to process.
Returns
- object
A property object.
Type Parameters
TThe type of the source object.