Skip to content

Commit 9bbcc8e

Browse files
committed
Remove ICommandSchedule
1 parent efe5456 commit 9bbcc8e

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

src/InEngine.Core/AbstractPlugin.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
using System;
22
using CommandLine;
33
using CommandLine.Text;
4+
using InEngine.Core.Scheduling;
45

56
namespace InEngine.Core
67
{
78
public class AbstractPlugin : IPluginType
89
{
10+
public virtual void Schedule(ISchedule schedule)
11+
{}
12+
913
[HelpVerbOption]
1014
public virtual string GetUsage(string verb)
1115
{

src/InEngine.Core/ICommandSchedule.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/InEngine.Core/IPluginType.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
namespace InEngine.Core
1+
using InEngine.Core.Scheduling;
2+
3+
namespace InEngine.Core
24
{
35
public interface IPluginType
4-
{}
6+
{
7+
void Schedule(ISchedule schedule);
8+
string GetUsage(string verb);
9+
}
510
}

src/InEngine.Core/Queuing/CommandSchedule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace InEngine.Core.Queuing
77
{
8-
public class CommandSchedule : ICommandSchedule
8+
public class CommandSchedule : AbstractCommand
99
{
1010
public void Schedule(ISchedule schedule)
1111
{

src/InEngine.Core/Scheduling/Schedule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public JobRegistration RegisterJob(AbstractCommand command, IJobDetail jobDetail
6060

6161
public void Initialize()
6262
{
63-
Plugin.Load<ICommandSchedule>().ForEach(x => {
64-
x.Make<ICommandSchedule>().ForEach(y => y.Schedule(this));
63+
Plugin.Load<IPluginType>().ForEach(x => {
64+
x.Make<IPluginType>().ForEach(y => y.Schedule(this));
6565
});
6666

6767
JobGroups.AsEnumerable().ToList().ForEach(x => {

0 commit comments

Comments
 (0)