Table of Contents

Class ContentItemManagerSchedulingExtensions

Namespace
CMS.ContentEngine
Assembly
CMS.ContentEngine.dll

Extensions of IContentItemManager for scheduling.

public static class ContentItemManagerSchedulingExtensions
Inheritance
object
ContentItemManagerSchedulingExtensions

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 IContentItemManager

Content item manager.

contentItemId int

Content item identifier.

languageName string

Language codename.

cancellationToken CancellationToken

Cancellation 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 IContentItemManager

Content item manager.

contentItemId int

Content item identifier.

languageName string

Language codename.

cancellationToken CancellationToken

Cancellation 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 IContentItemManager

Content item manager.

contentItemId int

Content item identifier.

languageName string

Language codename.

cancellationToken CancellationToken

Cancellation 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 IContentItemManager

Content item manager.

contentItemId int

Content item identifier.

languageName string

Language codename.

cancellationToken CancellationToken

Cancellation 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 IContentItemManager

Content item manager.

contentItemId int

Content item identifier.

languageName string

Language codename.

scheduledTime DateTime

Date and time when the content item should be published.

cancellationToken CancellationToken

Cancellation 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 IContentItemManager

Content item manager.

contentItemId int

Content item identifier.

languageName string

Language codename.

scheduledTime DateTime

Date and time when the content item should be unpublished.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task