2018-04-16 17:56:24 +02:00
|
|
|
using System;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.AspNet.Hosting.Server;
|
|
|
|
|
using Microsoft.AspNet.Http.Features;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Yavsc.Models;
|
|
|
|
|
|
|
|
|
|
namespace Yavsc.Server
|
|
|
|
|
{
|
2018-05-04 10:45:45 +02:00
|
|
|
public class cliServerFactory : IServerFactory
|
2018-04-16 17:56:24 +02:00
|
|
|
{
|
|
|
|
|
public IFeatureCollection Initialize(IConfiguration configuration)
|
|
|
|
|
{
|
|
|
|
|
FeatureCollection featureCollection = new FeatureCollection();
|
|
|
|
|
return featureCollection;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IDisposable Start(IFeatureCollection serverFeatures, Func<IFeatureCollection, Task> application)
|
|
|
|
|
{
|
|
|
|
|
var task = application(serverFeatures);
|
|
|
|
|
return task;
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-05-04 10:45:45 +02:00
|
|
|
}
|