REORG
This commit is contained in:
parent
8d68ee380a
commit
45514010f2
3505 changed files with 154 additions and 523 deletions
|
|
@ -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; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface IMayBeFixable
|
||||
{
|
||||
bool Fixable { get; }
|
||||
|
||||
void TryAndFix();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
namespace Yavsc.Models
|
||||
{
|
||||
public interface IRequisition
|
||||
{
|
||||
bool Eval();
|
||||
}
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface ITaskRunner
|
||||
{
|
||||
IExecutionData Run( ITaskMetaData taskMetaData, string [] args);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface ITaskRunnerProvider
|
||||
{
|
||||
ITaskRunner[] FindRunner(string runnerName);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue