View Source
Class ContentScheduleCollection
Assembly: Umbraco.Core.dll
Syntax
public class ContentScheduleCollection : IDeepCloneable
Properties
View Source
FullSchedule
Returns all schedules registered
Declaration
public IReadOnlyList<ContentSchedule> FullSchedule { get; }
Property Value
Methods
View Source
Add(DateTime?, DateTime?)
Adds a new schedule for invariant content
Declaration
public bool Add(DateTime? releaseDate, DateTime? expireDate)
Parameters
| Type |
Name |
Description |
| DateTime? |
releaseDate |
|
| DateTime? |
expireDate |
|
Returns
View Source
Add(string?, DateTime?, DateTime?)
Adds a new schedule for a culture
Declaration
public bool Add(string? culture, DateTime? releaseDate, DateTime? expireDate)
Parameters
| Type |
Name |
Description |
| string |
culture |
|
| DateTime? |
releaseDate |
|
| DateTime? |
expireDate |
|
Returns
| Type |
Description |
| bool |
true if successfully added, false if validation fails
|
View Source
Add(ContentSchedule)
Declaration
public void Add(ContentSchedule schedule)
Parameters
View Source
AddOrUpdate(string, DateTime, ContentScheduleAction)
Declaration
public void AddOrUpdate(string culture, DateTime dateTime, ContentScheduleAction action)
Parameters
View Source
Clear(string?, ContentScheduleAction, DateTime?)
Clear all of the scheduled change type for the culture
Declaration
public void Clear(string? culture, ContentScheduleAction action, DateTime? date = null)
Parameters
| Type |
Name |
Description |
| string |
culture |
|
| ContentScheduleAction |
action |
|
| DateTime? |
date |
If specified, will clear all entries with dates less than or equal to the value
|
View Source
Clear(ContentScheduleAction, DateTime?)
Clear all of the scheduled change type for invariant content
Declaration
public void Clear(ContentScheduleAction action, DateTime? changeDate = null)
Parameters
| Type |
Name |
Description |
| ContentScheduleAction |
action |
|
| DateTime? |
changeDate |
If specified, will clear all entries with dates less than or equal to the value
|
View Source
ClearCollectionChangedEvents()
Declaration
public void ClearCollectionChangedEvents()
View Source
CreateWithEntry(DateTime?, DateTime?)
Declaration
public static ContentScheduleCollection CreateWithEntry(DateTime? release, DateTime? expire)
Parameters
| Type |
Name |
Description |
| DateTime? |
release |
|
| DateTime? |
expire |
|
Returns
View Source
CreateWithEntry(string, DateTime?, DateTime?)
Declaration
public static ContentScheduleCollection CreateWithEntry(string culture, DateTime? release, DateTime? expire)
Parameters
| Type |
Name |
Description |
| string |
culture |
|
| DateTime? |
release |
|
| DateTime? |
expire |
|
Returns
View Source
DeepClone()
Declaration
public object DeepClone()
Returns
View Source
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
The object to compare with the current object.
|
Returns
| Type |
Description |
| bool |
true if the specified object is equal to the current object; otherwise, false.
|
View Source
Equals(ContentScheduleCollection?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(ContentScheduleCollection? other)
Parameters
Returns
| Type |
Description |
| bool |
true if the current object is equal to the other parameter; otherwise, false.
|
View Source
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| int |
A hash code for the current object.
|
View Source
GetPending(ContentScheduleAction, DateTime)
Returns all pending schedules based on the date and type provided
Declaration
public IReadOnlyList<ContentSchedule> GetPending(ContentScheduleAction action, DateTime date)
Parameters
Returns
View Source
GetSchedule(ContentScheduleAction?)
Gets the schedule for invariant content
Declaration
public IEnumerable<ContentSchedule> GetSchedule(ContentScheduleAction? action = null)
Parameters
Returns
View Source
GetSchedule(string?, ContentScheduleAction?)
Gets the schedule for a culture
Declaration
public IEnumerable<ContentSchedule> GetSchedule(string? culture, ContentScheduleAction? action = null)
Parameters
Returns
View Source
Remove(ContentSchedule)
Remove a scheduled change
Declaration
public void Remove(ContentSchedule change)
Parameters
View Source
RemoveIfExists(string, ContentScheduleAction)
Declaration
public void RemoveIfExists(string culture, ContentScheduleAction action)
Parameters
Events
View Source
CollectionChanged
Occurs when the collection changes.
Declaration
public event NotifyCollectionChangedEventHandler? CollectionChanged
Event Type
| Type |
Description |
| NotifyCollectionChangedEventHandler |
|