Struct ReadOnlyContentBaseAdapter
Provides a read-only adapter for IContentBase instances.
Namespace: Umbraco.Cms.Core.Models
Assembly: Umbraco.Core.dll
Syntax
public struct ReadOnlyContentBaseAdapter : IReadOnlyContentBase
Remarks
This struct wraps an IContentBase instance and exposes its properties through the IReadOnlyContentBase interface without allowing modifications.
Properties
View SourceContentTypeId
Gets the content type id
Declaration
public int ContentTypeId { get; }
Property Value
| Type | Description |
|---|---|
| int |
CreateDate
Gets the creation date.
Declaration
public DateTime CreateDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
CreatorId
Gets the identifier of the user who created this entity.
Declaration
public int CreatorId { get; }
Property Value
| Type | Description |
|---|---|
| int |
Id
Gets the integer identifier of the entity.
Declaration
public int Id { get; }
Property Value
| Type | Description |
|---|---|
| int |
Key
Gets the Guid unique identifier of the entity.
Declaration
public Guid Key { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
Level
Gets the level of the entity.
Declaration
public int Level { get; }
Property Value
| Type | Description |
|---|---|
| int |
Name
Gets the name of the entity.
Declaration
public string? Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
ParentId
Gets the identifier of the parent entity.
Declaration
public int ParentId { get; }
Property Value
| Type | Description |
|---|---|
| int |
Path
Gets the path to the entity.
Declaration
public string Path { get; }
Property Value
| Type | Description |
|---|---|
| string |
SortOrder
Gets the sort order of the entity.
Declaration
public int SortOrder { get; }
Property Value
| Type | Description |
|---|---|
| int |
UpdateDate
Gets the last update date.
Declaration
public DateTime UpdateDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
VersionId
Gets the version identifier.
Declaration
public int VersionId { get; }
Property Value
| Type | Description |
|---|---|
| int |
WriterId
Gets the identifier of the writer.
Declaration
public int WriterId { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
View SourceCreate(IContentBase)
Creates a new ReadOnlyContentBaseAdapter instance from an IContentBase.
Declaration
public static ReadOnlyContentBaseAdapter Create(IContentBase content)
Parameters
| Type | Name | Description |
|---|---|---|
| IContentBase | content | The content base to wrap. |
Returns
| Type | Description |
|---|---|
| ReadOnlyContentBaseAdapter | A read-only adapter for the specified content. |