Files
yavsc/Yavsc.Abstract/Workflow/Tasks/TaskManager.cs
Paul Schneider cdc38236e0 v 1.0.5-rc20-alpha5
in order to build 1.0.5-rc20-alpha5, an alpha6

* moves again the db context from server lib to main assembly,
  since migrations are not written correctly in these conditions.
* fixing dep graph, while moving as must as possible code from Yavsc to Yavsc.Server
* impoved topmost Makefile
* cleaned the badly desined, ans system redondant "Action" definiton
* reoganized some source code file locations
2018-06-15 10:40:52 +02:00

20 lines
585 B
C#

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();
}
}
}