Class BlockListItem
Represents a layout item for the Block List editor.
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Models.Blocks
Assembly: Umbraco.Core.dll
Syntax
[DataContract(Name = "block", Namespace = "")]
public class BlockListItem : IBlockReference<IPublishedElement, IPublishedElement>, IBlockReference<IPublishedElement>, IBlockReference
Constructors
View SourceBlockListItem(Guid, IPublishedElement, Nullable<Guid>, IPublishedElement)
Declaration
public BlockListItem(Guid contentKey, IPublishedElement content, Guid? settingsKey, IPublishedElement settings)
Parameters
Type | Name | Description |
---|---|---|
Guid | contentKey | |
IPublishedElement | content | |
System.Nullable<Guid> | settingsKey | |
IPublishedElement | settings |
BlockListItem(Udi, IPublishedElement, Udi, IPublishedElement)
Initializes a new instance of the BlockListItem class.
Declaration
public BlockListItem(Udi contentUdi, IPublishedElement content, Udi settingsUdi, IPublishedElement settings)
Parameters
Type | Name | Description |
---|---|---|
Udi | contentUdi | The content UDI. |
IPublishedElement | content | The content. |
Udi | settingsUdi | The settings UDI. |
IPublishedElement | settings | The settings. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | contentUdi or content |
Properties
View SourceContent
Gets the content.
Declaration
public IPublishedElement Content { get; }
Property Value
Type | Description |
---|---|
IPublishedElement | The content. |
ContentKey
Gets the content key.
Declaration
public Guid ContentKey { get; set; }
Property Value
Type | Description |
---|---|
Guid |
ContentUdi
Gets the content UDI.
Declaration
public Udi ContentUdi { get; }
Property Value
Type | Description |
---|---|
Udi | The content UDI. |
Settings
Gets the settings.
Declaration
public IPublishedElement Settings { get; }
Property Value
Type | Description |
---|---|
IPublishedElement | The settings. |
SettingsKey
Gets the settings key.
Declaration
public Guid? SettingsKey { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Guid> |
SettingsUdi
Gets the settings UDI.
Declaration
public Udi SettingsUdi { get; }
Property Value
Type | Description |
---|---|
Udi | The settings UDI. |