November Happy Hour will be moved to Thursday December 5th.

Class BatchPublisher

Handles batch operations on content versions in relation to publishing.

Inheritance
System.Object
BatchPublisher
Namespace: EPiServer.Core.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
[ServiceConfiguration]
public class BatchPublisher : Object

Constructors

BatchPublisher(ContentRepository, IContentProviderManager, IBatchPublishSortingStrategy, TaskExecutor)

Constructor for BatchPublisher

Declaration
public BatchPublisher(ContentRepository contentRepository, IContentProviderManager providerManager, IBatchPublishSortingStrategy sortingStrategy, TaskExecutor taskExecutor)
Parameters
Type Name Description
ContentRepository contentRepository

The content repository.

IContentProviderManager providerManager

The provider manager used to check provider capabilities.

IBatchPublishSortingStrategy sortingStrategy

Object responsible for the sorting of content items before publishing them.

TaskExecutor taskExecutor

The task executor responsible for running publishing tasks.

Methods

Cancel(Guid)

Sends a cancellation signal to a publishing task with the specified id.

Declaration
public virtual Task Cancel(Guid trackingTokenId)
Parameters
Type Name Description
System.Guid trackingTokenId

The tracking token id associated with the publishing task.

Returns
Type Description
System.Threading.Tasks.Task

The Task that was cancelled or null if no task was found.

CancelDelayedPublishing(IEnumerable<ContentReference>, AccessLevel, CancellationToken, IProgress<BatchProgress>)

Starts a task to cancel any delayed publishing setup for the specified versions.

Declaration
public Task CancelDelayedPublishing(IEnumerable<ContentReference> versions, AccessLevel accessLevel, CancellationToken cancellationToken, IProgress<BatchProgress> progress)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> versions

The versions for which to cancel the delayed publishing.

AccessLevel accessLevel

The access level required to complete this task.

System.Threading.CancellationToken cancellationToken

The cancellation token used to signal if the task should be cancelled before completion.

System.IProgress<BatchProgress> progress

The instance upon which progress is reported to.

Returns
Type Description
System.Threading.Tasks.Task

The task that performs the cancelling operation.

PublishAsync(IEnumerable<ContentReference>)

Starts a task to publish the specified versions.

Declaration
public Task PublishAsync(IEnumerable<ContentReference> versions)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> versions

The versions to publish.

Returns
Type Description
System.Threading.Tasks.Task

The task that performs the publish operation.

PublishAsync(IEnumerable<ContentReference>, AccessLevel)

Starts a task to publish the specified versions.

Declaration
public Task PublishAsync(IEnumerable<ContentReference> versions, AccessLevel accessLevel)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> versions

The versions to publish.

AccessLevel accessLevel

The access level to check.

Returns
Type Description
System.Threading.Tasks.Task

The task that performs the publish operation.

PublishAsync(IEnumerable<ContentReference>, Nullable<DateTime>)

Starts a task to publish the specified versions.

Declaration
public Task PublishAsync(IEnumerable<ContentReference> versions, Nullable<DateTime> delayPublishUntil)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> versions

The versions to publish.

System.Nullable<System.DateTime> delayPublishUntil
Returns
Type Description
System.Threading.Tasks.Task

The task that performs the publish operation.

PublishAsync(IEnumerable<ContentReference>, Nullable<DateTime>, AccessLevel)

Starts a task to publish the specified versions.

Declaration
public Task PublishAsync(IEnumerable<ContentReference> versions, Nullable<DateTime> delayPublishUntil, AccessLevel accessLevel)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> versions

The versions to publish.

System.Nullable<System.DateTime> delayPublishUntil
AccessLevel accessLevel

The access level to check.

Returns
Type Description
System.Threading.Tasks.Task

The task that performs the publish operation.

PublishAsync(IEnumerable<ContentReference>, Nullable<DateTime>, AccessLevel, TrackingToken)

Starts a task to publish the specified versions.

Declaration
public Task PublishAsync(IEnumerable<ContentReference> versions, Nullable<DateTime> delayPublishUntil, AccessLevel accessLevel, TrackingToken trackingToken)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> versions

The versions to publish.

System.Nullable<System.DateTime> delayPublishUntil
AccessLevel accessLevel

The access level to check.

TrackingToken trackingToken

The trackingtoken that will be associated with the task so it can be tracked.

Returns
Type Description
System.Threading.Tasks.Task

The task that performs the publish operation.

Extension Methods