using Rhea.Common;
|
using Microsoft.AspNetCore.Hosting;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.ServiceProcess;
|
using System.Threading.Tasks;
|
using Tiger.IBusiness;
|
|
namespace Tiger.Api
|
{
|
public static class WebHostServiceExtensions
|
{
|
public static void RunAsApiService(this IWebHost host)
|
{
|
try
|
{
|
var webHostService = new ApiWebHostService(host);
|
ServiceBase.Run(webHostService);
|
}
|
catch (System.Exception ex)
|
{
|
Logger.Console.Fatal(ex, "Windows Services Exception");
|
}
|
}
|
}
|
}
|