Search Results for

    Show / Hide Table of Contents
    View Source

    Struct ContentAndSettingsReference

    Represents a reference to block content and settings data.

    Namespace: Umbraco.Cms.Core.Models.Blocks
    Assembly: Umbraco.Core.dll
    Syntax
    public struct ContentAndSettingsReference

    Constructors

    View Source

    ContentAndSettingsReference(Guid, Guid?)

    Initializes a new instance of the ContentAndSettingsReference struct.

    Declaration
    public ContentAndSettingsReference(Guid contentKey, Guid? settingsKey)
    Parameters
    Type Name Description
    Guid contentKey

    The content key.

    Guid? settingsKey

    The settings key.

    View Source

    ContentAndSettingsReference(Udi?, Udi?)

    Initializes a new instance of the ContentAndSettingsReference struct.

    Declaration
    [Obsolete("Use constructor that accepts GUIDs instead. Scheduled for removal in Umbraco 18.")]
    public ContentAndSettingsReference(Udi? contentUdi, Udi? settingsUdi)
    Parameters
    Type Name Description
    Udi contentUdi

    The content UDI.

    Udi settingsUdi

    The settings UDI.

    Properties

    View Source

    ContentKey

    Gets or sets the content key.

    Declaration
    public Guid ContentKey { readonly get; set; }
    Property Value
    Type Description
    Guid

    The content key.

    View Source

    ContentUdi

    Gets the content UDI.

    Declaration
    [Obsolete("Use ContentKey instead. Scheduled for removal in Umbraco 18.")]
    public readonly Udi ContentUdi { get; }
    Property Value
    Type Description
    Udi

    The content UDI.

    View Source

    SettingsKey

    Gets or sets the settings key.

    Declaration
    public Guid? SettingsKey { readonly get; set; }
    Property Value
    Type Description
    Guid?

    The settings key.

    View Source

    SettingsUdi

    Gets the settings UDI.

    Declaration
    [Obsolete("Use SettingsKey instead. Scheduled for removal in Umbraco 18.")]
    public readonly Udi? SettingsUdi { get; }
    Property Value
    Type Description
    Udi

    The settings UDI.

    Methods

    View Source

    Equals(object?)

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    View Source

    Equals(ContentAndSettingsReference)

    Declaration
    public bool Equals(ContentAndSettingsReference other)
    Parameters
    Type Name Description
    ContentAndSettingsReference other
    Returns
    Type Description
    bool
    View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Operators

    View Source

    operator ==(ContentAndSettingsReference, ContentAndSettingsReference)

    Determines whether two ContentAndSettingsReference instances are equal.

    Declaration
    public static bool operator ==(ContentAndSettingsReference left, ContentAndSettingsReference right)
    Parameters
    Type Name Description
    ContentAndSettingsReference left

    The left instance.

    ContentAndSettingsReference right

    The right instance.

    Returns
    Type Description
    bool

    true if the instances are equal; otherwise, false.

    View Source

    operator !=(ContentAndSettingsReference, ContentAndSettingsReference)

    Determines whether two ContentAndSettingsReference instances are not equal.

    Declaration
    public static bool operator !=(ContentAndSettingsReference left, ContentAndSettingsReference right)
    Parameters
    Type Name Description
    ContentAndSettingsReference left

    The left instance.

    ContentAndSettingsReference right

    The right instance.

    Returns
    Type Description
    bool

    true if the instances are not equal; otherwise, false.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX