tasks++
This commit is contained in:
parent
d4ae765bb5
commit
7c2c2621f0
7 changed files with 41 additions and 1 deletions
17
Yavsc.Abstract/Workflow/Tasks/IExecutionData.cs
Normal file
17
Yavsc.Abstract/Workflow/Tasks/IExecutionData.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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; }
|
||||
|
||||
}
|
||||
}
|
||||
9
Yavsc.Abstract/Workflow/Tasks/IMayBeFixable.cs
Normal file
9
Yavsc.Abstract/Workflow/Tasks/IMayBeFixable.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface IMayBeFixable
|
||||
{
|
||||
bool Fixable { get; }
|
||||
|
||||
void TryAndFix();
|
||||
}
|
||||
}
|
||||
11
Yavsc.Abstract/Workflow/Tasks/IRequisition.cs
Normal file
11
Yavsc.Abstract/Workflow/Tasks/IRequisition.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Abstract.Workflow;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
public interface IRequisition
|
||||
{
|
||||
bool Eval();
|
||||
}
|
||||
}
|
||||
11
Yavsc.Abstract/Workflow/Tasks/ITaskMetaData.cs
Normal file
11
Yavsc.Abstract/Workflow/Tasks/ITaskMetaData.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface ITaskMetaData
|
||||
{
|
||||
string TaskName { get; }
|
||||
IEnumerable <IRequisition> Prerequisites { get; }
|
||||
}
|
||||
}
|
||||
9
Yavsc.Abstract/Workflow/Tasks/ITaskRunner.cs
Normal file
9
Yavsc.Abstract/Workflow/Tasks/ITaskRunner.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface ITaskRunner
|
||||
{
|
||||
IExecutionData Run( ITaskMetaData taskMetaData, string [] args);
|
||||
}
|
||||
}
|
||||
8
Yavsc.Abstract/Workflow/Tasks/ITaskRunnerProvider.cs
Normal file
8
Yavsc.Abstract/Workflow/Tasks/ITaskRunnerProvider.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface ITaskRunnerProvider
|
||||
{
|
||||
ITaskRunner FindRunner(string runnerName);
|
||||
|
||||
}
|
||||
}
|
||||
10
Yavsc.Abstract/Workflow/Tasks/TaskManager.cs
Normal file
10
Yavsc.Abstract/Workflow/Tasks/TaskManager.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public class TaskManager : ITaskRunnerProvider
|
||||
{
|
||||
public ITaskRunner FindRunner(string runnerName)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue