This commit is contained in:
watsonb8
2019-06-25 21:17:52 -04:00
parent 613365f7ad
commit 0cb0546741
10 changed files with 283 additions and 89 deletions

View File

@ -10,6 +10,8 @@ namespace Aurora.Backend.Executors
{
}
public ExecutorType ExecutorType { get; protected set; }
public static BaseExecutor CreateExecutor<T>(ExecutorType executorType) where T : BaseExecutor
{
MethodInfo method = typeof(T).GetMethod("Create");
@ -19,14 +21,6 @@ namespace Aurora.Backend.Executors
}
return method.Invoke(null, new object[] { executorType }) as BaseExecutor;
// var types = typeof(T).Assembly.GetTypes();
// foreach (Type type in types)
// {
// MethodInfo genericMethod = method.MakeGenericMethod(type);
// genericMethod.Invoke(null, null); // No target, no arguments
// }
}
}

View File

@ -19,11 +19,13 @@ namespace Aurora.Backend.Executors
case ExecutorType.Client:
{
executor = new ClientPartyExecutor();
executor.ExecutorType = type;
break;
}
case ExecutorType.Server:
{
executor = new HostPartyExecutor();
executor.ExecutorType = type;
break;
}
}
@ -45,14 +47,5 @@ namespace Aurora.Backend.Executors
public abstract void RemoveFromQueue();
public abstract void Play();
public abstract void Pause();
public abstract void Stop();
public abstract void Next();
public abstract void Previous();
}
}