Class BlockItemData
Represents a single block's data in raw form.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models.Blocks
Assembly: Umbraco.Core.dll
Syntax
public class BlockItemData
Constructors
View SourceBlockItemData()
Initializes a new instance of the BlockItemData class.
Declaration
public BlockItemData()
BlockItemData(Guid, Guid, string)
Initializes a new instance of the BlockItemData class.
Declaration
public BlockItemData(Guid key, Guid contentTypeKey, string contentTypeAlias)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | key | The key. |
| Guid | contentTypeKey | The content type key. |
| string | contentTypeAlias | The content type alias. |
BlockItemData(Udi, Guid, string)
Initializes a new instance of the BlockItemData class.
Declaration
[Obsolete("Use constructor that accepts GUID key instead. Scheduled for removal in Umbraco 18.")]
public BlockItemData(Udi udi, Guid contentTypeKey, string contentTypeAlias)
Parameters
| Type | Name | Description |
|---|---|---|
| Udi | udi | The UDI. |
| Guid | contentTypeKey | The content type key. |
| string | contentTypeAlias | The content type alias. |
Properties
View SourceContentTypeAlias
Gets or sets the content type alias.
Declaration
[JsonIgnore]
public string ContentTypeAlias { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
Not serialized, manually set and used internally.
ContentTypeKey
Gets or sets the content type key.
Declaration
public Guid ContentTypeKey { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid | The content type key. |
Key
Gets or sets the key.
Declaration
public Guid Key { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid | The key. |
RawPropertyValues
Gets or sets the raw property values.
Declaration
[Obsolete("Use Properties instead. Scheduled for removal in Umbraco 18.")]
[JsonExtensionData]
public Dictionary<string, object?> RawPropertyValues { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, object> | The raw property values. |
Udi
Gets or sets the UDI.
Declaration
[Obsolete("Use Key instead. Scheduled for removal in Umbraco 18.")]
[JsonIgnore]
public Udi? Udi { get; set; }
Property Value
| Type | Description |
|---|---|
| Udi | The UDI. |
Values
Gets or sets the property values.
Declaration
public IList<BlockPropertyValue> Values { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<BlockPropertyValue> | The property values. |