Radarr/src/NzbDrone.Update/UpdateContainerBuilder.cs

38 lines
1002 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using NzbDrone.Common.Composition;
2013-08-16 03:32:23 +00:00
using NzbDrone.Common.EnvironmentInfo;
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
{
}
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>
{
"NzbDrone.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
}
}
}