Radarr/src/NzbDrone.Update/UpdateContainerBuilder.cs

38 lines
1.1 KiB
C#
Raw Normal View History

2016-12-23 21:45:24 +00:00
using System.Collections.Generic;
using NzbDrone.Common.Composition;
2013-08-16 03:32:23 +00:00
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Http.Dispatchers;
2013-04-20 00:05:48 +00:00
namespace NzbDrone.Update
{
public class UpdateContainerBuilder : ContainerBuilderBase
{
private UpdateContainerBuilder(IStartupContext startupContext, string[] assemblies)
: base(startupContext, assemblies)
2013-04-20 00:05:48 +00:00
{
Container.Register<IHttpDispatcher, FallbackHttpDispatcher>();
2013-04-20 00:05:48 +00:00
}
2013-11-26 06:53:36 +00:00
public static IContainer Build(IStartupContext startupContext)
2013-04-20 00:05:48 +00:00
{
var assemblies = new List<string>
{
"Radarr.Update",
"NzbDrone.Common"
};
if (OsInfo.IsWindows)
{
assemblies.Add("NzbDrone.Windows");
}
else
{
assemblies.Add("NzbDrone.Mono");
}
return new UpdateContainerBuilder(startupContext, assemblies.ToArray()).Container;
2013-04-20 00:05:48 +00:00
}
}
}