mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-15 07:22:35 +01:00
25 lines
645 B
C#
25 lines
645 B
C#
|
using System;
|
|||
|
using Microsoft.Owin.Hosting.Services;
|
|||
|
using Microsoft.Owin.Hosting.Tracing;
|
|||
|
|
|||
|
namespace NzbDrone.Host.Owin
|
|||
|
{
|
|||
|
public class OwinServiceProvider : IServiceProvider
|
|||
|
{
|
|||
|
private readonly IServiceProvider _defaultProvider;
|
|||
|
|
|||
|
public OwinServiceProvider()
|
|||
|
{
|
|||
|
_defaultProvider = ServicesFactory.Create();
|
|||
|
}
|
|||
|
public object GetService(Type serviceType)
|
|||
|
{
|
|||
|
if (serviceType == typeof (ITraceOutputFactory))
|
|||
|
{
|
|||
|
return new OwinTraceOutputFactory();
|
|||
|
}
|
|||
|
|
|||
|
return _defaultProvider.GetService(serviceType);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|