Class QueryRunnerProcessor
A processor for processing al the query runner elements together
See https://web.lemonedge.com/help/query-runners/ for more information
Inheritance
Inherited Members
Namespace: LemonEdge.API.Processors
Assembly: API.dll
Syntax
public class QueryRunnerProcessor : IBaseDataSetProcessorWithDBSave, IBaseDataSetProcessor, IProcessor, IDisposable
Fields
OnStepParametersChanged
Declaration
public EventHandler OnStepParametersChanged
Field Value
Type | Description |
---|---|
System.EventHandler |
Properties
Cache
A local cache for performance
Declaration
public IReadOnlyCache Cache { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCache |
IgnoreEvents
Indicates the processor should ignore changes to any items within the processor
Normally used when the processor responds to an event and wants to prevent any other responses while it finishes processing that change
Declaration
public bool IgnoreEvents { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Loaded
Flag to indicate if the processor has been fully loaded
Declaration
public bool Loaded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Order
If we have multiple save processors working, this indicates the order in which they will be processed with relation to each other
Declaration
public short Order { get; }
Property Value
Type | Description |
---|---|
System.Int16 |
Reporter
A reporter to provide feedback to a log, or client depending on the context the process is running under
Declaration
public BusyProgressReporter Reporter { get; set; }
Property Value
Type | Description |
---|---|
BusyProgressReporter |
SaveProcessed
Declaration
public bool SaveProcessed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Steps
All the steps in this query runner
Declaration
public IEnumerable<IQueryRunnerStep> Steps { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IQueryRunnerStep> |
Updater
A context to ensure the process can query, load and modify all LemonEdge data
Declaration
public IEntityUpdater Updater { get; }
Property Value
Type | Description |
---|---|
IEntityUpdater |
User
The current logged in user the process is running under
Declaration
public UserInfo User { get; }
Property Value
Type | Description |
---|---|
UserInfo |
Methods
AddToDataSetToProcess(IBaseEntity, EntityOperation)
Adds the specified IQueryRunner or IQueryRunnerStep, or IQueryRunnerStepParameter to this processor
Declaration
public void AddToDataSetToProcess(IBaseEntity item, EntityOperation operationType)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | item | The IQueryRunner or IQueryRunnerStep, or IQueryRunnerStepParameter to add that is a part of this processor |
EntityOperation | operationType | The type of modification this item has |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
EnsureAllParametersForStepLoaded(IQueryRunnerStep)
Automatically updates all parameters for the specified step to contain links to the current parameters for the step.
Declaration
public Task EnsureAllParametersForStepLoaded(IQueryRunnerStep step)
Parameters
Type | Name | Description |
---|---|---|
IQueryRunnerStep | step | The step to create the associated parameters for automatically |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |
GetGlobalParameters()
Returns the list of global parameters for running this query runner
LoadParameters() must be called first
Declaration
public IEnumerable<ISQLTypeWrapper> GetGlobalParameters()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ISQLTypeWrapper> | The list of global parameters for running this query runner |
GetParameter(IQueryRunnerStepParameter)
Returns the actual sql type wrapper for the specified IQueryRunnerStepParameter
LoadParameters() must be called first
Declaration
public ISQLTypeWrapper GetParameter(IQueryRunnerStepParameter parameter)
Parameters
Type | Name | Description |
---|---|---|
IQueryRunnerStepParameter | parameter | The step parameter to return the sql wrapper type param for |
Returns
Type | Description |
---|---|
ISQLTypeWrapper | The actual sql type wrapper for the specified SQLWrapperParameterID |
IsChangedItemPartOfDataSet(IBaseEntity)
Returns true for a IQueryRunner or IQueryRunnerStep, or IQueryRunnerStepParameter that is part of the path this processor handles
Declaration
public bool IsChangedItemPartOfDataSet(IBaseEntity item)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | item | The item to see if it belongs in this processor |
Returns
Type | Description |
---|---|
System.Boolean | True for a IQueryRunner or IQueryRunnerStep, or IQueryRunnerStepParameter that is part of the path this processor handles |
Load()
A thread safe implementation to load all required data for the processor
Once completed Loaded should return true.
Declaration
public Task Load()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the load operation |
LoadParameters()
Must be called before
Declaration
public Task LoadParameters()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |
OnAddStep(IQueryRunnerStep)
Adds the new specified step into the processor
Declaration
public Task OnAddStep(IQueryRunnerStep step)
Parameters
Type | Name | Description |
---|---|---|
IQueryRunnerStep | step | The newly created step to add into the processor |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |
OnRemoveStep(IQueryRunnerStep)
Removes the specified step from the processor
Declaration
public void OnRemoveStep(IQueryRunnerStep step)
Parameters
Type | Name | Description |
---|---|---|
IQueryRunnerStep | step | THe step to be removed from the processor |
Parameters(IQueryRunnerStep)
Returns the list of parameters configured against the specified step
Declaration
public IEnumerable<IQueryRunnerStepParameter> Parameters(IQueryRunnerStep forStep)
Parameters
Type | Name | Description |
---|---|---|
IQueryRunnerStep | forStep | The step to return the parameters for |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IQueryRunnerStepParameter> | The list of parameters configured against the specified step |
ProcessOnDBSave()
Declaration
public Task ProcessOnDBSave()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |