mirror of
https://github.com/Radarr/Radarr
synced 2024-12-29 03:15:19 +00:00
25 lines
No EOL
645 B
C#
25 lines
No EOL
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);
|
|
}
|
|
}
|
|
} |