规划项目结构,添加一些必要的基础类

pull/1/head
Xuanye Wong 7 years ago
parent 46b7d6fda8
commit aa35e4b6a6
  1. 4
      src/DotXxlJob.Core/DotXxlJob.Core.csproj
  2. 8
      src/DotXxlJob.Core/IJobHandlerFactory.cs
  3. 30
      src/DotXxlJob.Core/JobExecuteHostedService.cs
  4. 7
      src/DotXxlJob.Core/Model/TriggerParam.cs
  5. 7
      src/DotXxlJob.Core/TaskExcutor.cs
  6. 7
      src/DotXxlJob.Core/TaskExecutorFactory.cs

@ -4,4 +4,8 @@
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.2.0" />
</ItemGroup>
</Project>

@ -0,0 +1,8 @@
namespace DotXxlJob.Core
{
public interface IJobHandlerFactory
{
//TODO: 获取实际执行的JobHandler
IJobHandler GetJobHandler(string handlerName);
}
}

@ -0,0 +1,30 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Hosting;
namespace DotXxlJob.Core
{
/// <summary>
/// NOTE: 负责启动Executor服务,和进行服务注册的宿主服务
/// </summary>
public class JobsExecuteHostedService:IHostedService
{
public Task StartAsync(CancellationToken cancellationToken)
{
//1 初始化服务注册
//2 初始化adminClient
//3 初始化执行线程
//4 初始化XXL_RPC服务端口,HTTP服务
throw new System.NotImplementedException();
}
public Task StopAsync(CancellationToken cancellationToken)
{
//清理Start中启动的资源
throw new System.NotImplementedException();
}
}
}

@ -0,0 +1,7 @@
namespace DotXxlJob.Core.Model
{
public class TriggerParam
{
}
}

@ -0,0 +1,7 @@
namespace DotXxlJob.Core
{
public class TaskExcutor
{
}
}

@ -0,0 +1,7 @@
namespace DotXxlJob.Core
{
public class TaskExecutorFactory
{
}
}
Loading…
Cancel
Save