parent
2ec79e6744
commit
45b4972091
@ -1,11 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="DotNetZip" version="1.9.1.8" targetFramework="net40" />
|
||||
<package id="Microsoft.Owin.Host.HttpListener" version="0.21.0-pre" targetFramework="net40" />
|
||||
<package id="Microsoft.Owin.Hosting" version="0.21.0-pre" targetFramework="net40" />
|
||||
<package id="Nancy" version="0.16.1" targetFramework="net40" />
|
||||
<package id="Nancy.Owin" version="0.16.1" targetFramework="net40" />
|
||||
<package id="Newtonsoft.Json" version="5.0.3" targetFramework="net35" />
|
||||
<package id="NLog" version="2.0.1.2" targetFramework="net40" />
|
||||
<package id="Owin" version="1.0" targetFramework="net40" />
|
||||
</packages>
|
@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Nancy.Bootstrapper;
|
||||
using Nancy.Owin;
|
||||
using Owin;
|
||||
|
||||
namespace NzbDrone.Owin.MiddleWare
|
||||
{
|
||||
public class SignalRMiddleWare : IOwinMiddleWare
|
||||
{
|
||||
private readonly INancyBootstrapper _nancyBootstrapper;
|
||||
|
||||
public SignalRMiddleWare(INancyBootstrapper nancyBootstrapper)
|
||||
{
|
||||
_nancyBootstrapper = nancyBootstrapper;
|
||||
}
|
||||
|
||||
public void Attach(IAppBuilder appBuilder)
|
||||
{
|
||||
return;
|
||||
var nancyOwinHost = new NancyOwinHost(null, _nancyBootstrapper);
|
||||
appBuilder.Use((Func<Func<IDictionary<string, object>, Task>, Func<IDictionary<string, object>, Task>>)(next => (Func<IDictionary<string, object>, Task>)nancyOwinHost.Invoke), new object[0]);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue