Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Commit

Permalink
Updated dependent packages;
Browse files Browse the repository at this point in the history
Update the middleware to get rid of the root object;
Updated assemblies' versions.
  • Loading branch information
godrose committed Apr 19, 2016
1 parent 71747a2 commit 5ce908c
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace LogoFX.Client.Mvvm.ViewModel.Extensions.Tests
{
[TestFixture]
class EditableScreenObjectViewModelTests : IntegrationTestsBase<ExtendedSimpleContainerAdapter, TestConductorViewModel,TestBootstrapper>
class EditableScreenObjectViewModelTests : IntegrationTestsBase<ExtendedSimpleContainerAdapter, TestConductorViewModel, TestBootstrapper>
{
//Note: may use here IntegrationTestsBaseWithActivation as well - package still not available.
protected override TestConductorViewModel CreateRootObjectOverride(TestConductorViewModel rootObject)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@
<HintPath>..\packages\Caliburn.Micro.3.0.0\lib\net45\Caliburn.Micro.Platform.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LogoFX.Bootstrapping, Version=1.1.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Bootstrapping.1.1.3\lib\portable-net45+wpa8+win8+MonoAndroid+MonoTouch+uap10.0\LogoFX.Bootstrapping.dll</HintPath>
<Reference Include="LogoFX.Bootstrapping, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Bootstrapping.1.2.0\lib\portable-net45+wpa8+win8+MonoAndroid+MonoTouch+uap10.0\LogoFX.Bootstrapping.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LogoFX.Bootstrapping.Middleware, Version=1.1.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Bootstrapping.1.1.3\lib\portable-net45+wpa8+win8+MonoAndroid+MonoTouch+uap10.0\LogoFX.Bootstrapping.Middleware.dll</HintPath>
<Reference Include="LogoFX.Bootstrapping.Middleware, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Bootstrapping.1.2.0\lib\portable-net45+wpa8+win8+MonoAndroid+MonoTouch+uap10.0\LogoFX.Bootstrapping.Middleware.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LogoFX.Client.Bootstrapping, Version=1.4.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Client.Bootstrapping.Core.1.4.2\lib\portable-net45+wpa8+win8+MonoAndroid+MonoTouch+uap10.0\LogoFX.Client.Bootstrapping.dll</HintPath>
<Reference Include="LogoFX.Client.Bootstrapping, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Client.Bootstrapping.Core.1.5.0\lib\portable-net45+wpa8+win8+MonoAndroid+MonoTouch+uap10.0\LogoFX.Client.Bootstrapping.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LogoFX.Client.Bootstrapping.Adapters.Contracts, Version=1.0.4.0, Culture=neutral, processorArchitecture=MSIL">
Expand All @@ -82,8 +82,8 @@
<HintPath>..\packages\LogoFX.Client.Bootstrapping.Adapters.SimpleContainer.1.1.0\lib\portable-net45+wpa8+win8+MonoAndroid+MonoTouch+uap10.0\LogoFX.Client.Bootstrapping.Adapters.SimpleContainer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LogoFX.Client.Bootstrapping.Platform, Version=1.4.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Client.Bootstrapping.1.4.2\lib\net45\LogoFX.Client.Bootstrapping.Platform.dll</HintPath>
<Reference Include="LogoFX.Client.Bootstrapping.Platform, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Client.Bootstrapping.1.5.0\lib\net45\LogoFX.Client.Bootstrapping.Platform.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LogoFX.Client.Core, Version=1.0.7.0, Culture=neutral, processorArchitecture=MSIL">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

namespace LogoFX.Client.Mvvm.ViewModel.Extensions.Tests
{
class TestBootstrapper : BootstrapperContainerBase<TestConductorViewModel,ExtendedSimpleContainerAdapter>
class TestBootstrapper : BootstrapperContainerBase<ExtendedSimpleContainerAdapter>
.WithRootObject<TestConductorViewModel>
{
public TestBootstrapper()
:base(new ExtendedSimpleContainerAdapter(), new BootstrapperCreationOptions
{
UseApplication = false
UseApplication = false
})
{

{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<package id="Attest.Tests.NUnit" version="1.2.1" targetFramework="net451" />
<package id="Caliburn.Micro" version="3.0.0" targetFramework="net451" />
<package id="Caliburn.Micro.Core" version="3.0.0" targetFramework="net451" />
<package id="LogoFX.Bootstrapping" version="1.1.3" targetFramework="net451" />
<package id="LogoFX.Client.Bootstrapping" version="1.4.2" targetFramework="net451" />
<package id="LogoFX.Bootstrapping" version="1.2.0" targetFramework="net451" />
<package id="LogoFX.Client.Bootstrapping" version="1.5.0" targetFramework="net451" />
<package id="LogoFX.Client.Bootstrapping.Adapters.Contracts" version="1.0.4" targetFramework="net451" />
<package id="LogoFX.Client.Bootstrapping.Adapters.SimpleContainer" version="1.1.0" targetFramework="net451" />
<package id="LogoFX.Client.Bootstrapping.Core" version="1.4.2" targetFramework="net451" />
<package id="LogoFX.Client.Bootstrapping.Core" version="1.5.0" targetFramework="net451" />
<package id="LogoFX.Client.Core" version="1.0.8" targetFramework="net451" />
<package id="LogoFX.Client.Core.Core" version="1.0.7" targetFramework="net451" />
<package id="LogoFX.Client.Mvvm.Model" version="1.0.9" targetFramework="net451" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using LogoFX.Bootstrapping;
using LogoFX.Client.Bootstrapping.Adapters.Contracts;
using Solid.Practices.IoC;

namespace LogoFX.Client.Mvvm.ViewModel.Services
Expand All @@ -11,19 +10,32 @@ public static class BootstrapperContainerExtensions
{
/// <summary>
/// Uses the view model creator service middleware.
/// </summary>
/// <typeparam name="TRootObject">The type of the root object.</typeparam>
/// </summary>
/// <typeparam name="TIocContainerAdapter">The type of the ioc container adapter.</typeparam>
/// <param name="bootstrapperContainer">The bootstrapper container.</param>
/// <returns></returns>
public static IBootstrapperWithContainerAdapter<TRootObject, TIocContainerAdapter>
UseViewModelCreatorService<TRootObject, TIocContainerAdapter>
(this IBootstrapperWithContainerAdapter<TRootObject, TIocContainerAdapter> bootstrapperContainer)
where TRootObject : class
where TIocContainerAdapter : class, IIocContainer, IIocContainerAdapter, IBootstrapperAdapter, new()
public static IBootstrapperWithContainerAdapter<TIocContainerAdapter>
UseViewModelCreatorService<TIocContainerAdapter>
(this IBootstrapperWithContainerAdapter<TIocContainerAdapter> bootstrapperContainer)
where TIocContainerAdapter : class, IIocContainer
{
return bootstrapperContainer.Use(
new RegisterViewModelCreatorServiceMiddleware<TRootObject, TIocContainerAdapter>());
}
new RegisterViewModelCreatorServiceMiddleware<TIocContainerAdapter>());
}

/// <summary>
/// Uses the shutdown middleware.
/// </summary>
/// <typeparam name="TIocContainerAdapter">The type of the ioc container adapter.</typeparam>
/// <param name="bootstrapperContainer">The bootstrapper container.</param>
/// <returns></returns>
public static IBootstrapperWithContainerAdapter<TIocContainerAdapter>
UseShutdown<TIocContainerAdapter>
(this IBootstrapperWithContainerAdapter<TIocContainerAdapter> bootstrapperContainer)
where TIocContainerAdapter : class, IIocContainer
{
return bootstrapperContainer.Use(
new ShutdownMiddleware<TIocContainerAdapter>());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
<Compile Include="ShutdownMiddleware.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="LogoFX.Bootstrapping, Version=1.1.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Bootstrapping.1.1.3\lib\portable-net45+wpa8+win8+MonoAndroid+MonoTouch+uap10.0\LogoFX.Bootstrapping.dll</HintPath>
<Reference Include="LogoFX.Bootstrapping, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Bootstrapping.1.2.0\lib\portable-net45+wpa8+win8+MonoAndroid+MonoTouch+uap10.0\LogoFX.Bootstrapping.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LogoFX.Bootstrapping.Middleware, Version=1.1.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Bootstrapping.1.1.3\lib\portable-net45+wpa8+win8+MonoAndroid+MonoTouch+uap10.0\LogoFX.Bootstrapping.Middleware.dll</HintPath>
<Reference Include="LogoFX.Bootstrapping.Middleware, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LogoFX.Bootstrapping.1.2.0\lib\portable-net45+wpa8+win8+MonoAndroid+MonoTouch+uap10.0\LogoFX.Bootstrapping.Middleware.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LogoFX.Client.Bootstrapping.Adapters.Contracts, Version=1.0.4.0, Culture=neutral, processorArchitecture=MSIL">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.9")]
[assembly: AssemblyFileVersion("1.0.9")]
[assembly: AssemblyVersion("1.1.0")]
[assembly: AssemblyFileVersion("1.1.0")]
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
using LogoFX.Bootstrapping;
using LogoFX.Client.Bootstrapping.Adapters.Contracts;
using Solid.Practices.IoC;
using Solid.Practices.Middleware;

namespace LogoFX.Client.Mvvm.ViewModel.Services
{
/// <summary>
/// Middleware that's responsible for registering <see cref="IViewModelCreatorService"/> into the ioc container adapter.
/// </summary>
/// <typeparam name="TRootObject">The type of the root object.</typeparam>
/// </summary>
/// <typeparam name="TIocContainerAdapter">The type of the ioc container adapter.</typeparam>
public class RegisterViewModelCreatorServiceMiddleware<TRootObject, TIocContainerAdapter> :
IMiddleware<IBootstrapperWithContainerAdapter<TRootObject, TIocContainerAdapter>>
where TRootObject : class
where TIocContainerAdapter : class, IIocContainer, IIocContainerAdapter, IBootstrapperAdapter, new()
public class RegisterViewModelCreatorServiceMiddleware<TIocContainerAdapter> :
IMiddleware<IBootstrapperWithContainerAdapter<TIocContainerAdapter>>
where TIocContainerAdapter : class, IIocContainer
{
/// <summary>
/// Applies the middleware on the specified object.
/// </summary>
/// <param name="object">The object.</param>
/// <returns></returns>
public IBootstrapperWithContainerAdapter<TRootObject, TIocContainerAdapter> Apply(
IBootstrapperWithContainerAdapter<TRootObject, TIocContainerAdapter> @object)
public IBootstrapperWithContainerAdapter<TIocContainerAdapter> Apply(
IBootstrapperWithContainerAdapter<TIocContainerAdapter> @object)
{
@object.ContainerAdapter.RegisterSingleton<IViewModelCreatorService, ViewModelCreatorService>();
return @object;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@ namespace LogoFX.Client.Mvvm.ViewModel.Services
/// Middleware that's responsible for registering
/// <see cref="IShutdownService"/> inside the ioc container adapter.
/// </summary>
/// <typeparam name="TRootObject">The type of the root object.</typeparam>
/// <typeparam name="TIocContainerAdapter">The type of the ioc container adapter.</typeparam>
public class ShutdownMiddleware<TRootObject, TIocContainerAdapter> :
IMiddleware<IBootstrapperWithContainerAdapter<TRootObject, TIocContainerAdapter>>
public class ShutdownMiddleware<TIocContainerAdapter> :
IMiddleware<IBootstrapperWithContainerAdapter<TIocContainerAdapter>>
where TIocContainerAdapter : IIocContainer
{
/// <summary>
/// Applies the middleware on the specified object.
/// </summary>
/// <param name="object">The object.</param>
/// <returns/>
public IBootstrapperWithContainerAdapter<TRootObject, TIocContainerAdapter>
Apply(IBootstrapperWithContainerAdapter<TRootObject, TIocContainerAdapter> @object)
public IBootstrapperWithContainerAdapter<TIocContainerAdapter>
Apply(IBootstrapperWithContainerAdapter<TIocContainerAdapter> @object)
{
if (@object is IShutdownService)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LogoFX.Bootstrapping" version="1.1.3" targetFramework="portable45-net45+win8+wpa81" />
<package id="LogoFX.Bootstrapping" version="1.2.0" targetFramework="portable45-net45+win8+wpa81" />
<package id="LogoFX.Client.Bootstrapping.Adapters.Contracts" version="1.0.4" targetFramework="portable45-net45+win8+wpa81" />
<package id="Solid.Bootstrapping" version="1.1.0" targetFramework="portable45-net45+win8+wpa81" />
<package id="Solid.Practices.IoC" version="1.1.1" targetFramework="portable45-net45+win8+wpa81" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.9")]
[assembly: AssemblyFileVersion("1.0.9")]
[assembly: AssemblyVersion("1.1.0")]
[assembly: AssemblyFileVersion("1.1.0")]

0 comments on commit 5ce908c

Please sign in to comment.