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
-
objectBlockPublishingSettingsService
- 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
workSequenceIWorkSequence<IWorkBlockPublishingLookup, BlockPublishingSettings>DI injected list of IWorkBlockPublishingLookup parts.
Fields
Cache
Cache
protected static readonly ConcurrentDictionary<int, PublishingModes> Cache
Field Value
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
workCtxWorkContextpackagePackage<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
packagePackage<BlockPublishingSettings>modePublishingModes
Returns
- Package<BlockPublishingSettings>