| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- using System;
- using System.Threading.Tasks;
- using Quadarax.Foundation.Core.Logging;
- namespace Quadarax.Foundation.Core.Thread
- {
- public class ContinousWorker : AbstractWorker
- {
- #region *** Private fields ***
- private Action _body;
- #endregion
- #region *** Properties ***
- #endregion
- #region *** Constructors ***
- public ContinousWorker(Action body = null) : base()
- {
- _body = body;
- }
- public ContinousWorker(string workerName, IQLogger logger = null) : base(workerName,null, logger)
- {
- }
- #endregion
- #region *** Public Operations ***
- #endregion
- #region *** Virtuals and protected ***
- protected override async Task Do(IWorkerContext context)
- {
- _body?.Invoke();
- }
- #endregion
- #region *** Private Operations ***
- #endregion
- }
- }
|