mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
removed Autofac from update project.
This commit is contained in:
parent
55ece3d80d
commit
3f958109bb
18 changed files with 174 additions and 151 deletions
|
@ -55,13 +55,6 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Autofac, Version=3.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Autofac.3.0.1\lib\net40\Autofac.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Autofac.Configuration">
|
||||
<HintPath>..\packages\Autofac.3.0.1\lib\net40\Autofac.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Exceptron.Client, Version=1.0.20.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Exceptron.Client.1.0.20\lib\net20\Exceptron.Client.dll</HintPath>
|
||||
|
@ -84,6 +77,7 @@
|
|||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Providers\UpdateProvider.cs" />
|
||||
<Compile Include="UpdateContainerBuilder.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using Autofac;
|
||||
using NLog;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Update.Providers;
|
||||
using TinyIoC;
|
||||
|
||||
namespace NzbDrone.Update
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ namespace NzbDrone.Update
|
|||
{
|
||||
private readonly UpdateProvider _updateProvider;
|
||||
private readonly ProcessProvider _processProvider;
|
||||
private static IContainer _container;
|
||||
private static TinyIoCContainer _container;
|
||||
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
|
@ -26,10 +26,8 @@ namespace NzbDrone.Update
|
|||
try
|
||||
{
|
||||
Console.WriteLine("Starting NzbDrone Update Client");
|
||||
var builder = new ContainerBuilder();
|
||||
builder.RegisterAssemblyTypes(typeof(UpdateProvider).Assembly).SingleInstance();
|
||||
builder.RegisterAssemblyTypes(typeof(RestProvider).Assembly).SingleInstance();
|
||||
_container = builder.Build();
|
||||
|
||||
_container = UpdateContainerBuilder.Build();
|
||||
|
||||
logger.Info("Updating NzbDrone to version {0}", _container.Resolve<EnvironmentProvider>().Version);
|
||||
_container.Resolve<Program>().Start(args);
|
||||
|
|
19
NzbDrone.Update/UpdateContainerBuilder.cs
Normal file
19
NzbDrone.Update/UpdateContainerBuilder.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
using NzbDrone.Common;
|
||||
using TinyIoC;
|
||||
|
||||
namespace NzbDrone.Update
|
||||
{
|
||||
public class UpdateContainerBuilder : ContainerBuilderBase
|
||||
{
|
||||
public UpdateContainerBuilder()
|
||||
: base("NzbDrone.Update", "NzbDrone.Common")
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static TinyIoCContainer Build()
|
||||
{
|
||||
return new UpdateContainerBuilder().Container;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Autofac" version="3.0.1" targetFramework="net40" />
|
||||
<package id="Exceptron.Client" version="1.0.20" targetFramework="net40" />
|
||||
<package id="Exceptron.Nlog" version="1.0.11" targetFramework="net40" />
|
||||
<package id="NLog" version="2.0.1.2" targetFramework="net40" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue