From e9136c304f46dfff0cb5bafecfdf73c38c13f5f6 Mon Sep 17 00:00:00 2001 From: Brian Lagunas Date: Tue, 5 Feb 2019 08:41:03 -0700 Subject: [PATCH] added support for new dialog service to bootstrappers --- Sandbox/Wpf/HelloWorld/HelloWorld.sln | 14 +++++++------- .../Prism.DryIoc.Wpf/Legacy/DryIocBootstrapper.cs | 4 ++++ .../Legacy/NinjectBootstrapper.cs | 4 ++++ .../Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs | 4 ++++ 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Sandbox/Wpf/HelloWorld/HelloWorld.sln b/Sandbox/Wpf/HelloWorld/HelloWorld.sln index 8581db05bc..14a48df6cf 100644 --- a/Sandbox/Wpf/HelloWorld/HelloWorld.sln +++ b/Sandbox/Wpf/HelloWorld/HelloWorld.sln @@ -11,12 +11,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Prism Library", "Prism Libr EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Wpf", "..\..\..\Source\Wpf\Prism.Wpf\Prism.Wpf.csproj", "{AA8ED3D6-A708-4187-8FAC-00F56E063AD7}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Autofac.Wpf", "..\..\..\Source\Wpf\Prism.Autofac.Wpf\Prism.Autofac.Wpf.csproj", "{67921788-5D0F-4EC9-82C5-FDB5E2481E0C}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Ninject.Wpf", "..\..\..\Source\Wpf\Prism.Ninject.Wpf\Prism.Ninject.Wpf.csproj", "{5263604A-39EC-4E7B-82DD-8F52C838A77A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.DryIoc.Wpf", "..\..\..\Source\Wpf\Prism.DryIoc.Wpf\Prism.DryIoc.Wpf.csproj", "{A0842858-BFD5-41AE-BDE7-CBD870BC9900}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Unity.Wpf", "..\..\..\Source\Wpf\Prism.Unity.Wpf\Prism.Unity.Wpf.csproj", "{DEBADAAB-5C78-444E-AA77-336A43B49EC3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -35,10 +35,6 @@ Global {AA8ED3D6-A708-4187-8FAC-00F56E063AD7}.Debug|Any CPU.Build.0 = Debug|Any CPU {AA8ED3D6-A708-4187-8FAC-00F56E063AD7}.Release|Any CPU.ActiveCfg = Release|Any CPU {AA8ED3D6-A708-4187-8FAC-00F56E063AD7}.Release|Any CPU.Build.0 = Release|Any CPU - {67921788-5D0F-4EC9-82C5-FDB5E2481E0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {67921788-5D0F-4EC9-82C5-FDB5E2481E0C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {67921788-5D0F-4EC9-82C5-FDB5E2481E0C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {67921788-5D0F-4EC9-82C5-FDB5E2481E0C}.Release|Any CPU.Build.0 = Release|Any CPU {5263604A-39EC-4E7B-82DD-8F52C838A77A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5263604A-39EC-4E7B-82DD-8F52C838A77A}.Debug|Any CPU.Build.0 = Debug|Any CPU {5263604A-39EC-4E7B-82DD-8F52C838A77A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -47,6 +43,10 @@ Global {A0842858-BFD5-41AE-BDE7-CBD870BC9900}.Debug|Any CPU.Build.0 = Debug|Any CPU {A0842858-BFD5-41AE-BDE7-CBD870BC9900}.Release|Any CPU.ActiveCfg = Release|Any CPU {A0842858-BFD5-41AE-BDE7-CBD870BC9900}.Release|Any CPU.Build.0 = Release|Any CPU + {DEBADAAB-5C78-444E-AA77-336A43B49EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEBADAAB-5C78-444E-AA77-336A43B49EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEBADAAB-5C78-444E-AA77-336A43B49EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEBADAAB-5C78-444E-AA77-336A43B49EC3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -54,9 +54,9 @@ Global GlobalSection(NestedProjects) = preSolution {457AA668-72BB-4701-9A4E-FA86B0C412DE} = {15CF1FE1-D78E-4E3D-A9F8-FA0FCC56A83A} {AA8ED3D6-A708-4187-8FAC-00F56E063AD7} = {15CF1FE1-D78E-4E3D-A9F8-FA0FCC56A83A} - {67921788-5D0F-4EC9-82C5-FDB5E2481E0C} = {15CF1FE1-D78E-4E3D-A9F8-FA0FCC56A83A} {5263604A-39EC-4E7B-82DD-8F52C838A77A} = {15CF1FE1-D78E-4E3D-A9F8-FA0FCC56A83A} {A0842858-BFD5-41AE-BDE7-CBD870BC9900} = {15CF1FE1-D78E-4E3D-A9F8-FA0FCC56A83A} + {DEBADAAB-5C78-444E-AA77-336A43B49EC3} = {15CF1FE1-D78E-4E3D-A9F8-FA0FCC56A83A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D877B086-37FD-4AA5-8AB3-CF7E87E27425} diff --git a/Source/Wpf/Prism.DryIoc.Wpf/Legacy/DryIocBootstrapper.cs b/Source/Wpf/Prism.DryIoc.Wpf/Legacy/DryIocBootstrapper.cs index b17f41f1b5..0970de6f79 100644 --- a/Source/Wpf/Prism.DryIoc.Wpf/Legacy/DryIocBootstrapper.cs +++ b/Source/Wpf/Prism.DryIoc.Wpf/Legacy/DryIocBootstrapper.cs @@ -11,6 +11,7 @@ using Prism.DryIoc.Properties; using Prism.Ioc; using Prism.DryIoc.Ioc; +using Prism.Services.Dialogs; namespace Prism.DryIoc { @@ -152,6 +153,9 @@ protected virtual void ConfigureContainer() if (_useDefaultConfiguration) { + RegisterTypeIfMissing(true); + RegisterTypeIfMissing(false); + RegisterTypeIfMissing(true); RegisterTypeIfMissing(true); RegisterTypeIfMissing(true); diff --git a/Source/Wpf/Prism.Ninject.Wpf/Legacy/NinjectBootstrapper.cs b/Source/Wpf/Prism.Ninject.Wpf/Legacy/NinjectBootstrapper.cs index 44d6f6b2b2..d56d307941 100644 --- a/Source/Wpf/Prism.Ninject.Wpf/Legacy/NinjectBootstrapper.cs +++ b/Source/Wpf/Prism.Ninject.Wpf/Legacy/NinjectBootstrapper.cs @@ -13,6 +13,7 @@ using Prism.Regions; using Prism.Ioc; using Prism.Ninject.Ioc; +using Prism.Services.Dialogs; namespace Prism.Ninject { @@ -165,6 +166,9 @@ protected virtual void ConfigureKernel() if (this.useDefaultConfiguration) { + this.Kernel.RegisterTypeIfMissing(true); + this.Kernel.RegisterTypeIfMissing(false); + this.Kernel.RegisterTypeIfMissing(true); this.Kernel.RegisterTypeIfMissing(true); this.Kernel.RegisterTypeIfMissing(true); diff --git a/Source/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs b/Source/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs index 4c300c459b..2483b07efe 100644 --- a/Source/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs +++ b/Source/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs @@ -12,6 +12,7 @@ using Unity.Lifetime; using Prism.Ioc; using Prism.Unity.Ioc; +using Prism.Services.Dialogs; namespace Prism.Unity { @@ -148,6 +149,9 @@ protected virtual void ConfigureContainer() if (useDefaultConfiguration) { + RegisterTypeIfMissing(typeof(IDialogService), typeof(DialogService), true); + RegisterTypeIfMissing(typeof(IDialogWindow), typeof(Services.Dialogs.DefaultDialogs.DialogWindow), false); + RegisterTypeIfMissing(typeof(IServiceLocator), typeof(UnityServiceLocatorAdapter), true); RegisterTypeIfMissing(typeof(IModuleInitializer), typeof(ModuleInitializer), true); RegisterTypeIfMissing(typeof(IModuleManager), typeof(ModuleManager), true);