Table of Contents

Class BlockPublishingSettingsService

Namespace
ToSic.Sxc.Cms.Publishing.Sys
Assembly
ToSic.Sxc.Cms.dll

Work service to figure out if a block/page must be versioned.

[InternalApi_DoNotUse_MayChangeWithoutNotice]
public class BlockPublishingSettingsService : ServiceBase, IHasLog
Inheritance
object
BlockPublishingSettingsService
Implements
Inherited Members

Constructors

BlockPublishingSettingsService(IWorkSequence<IWorkBlockPublishingLookup, BlockPublishingSettings>)

Work service to figure out if a block/page must be versioned.

public BlockPublishingSettingsService(IWorkSequence<IWorkBlockPublishingLookup, BlockPublishingSettings> workSequence)

Parameters

workSequence IWorkSequence<IWorkBlockPublishingLookup, BlockPublishingSettings>

DI injected list of IWorkBlockPublishingLookup parts.

Fields

Cache

Cache

protected static readonly ConcurrentDictionary<int, PublishingModes> Cache

Field Value

ConcurrentDictionary<int, PublishingModes>

Methods

Handle(WorkContext, Package<BlockPublishingSettings>)

The main work. Uses static cache as the settings shouldn't really change at runtime.

public Task<Package<BlockPublishingSettings>> Handle(WorkContext workCtx, Package<BlockPublishingSettings> package)

Parameters

workCtx WorkContext
package Package<BlockPublishingSettings>

Returns

Task<Package<BlockPublishingSettings>>

Stop(Package<BlockPublishingSettings>, PublishingModes)

Helper to repackage the result.

public static Package<BlockPublishingSettings> Stop(Package<BlockPublishingSettings> package, PublishingModes mode)

Parameters

package Package<BlockPublishingSettings>
mode PublishingModes

Returns

Package<BlockPublishingSettings>