Search Results for

    Show / Hide Table of Contents
    View Source

    Class ContentVersionMeta

    Represents metadata about a content version.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    public class ContentVersionMeta
    Remarks

    This class contains information about a specific version of content, including the user who created it, the date, and whether it's the current published or draft version.

    Constructors

    View Source

    ContentVersionMeta()

    Initializes a new instance of the ContentVersionMeta class.

    Declaration
    public ContentVersionMeta()
    View Source

    ContentVersionMeta(int, int, int, int, DateTime, bool, bool, bool, string)

    Initializes a new instance of the ContentVersionMeta class with the specified values.

    Declaration
    public ContentVersionMeta(int versionId, int contentId, int contentTypeId, int userId, DateTime versionDate, bool currentPublishedVersion, bool currentDraftVersion, bool preventCleanup, string username)
    Parameters
    Type Name Description
    int versionId

    The version identifier.

    int contentId

    The content identifier.

    int contentTypeId

    The content type identifier.

    int userId

    The identifier of the user who created this version.

    DateTime versionDate

    The date and time when this version was created.

    bool currentPublishedVersion

    A value indicating whether this is the current published version.

    bool currentDraftVersion

    A value indicating whether this is the current draft version.

    bool preventCleanup

    A value indicating whether this version should be prevented from cleanup.

    string username

    The username of the user who created this version.

    Properties

    View Source

    ContentId

    Gets the content identifier.

    Declaration
    public int ContentId { get; }
    Property Value
    Type Description
    int
    View Source

    ContentTypeId

    Gets the content type identifier.

    Declaration
    public int ContentTypeId { get; }
    Property Value
    Type Description
    int
    View Source

    CurrentDraftVersion

    Gets a value indicating whether this is the current draft version.

    Declaration
    public bool CurrentDraftVersion { get; }
    Property Value
    Type Description
    bool
    View Source

    CurrentPublishedVersion

    Gets a value indicating whether this is the current published version.

    Declaration
    public bool CurrentPublishedVersion { get; }
    Property Value
    Type Description
    bool
    View Source

    PreventCleanup

    Gets a value indicating whether this version should be prevented from automatic cleanup.

    Declaration
    public bool PreventCleanup { get; }
    Property Value
    Type Description
    bool
    View Source

    UserId

    Gets the identifier of the user who created this version.

    Declaration
    public int UserId { get; }
    Property Value
    Type Description
    int
    View Source

    Username

    Gets the username of the user who created this version.

    Declaration
    public string? Username { get; }
    Property Value
    Type Description
    string
    View Source

    VersionDate

    Gets the date and time when this version was created.

    Declaration
    public DateTime VersionDate { get; }
    Property Value
    Type Description
    DateTime
    View Source

    VersionId

    Gets the version identifier.

    Declaration
    public int VersionId { get; }
    Property Value
    Type Description
    int

    Methods

    View Source

    EnsureUtc()

    Ensures the VersionDate is in UTC format.

    Declaration
    public void EnsureUtc()
    View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX