Class ApiElement
Represents a generic element in the Delivery API.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models.DeliveryApi
Assembly: Umbraco.Core.dll
Syntax
public class ApiElement : IApiElement
Constructors
View SourceApiElement(Guid, string, IDictionary<string, object?>)
Initializes a new instance of the ApiElement class.
Declaration
public ApiElement(Guid id, string contentType, IDictionary<string, object?> properties)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | id | The unique identifier of the element. |
| string | contentType | The content type alias of the element. |
| IDictionary<string, object> | properties | The property values of the element. |
Properties
View SourceContentType
Gets the content type alias of the element.
Declaration
[JsonPropertyOrder(-100)]
public string ContentType { get; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
This property is serialized first to enable use as a discriminator field by System.Text.Json.
Id
Gets the unique identifier of the element.
Declaration
public Guid Id { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
Properties
Gets the property values of the element.
Declaration
public IDictionary<string, object?> Properties { get; }
Property Value
| Type | Description |
|---|---|
| IDictionary<string, object> |