Interface IElementPublishingService
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface IElementPublishingService
Methods
View SourcePublishAsync(Guid, ICollection<CulturePublishScheduleModel>, Guid)
Publishes an element.
Declaration
Task<Attempt<ContentPublishingResult, ContentPublishingOperationStatus>> PublishAsync(Guid key, ICollection<CulturePublishScheduleModel> culturesToPublishOrSchedule, Guid userKey)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | key | The key of the element. |
| ICollection<CulturePublishScheduleModel> | culturesToPublishOrSchedule | The cultures to publish or schedule. |
| Guid | userKey | The identifier of the user performing the operation. |
Returns
| Type | Description |
|---|---|
| Task<Attempt<ContentPublishingResult, ContentPublishingOperationStatus>> |
UnpublishAsync(Guid, ISet<string>?, Guid)
Unpublishes multiple cultures of an element.
Declaration
Task<Attempt<ContentPublishingOperationStatus>> UnpublishAsync(Guid key, ISet<string>? cultures, Guid userKey)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | key | The key of the element. |
| ISet<string> | cultures | The cultures to unpublish. Use null to unpublish all cultures. |
| Guid | userKey | The identifier of the user performing the operation. |
Returns
| Type | Description |
|---|---|
| Task<Attempt<ContentPublishingOperationStatus>> | Status of the publish operation. |