Interface IBaseDataSetProcessor
This is the base interface for all processors that can be handled by the system
Entities can be associated with processors and can be loaded from
Inherited Members
Namespace: LemonEdge.API.Processors
Assembly: API.dll
Syntax
public interface IBaseDataSetProcessor : IProcessor, IDisposable
Properties
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
bool IgnoreEvents { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Loaded
Flag to indicate if the processor has been fully loaded
Declaration
bool Loaded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
AddToDataSetToProcess(IBaseEntity, EntityOperation)
If a modified item belongs in the processor (IsChangedItemPartOfDataSet(IBaseEntity)), this adds the item to the processor if it already isn't a member of it
Declaration
void AddToDataSetToProcess(IBaseEntity item, EntityOperation operationType)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | item | The item to add to the processor |
EntityOperation | operationType | The type of operation that modified the item. Useful as deleted items can often be treated differently in a processor. |
IsChangedItemPartOfDataSet(IBaseEntity)
This function returns true if the specified modified item belongs in this processor.
Non modified items will just automatically be loaded by the processor anyway, this is more to keep track of items as they are changed and should be added to the processor without having to reload
Declaration
bool IsChangedItemPartOfDataSet(IBaseEntity item)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | item | The item to check if it belongs in this processor |
Returns
Type | Description |
---|---|
System.Boolean | True if the specified item belongs in this processor |
Load()
A thread safe implementation to load all required data for the processor
Once completed Loaded should return true.
Declaration
Task Load()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the load operation |