Class ContentItemManagerSchedulingExtensions
- Namespace
- CMS.ContentEngine
- Assembly
- CMS.ContentEngine.dll
Extensions of IContentItemManager for scheduling.
public static class ContentItemManagerSchedulingExtensions
- Inheritance
-
objectContentItemManagerSchedulingExtensions
Methods
CancelScheduledPublish(IContentItemManager, int, string, CancellationToken)
Cancels scheduled publish of the content item.
[Obsolete("Use IContentItemManager.CancelScheduledPublish(int, string, CancellationToken) instead.")]
[ObsoleteSince(30, 1)]
public static Task CancelScheduledPublish(this IContentItemManager contentItemManager, int contentItemId, string languageName, CancellationToken cancellationToken = default)
Parameters
contentItemManager
IContentItemManagerContent item manager.
contentItemId
intContent item identifier.
languageName
stringLanguage codename.
cancellationToken
CancellationTokenCancellation instruction.
Returns
- Task
Remarks
The method also cancels scheduled unpublish if it was set.
CancelScheduledUnpublish(IContentItemManager, int, string, CancellationToken)
Cancels scheduled unpublish of the content item.
[Obsolete("Use IContentItemManager.CancelScheduledUnpublish(int, string, CancellationToken) instead.")]
[ObsoleteSince(30, 1)]
public static Task CancelScheduledUnpublish(this IContentItemManager contentItemManager, int contentItemId, string languageName, CancellationToken cancellationToken = default)
Parameters
contentItemManager
IContentItemManagerContent item manager.
contentItemId
intContent item identifier.
languageName
stringLanguage codename.
cancellationToken
CancellationTokenCancellation instruction.
Returns
- Task
IsPublishScheduled(IContentItemManager, int, string, CancellationToken)
Returns true when the item is scheduled for publish.
public static Task<bool> IsPublishScheduled(this IContentItemManager contentItemManager, int contentItemId, string languageName, CancellationToken cancellationToken = default)
Parameters
contentItemManager
IContentItemManagerContent item manager.
contentItemId
intContent item identifier.
languageName
stringLanguage codename.
cancellationToken
CancellationTokenCancellation instruction.
Returns
- Task<bool>
IsUnpublishScheduled(IContentItemManager, int, string, CancellationToken)
Returns true when the item is scheduled for unpublish.
public static Task<bool> IsUnpublishScheduled(this IContentItemManager contentItemManager, int contentItemId, string languageName, CancellationToken cancellationToken = default)
Parameters
contentItemManager
IContentItemManagerContent item manager.
contentItemId
intContent item identifier.
languageName
stringLanguage codename.
cancellationToken
CancellationTokenCancellation instruction.
Returns
- Task<bool>
SchedulePublish(IContentItemManager, int, string, DateTime, CancellationToken)
Schedules publish of the content item.
[Obsolete("Use IContentItemManager.SchedulePublish(int, string, DateTime, CancellationToken) instead.")]
[ObsoleteSince(30, 1)]
public static Task SchedulePublish(this IContentItemManager contentItemManager, int contentItemId, string languageName, DateTime scheduledTime, CancellationToken cancellationToken = default)
Parameters
contentItemManager
IContentItemManagerContent item manager.
contentItemId
intContent item identifier.
languageName
stringLanguage codename.
scheduledTime
DateTimeDate and time when the content item should be published.
cancellationToken
CancellationTokenCancellation instruction.
Returns
- Task
ScheduleUnpublish(IContentItemManager, int, string, DateTime, CancellationToken)
Schedules unpublish of the content item.
[Obsolete("Use IContentItemManager.ScheduleUnpublish(int, string, DateTime, CancellationToken) instead.")]
[ObsoleteSince(30, 1)]
public static Task ScheduleUnpublish(this IContentItemManager contentItemManager, int contentItemId, string languageName, DateTime scheduledTime, CancellationToken cancellationToken = default)
Parameters
contentItemManager
IContentItemManagerContent item manager.
contentItemId
intContent item identifier.
languageName
stringLanguage codename.
scheduledTime
DateTimeDate and time when the content item should be unpublished.
cancellationToken
CancellationTokenCancellation instruction.
Returns
- Task