This commit is contained in:
Paul Schneider 2026-02-14 16:54:27 +00:00
commit 45514010f2
3505 changed files with 154 additions and 523 deletions

View file

@ -1,17 +0,0 @@
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Yavsc.Abstract.Workflow
{
public interface IExecutionData
{
Task Payload { get; }
ITaskMetaData MetaData { get; }
string [] Args { get; }
IList<IMayBeFixable> Faults { get; }
}
}

View file

@ -1,9 +0,0 @@
namespace Yavsc.Abstract.Workflow
{
public interface IMayBeFixable
{
bool Fixable { get; }
void TryAndFix();
}
}

View file

@ -1,7 +0,0 @@
namespace Yavsc.Models
{
public interface IRequisition
{
bool Eval();
}
}

View file

@ -1,11 +0,0 @@
using System.Collections.Generic;
using Yavsc.Models;
namespace Yavsc.Abstract.Workflow
{
public interface ITaskMetaData
{
string TaskName { get; }
IEnumerable <IRequisition> Prerequisites { get; }
}
}

View file

@ -1,7 +0,0 @@
namespace Yavsc.Abstract.Workflow
{
public interface ITaskRunner
{
IExecutionData Run( ITaskMetaData taskMetaData, string [] args);
}
}

View file

@ -1,8 +0,0 @@
namespace Yavsc.Abstract.Workflow
{
public interface ITaskRunnerProvider
{
ITaskRunner[] FindRunner(string runnerName);
}
}

View file

@ -1,20 +0,0 @@
using System.Collections.Generic;
using System.Linq;
namespace Yavsc.Abstract.Workflow
{
public class TaskManager : ITaskRunnerProvider
{
List<ITaskRunner> runners = new List<ITaskRunner>();
public void Register(ITaskRunner runner)
{
runners.Add(runner);
}
public ITaskRunner[] FindRunner(string runnerName)
{
if (string.IsNullOrWhiteSpace(runnerName))
return runners.ToArray();
return runners.Where(r => r.GetType().Name.IndexOf(runnerName.Trim())>=0).ToArray();
}
}
}