Class BlockEditorData<TValue, TLayout>
Represents convertible block data from JSON.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models.Blocks
Assembly: Umbraco.Core.dll
Syntax
public class BlockEditorData<TValue, TLayout> where TValue : BlockValue<TLayout>, new() where TLayout : IBlockLayoutItem
Type Parameters
| Name | Description |
|---|---|
| TValue | The type of the block value. |
| TLayout | The type of the layout item. |
Constructors
View SourceBlockEditorData(IEnumerable<ContentAndSettingsReference>, TValue)
Initializes a new instance of the BlockEditorData<TValue, TLayout> class.
Declaration
public BlockEditorData(IEnumerable<ContentAndSettingsReference> references, TValue blockValue)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ContentAndSettingsReference> | references | The content and settings references. |
| TValue | blockValue | The block value. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when references or blockValue is null. |
Properties
View SourceBlockValue
Gets the reference to the original block value.
Declaration
public TValue BlockValue { get; }
Property Value
| Type | Description |
|---|---|
| TValue | The block value. |
Empty
Gets the empty instance of BlockEditorData<TValue, TLayout>.
Declaration
public static BlockEditorData<TValue, TLayout> Empty { get; }
Property Value
| Type | Description |
|---|---|
| BlockEditorData<TValue, TLayout> | The empty instance. |
Layout
Gets the layout for this specific property editor.
Declaration
public IEnumerable<TLayout>? Layout { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<TLayout> | The layout. |
References
Gets the content and settings references.
Declaration
public List<ContentAndSettingsReference> References { get; }
Property Value
| Type | Description |
|---|---|
| List<ContentAndSettingsReference> | The references. |