Info
Version: | 1.0.0.1 |
Author(s): | cnat |
Last Update: | Saturday, September 10, 2016 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/System.Utility.Commons.Core.ServiceBaseController |
Install
Install-Package System.Utility.Commons.Core.ServiceBaseController
dotnet add package System.Utility.Commons.Core.ServiceBaseController
paket add System.Utility.Commons.Core.ServiceBaseController
System.Utility.Commons.Core.ServiceBaseController Download (Unzip the "nupkg" after downloading)
Dependencies
- System.Utility.Commons.Core.Log.dll(>= 1.0.0)
具有以下特性:
1、安装时可以读取配置文件服务名称及注释
2、集成了安装服务API
3、实现简单集成服务
4、可以在调试下加“-s”参数实现 调试进 OnStart 方法内
如:
/// <summary>
/// 应用程序的主入口点。
/// </summary>
public static void Main(string[] args)
{
using (ServiceBaseUtility setting = new ServiceBaseUtility())
{
if (!string.IsNullOrWhiteSpace(setting.ServiceName))
{
//系统用于标志此服务名称(唯一性)
ServiceBaseController.State<Service1>(setting.ServiceName, args);
}
}
}.