2014-01-06 06:20:08 +00:00
|
|
|
|
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
|
|
|
|
|
{
|
2014-01-06 06:20:08 +00:00
|
|
|
|
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
|
|
|
|
{
|
2014-01-06 06:20:08 +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
|
|
|
|
}
|
|
|
|
|
}
|
2014-01-06 06:20:08 +00:00
|
|
|
|
}
|
|
|
|
|
|