Class ContentSchedule
Represents a scheduled action for a document.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models
Assembly: Umbraco.Core.dll
Syntax
[DataContract(IsReference = true)]
public class ContentSchedule : IDeepCloneable
Constructors
View SourceContentSchedule(Guid, string, DateTime, ContentScheduleAction)
Initializes a new instance of the ContentSchedule class.
Declaration
public ContentSchedule(Guid id, string culture, DateTime date, ContentScheduleAction action)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | id | |
| string | culture | |
| DateTime | date | |
| ContentScheduleAction | action |
ContentSchedule(string, DateTime, ContentScheduleAction)
Initializes a new instance of the ContentSchedule class.
Declaration
public ContentSchedule(string culture, DateTime date, ContentScheduleAction action)
Parameters
| Type | Name | Description |
|---|---|---|
| string | culture | |
| DateTime | date | |
| ContentScheduleAction | action |
Properties
View SourceAction
Gets the action to take.
Declaration
[DataMember]
public ContentScheduleAction Action { get; }
Property Value
| Type | Description |
|---|---|
| ContentScheduleAction |
Culture
Gets the culture of the scheduled action.
Declaration
[DataMember]
public string Culture { get; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
string.Empty represents the invariant culture.
Date
Gets the date of the scheduled action.
Declaration
[DataMember]
public DateTime Date { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
Id
Gets the unique identifier of the document targeted by the scheduled action.
Declaration
[DataMember]
public Guid Id { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid |
Methods
View SourceDeepClone()
Creates a deep clone of the current object.
Declaration
public object DeepClone()
Returns
| Type | Description |
|---|---|
| object | A deep clone of the current object. |
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Equals(ContentSchedule)
Determines whether this schedule is equal to another schedule.
Declaration
public bool Equals(ContentSchedule other)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentSchedule | other | The other schedule to compare. |
Returns
| Type | Description |
|---|---|
| bool |
|
Remarks
Two ContentSchedule instances are equal if they are for the same action, for the same culture, on the same date. The Id is not compared.
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |