|
@@ -7,17 +7,17 @@ namespace Quadarax.Foundation.Core.Business.Processor.Queue
|
|
|
public delegate void ItemAddedCallback(ITaskItem item);
|
|
public delegate void ItemAddedCallback(ITaskItem item);
|
|
|
public delegate void ProcessorStartedCallback(ITaskItem item);
|
|
public delegate void ProcessorStartedCallback(ITaskItem item);
|
|
|
public delegate void ProcessorStoppedCallback(ITaskItem item);
|
|
public delegate void ProcessorStoppedCallback(ITaskItem item);
|
|
|
- public delegate void ProcessorErrorCallback(string message, Exception e);
|
|
|
|
|
|
|
+ public delegate void ProcessorErrorCallback(string message, Exception? e);
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
public class CallbackDelegates
|
|
public class CallbackDelegates
|
|
|
{
|
|
{
|
|
|
#region *** Public properties ***
|
|
#region *** Public properties ***
|
|
|
- public ItemProcessedCallback OnItemProcessed { get; set; }
|
|
|
|
|
- public ItemAddedCallback OnItemAdded { get; set; }
|
|
|
|
|
- public ProcessorStartedCallback OnProcessorStarted { get; set; }
|
|
|
|
|
- public ProcessorStoppedCallback OnProcessorStopped { get; set; }
|
|
|
|
|
- public ProcessorErrorCallback OnProcessorError { get; set; }
|
|
|
|
|
|
|
+ public ItemProcessedCallback? OnItemProcessed { get; set; }
|
|
|
|
|
+ public ItemAddedCallback? OnItemAdded { get; set; }
|
|
|
|
|
+ public ProcessorStartedCallback? OnProcessorStarted { get; set; }
|
|
|
|
|
+ public ProcessorStoppedCallback? OnProcessorStopped { get; set; }
|
|
|
|
|
+ public ProcessorErrorCallback? OnProcessorError { get; set; }
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region *** Constructors ***
|
|
#region *** Constructors ***
|
|
@@ -25,5 +25,17 @@ namespace Quadarax.Foundation.Core.Business.Processor.Queue
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region *** Public operations ***
|
|
|
|
|
+
|
|
|
|
|
+ public void Reset()
|
|
|
|
|
+ {
|
|
|
|
|
+ OnItemProcessed = null;
|
|
|
|
|
+ OnItemAdded = null;
|
|
|
|
|
+ OnProcessorStarted = null;
|
|
|
|
|
+ OnProcessorStopped = null;
|
|
|
|
|
+ OnProcessorError = null;
|
|
|
|
|
+ }
|
|
|
|
|
+ #endregion
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|