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 SourceContentAndSettingsReference(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. |
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 SourceContentKey
Gets or sets the content key.
Declaration
public Guid ContentKey { readonly get; set; }
Property Value
| Type | Description |
|---|---|
| Guid | The content key. |
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. |
SettingsKey
Gets or sets the settings key.
Declaration
public Guid? SettingsKey { readonly get; set; }
Property Value
| Type | Description |
|---|---|
| Guid? | The settings key. |
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 SourceEquals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Equals(ContentAndSettingsReference)
Declaration
public bool Equals(ContentAndSettingsReference other)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentAndSettingsReference | other |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Operators
View Sourceoperator ==(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 |
|
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 |
|