-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2143 from PrismLibrary/lifo
allow multiple registrations with Last In First Out
- Loading branch information
Showing
48 changed files
with
1,182 additions
and
533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/Containers/Prism.Container.DryIoc.Tests/ContainerHelpers.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using DryIoc; | ||
|
||
namespace Prism.Ioc.Tests | ||
{ | ||
public static class ContainerHelpers | ||
{ | ||
public static IContainer GetContainer(this IContainerExtension container) => | ||
Prism.DryIoc.PrismIocExtensions.GetContainer((IContainerProvider)container); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
tests/Containers/Prism.Container.DryIoc.Tests/ContainerSetup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using DryIoc; | ||
using Prism.DryIoc; | ||
|
||
namespace Prism.Ioc.Tests | ||
{ | ||
partial class ContainerSetup | ||
{ | ||
IContainerExtension CreateContainerInternal() => new DryIocContainerExtension(); | ||
|
||
public Type NativeContainerType => typeof(IContainer); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
tests/Containers/Prism.Container.DryIoc.Tests/Prism.Ioc.DryIoc.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="DryIoc.dll" Version="4.3.1" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" /> | ||
<PackageReference Include="Moq" Version="4.14.5" /> | ||
<PackageReference Include="xunit" Version="2.4.1" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\src\Prism.Core\Prism.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
<Import Project="..\Prism.Container.Shared\Prism.Container.Shared.projitems" Label="Shared" /> | ||
|
||
<Import Project="..\..\..\src\Containers\Prism.DryIoc.Shared\Prism.DryIoc.Shared.projitems" Label="Shared" /> | ||
|
||
</Project> |
7 changes: 7 additions & 0 deletions
7
tests/Containers/Prism.Container.Shared/Mocks/Services/CompositeService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Prism.Ioc.Mocks.Services | ||
{ | ||
public class CompositeService : IServiceA, IServiceB, IServiceC | ||
{ | ||
public IServiceB ServiceB => this; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
tests/Containers/Prism.Container.Shared/Mocks/Services/IServiceA.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Prism.Ioc.Mocks.Services | ||
{ | ||
public interface IServiceA | ||
{ | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
tests/Containers/Prism.Container.Shared/Mocks/Services/IServiceB.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Prism.Ioc.Mocks.Services | ||
{ | ||
public interface IServiceB | ||
{ | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/Containers/Prism.Container.Shared/Mocks/Services/IServiceC.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Prism.Ioc.Mocks.Services | ||
{ | ||
public interface IServiceC | ||
{ | ||
IServiceB ServiceB { get; } | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/Containers/Prism.Container.Shared/Mocks/Services/ServiceA.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Prism.Ioc.Mocks.Services | ||
{ | ||
public class ServiceA : IServiceA | ||
{ | ||
public string SomeProperty { get; set; } | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
tests/Containers/Prism.Container.Shared/Mocks/Services/ServiceB.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Prism.Ioc.Mocks.Services | ||
{ | ||
public class ServiceB : IServiceB | ||
{ | ||
} | ||
} |
Oops, something went wrong.