Skip to content

Commit

Permalink
Extracted IoC in separate nuget packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilal Fazlani committed Jan 9, 2018
1 parent 733be92 commit 1f65512
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 200 deletions.
3 changes: 0 additions & 3 deletions CommandDotNet.Example/CommandDotNet.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
<NetCoreAppImplicitPackageVersion>2.0.3</NetCoreAppImplicitPackageVersion>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\CommandDotNet.IoC.Autofac\CommandDotNet.IoC.Autofac.csproj" />
<ProjectReference Include="..\CommandDotNet.IoC.MicrosoftDependencyInjection\CommandDotNet.IoC.MicrosoftDependencyInjection.csproj" />
<ProjectReference Include="..\CommandDotNet\CommandDotNet.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="4.6.2" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup>
</Project>
23 changes: 2 additions & 21 deletions CommandDotNet.Example/Program.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
using System;
using Autofac;
using CommandDotNet.IoC.Autofac;
using CommandDotNet.IoC.MicrosoftDependencyInjection;
using CommandDotNet.Models;
using Microsoft.Extensions.DependencyInjection;

namespace CommandDotNet.Example
namespace CommandDotNet.Example
{
class Program
{
static int Main(string[] args)
{
IServiceCollection serviceCollection = new ServiceCollection();
serviceCollection.AddSingleton<IService, Service>();

IServiceProvider serviceProvider = serviceCollection.BuildServiceProvider();

IService service = serviceProvider.GetService<IService>();

Console.WriteLine(service.value);

AppRunner<MyApplication> appRunner = new AppRunner<MyApplication>()
//.UseAutofac(container)
.UseMicrosoftDependencyInjection(serviceProvider);

AppRunner<MyApplication> appRunner = new AppRunner<MyApplication>();
return appRunner.Run(args);
}
}
Expand Down
24 changes: 0 additions & 24 deletions CommandDotNet.IoC.Autofac/AutofacResolver.cs

This file was deleted.

11 changes: 0 additions & 11 deletions CommandDotNet.IoC.Autofac/CommandDotNet.IoC.Autofac.csproj

This file was deleted.

13 changes: 0 additions & 13 deletions CommandDotNet.IoC.Autofac/Extension.cs

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions CommandDotNet.IoC.MicrosoftDependencyInjection/Extension.cs

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions CommandDotNet.Tests/CommandDotNet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommandDotNet.IoC.Autofac\CommandDotNet.IoC.Autofac.csproj" />
<ProjectReference Include="..\CommandDotNet.IoC.MicrosoftDependencyInjection\CommandDotNet.IoC.MicrosoftDependencyInjection.csproj" />
<ProjectReference Include="..\CommandDotNet\CommandDotNet.csproj" />
</ItemGroup>
<ItemGroup>
Expand Down
65 changes: 0 additions & 65 deletions CommandDotNet.Tests/IoCTests.cs

This file was deleted.

12 changes: 0 additions & 12 deletions CommandDotNet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandDotNet.Example", "CommandDotNet.Example\CommandDotNet.Example.csproj", "{73A0E2B7-F205-47E2-A448-7E5CCD7FD6A5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandDotNet.IoC.Autofac", "CommandDotNet.IoC.Autofac\CommandDotNet.IoC.Autofac.csproj", "{89EAF01B-FFB0-4562-84E0-8817FCDD0F9F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandDotNet.IoC.MicrosoftDependencyInjection", "CommandDotNet.IoC.MicrosoftDependencyInjection\CommandDotNet.IoC.MicrosoftDependencyInjection.csproj", "{05CE822B-CC59-4F14-A7B6-71C8722FACF5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -37,14 +33,6 @@ Global
{73A0E2B7-F205-47E2-A448-7E5CCD7FD6A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73A0E2B7-F205-47E2-A448-7E5CCD7FD6A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73A0E2B7-F205-47E2-A448-7E5CCD7FD6A5}.Release|Any CPU.Build.0 = Release|Any CPU
{89EAF01B-FFB0-4562-84E0-8817FCDD0F9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89EAF01B-FFB0-4562-84E0-8817FCDD0F9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89EAF01B-FFB0-4562-84E0-8817FCDD0F9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89EAF01B-FFB0-4562-84E0-8817FCDD0F9F}.Release|Any CPU.Build.0 = Release|Any CPU
{05CE822B-CC59-4F14-A7B6-71C8722FACF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05CE822B-CC59-4F14-A7B6-71C8722FACF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05CE822B-CC59-4F14-A7B6-71C8722FACF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{05CE822B-CC59-4F14-A7B6-71C8722FACF5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 1f65512

Please sign in to comment.