Class BaseStarter
Starter base class.
public abstract class BaseStarter : BaseModel, IStarter, IModel, IDisposable
- Inheritance
-
BaseStarter
- Implements
- Derived
- Inherited Members
- Extension Methods
Remarks
Convenients base class for implementators of the IStarter interface.
Constructors
BaseStarter()
protected BaseStarter()
Fields
RUN_PROPERTY_PREFIX
Prefix for configuration properties that are to be copied as run/starter properties (with prefix stripped off).
public const string RUN_PROPERTY_PREFIX = "RUN-PROP-"
Field Value
isEnabled
Enambled state
protected bool isEnabled
Field Value
Properties
Enabled
Starter enable status
public bool Enabled { get; set; }
Property Value
Methods
ChangeEnabledState(bool)
Internal enabled state change.
protected abstract void ChangeEnabledState(bool enabled)
Parameters
enabled
bool
Remarks
Called from Enabled setter (hence must not call the enabled setter to set new state!).
Dispose(bool)
Internal Dispose.
protected override void Dispose(bool disposing)
Parameters
disposing
bool
Remarks
Managed resources should only be disposed when disposing
== true.
DoActivate(IReadOnlyDictionary<string, object?>?)
Manually activate the Starter.
public virtual bool DoActivate(IReadOnlyDictionary<string, object?>? invocationProps)
Parameters
invocationProps
IReadOnlyDictionary<string, object>
Returns
- bool
true if actually at least one jobs has been activated, false if no job at all was activated (because the starter was disabled or no jobs are configured...
Initialize(string, string, IReadOnlyDictionary<string, object?>)
Initialize a Starter
public IStarter Initialize(string name, string description, IReadOnlyDictionary<string, object?> properties)
Parameters
name
stringUnique Starter name/ID
description
stringStarter description
properties
IReadOnlyDictionary<string, object>Properties dictionary
Returns
- IStarter
Should return this.(Utility to create instances like:
var triggger= new Starter().Initialize(name, description, properties);
)
Remarks
Implementations should initialize a Starter as 'disabled' (i.e. IStarter.enabled == false
)
in order to let the runtime enable Starters after configuration loading.
InternalInit()
Internal Starter initalization.
protected abstract IStarter InternalInit()
Returns
Remarks
Called from Initialize()
after name, description and properties have been set.
Events
Activate
Event to be registered by Job(s)
public event StarterActivator? Activate