diff --git a/Core/Core.csproj b/Core/Core.csproj
new file mode 100644
index 0000000..4907fb4
--- /dev/null
+++ b/Core/Core.csproj
@@ -0,0 +1,14 @@
+
+
+
+ Library
+ netcoreapp3.1
+ true
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SharedModule/Interfaces/IFileDialogService.cs b/Core/Interfaces/IFileDialogService.cs
similarity index 96%
rename from SharedModule/Interfaces/IFileDialogService.cs
rename to Core/Interfaces/IFileDialogService.cs
index 3961379..2be1d29 100644
--- a/SharedModule/Interfaces/IFileDialogService.cs
+++ b/Core/Interfaces/IFileDialogService.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace SharedModule
+namespace Core
{
public interface IFileDialogService
{
diff --git a/SharedModule/Interfaces/ILog.cs b/Core/Interfaces/ILog.cs
similarity index 87%
rename from SharedModule/Interfaces/ILog.cs
rename to Core/Interfaces/ILog.cs
index 1faa83b..8e00d3a 100644
--- a/SharedModule/Interfaces/ILog.cs
+++ b/Core/Interfaces/ILog.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace SharedModule
+namespace Core
{
public interface ILogService
{
diff --git a/SharedModule/Interfaces/IMessageBoxService.cs b/Core/Interfaces/IMessageBoxService.cs
similarity index 96%
rename from SharedModule/Interfaces/IMessageBoxService.cs
rename to Core/Interfaces/IMessageBoxService.cs
index 5e28e6a..cfe5eb5 100644
--- a/SharedModule/Interfaces/IMessageBoxService.cs
+++ b/Core/Interfaces/IMessageBoxService.cs
@@ -1,6 +1,6 @@
using System.Windows;
-namespace SharedModule
+namespace Core
{
///
/// Service which provide access to the MessageBox methods and FileDialogs
diff --git a/SharedModule/Utility/BaseDialogViewModel.cs b/Core/Utility/BaseDialogViewModel.cs
similarity index 96%
rename from SharedModule/Utility/BaseDialogViewModel.cs
rename to Core/Utility/BaseDialogViewModel.cs
index 1caf730..fe122bc 100644
--- a/SharedModule/Utility/BaseDialogViewModel.cs
+++ b/Core/Utility/BaseDialogViewModel.cs
@@ -1,7 +1,7 @@
using Prism.Services.Dialogs;
using System;
-namespace SharedModule
+namespace Core
{
public class BaseDialogViewModel : BaseViewModel, IDialogAware
{
diff --git a/SharedModule/Utility/BaseViewModel.cs b/Core/Utility/BaseViewModel.cs
similarity index 93%
rename from SharedModule/Utility/BaseViewModel.cs
rename to Core/Utility/BaseViewModel.cs
index b0b4516..6b8481c 100644
--- a/SharedModule/Utility/BaseViewModel.cs
+++ b/Core/Utility/BaseViewModel.cs
@@ -1,5 +1,4 @@
using CommonServiceLocator;
-using Domain;
using Prism;
using Prism.Events;
using Prism.Mvvm;
@@ -9,7 +8,7 @@
using System.Linq;
using System.Runtime.CompilerServices;
-namespace SharedModule
+namespace Core
{
public abstract class BaseViewModel : BindableBase, IActiveAware
{
@@ -25,7 +24,7 @@ public abstract class BaseViewModel : BindableBase, IActiveAware
protected BaseViewModel()
{
- _messageBoxService = ServiceLocator.Current.GetInstance();
+ _messageBoxService = ServiceLocator.Current.GetInstance();
_fileDialogService = ServiceLocator.Current.GetInstance();
_logService = ServiceLocator.Current.GetInstance();
@@ -42,8 +41,7 @@ protected void ShowParameterNullError([CallerMemberName] string callerName = nul
protected void HandleException(Exception ex)
{
_messageBoxService.ShowError(ex.Message);
- if (!(ex is BusinessException))
- _logService.LogError(ex.ToString());
+ _logService.LogError(ex.ToString());
}
protected void ActivateRegionWithView(string regionName)
diff --git a/SharedModule/Utility/Events.cs b/Core/Utility/Events.cs
similarity index 66%
rename from SharedModule/Utility/Events.cs
rename to Core/Utility/Events.cs
index b2c9f0a..596c57c 100644
--- a/SharedModule/Utility/Events.cs
+++ b/Core/Utility/Events.cs
@@ -3,8 +3,8 @@
using System.Collections.Generic;
using System.Text;
-namespace SharedModule
+namespace Core
{
// define all the events of the application here
- // public class SomeEvent : PubSubEvent { }
+ public class SomeEvent : PubSubEvent { }
}
\ No newline at end of file
diff --git a/SharedModule/Utility/Extensions.cs b/Core/Utility/Extensions.cs
similarity index 93%
rename from SharedModule/Utility/Extensions.cs
rename to Core/Utility/Extensions.cs
index 8dafe60..b0eda05 100644
--- a/SharedModule/Utility/Extensions.cs
+++ b/Core/Utility/Extensions.cs
@@ -3,7 +3,7 @@
using System.Collections.ObjectModel;
using System.Text;
-namespace SharedModule
+namespace Core
{
public static class Extensions
{
diff --git a/SharedModule/Utility/RegionNames.cs b/Core/Utility/RegionNames.cs
similarity index 88%
rename from SharedModule/Utility/RegionNames.cs
rename to Core/Utility/RegionNames.cs
index 0358fb1..81e7cd8 100644
--- a/SharedModule/Utility/RegionNames.cs
+++ b/Core/Utility/RegionNames.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace SharedModule
+namespace Core
{
public static class RegionNames
{
diff --git a/SharedModule/SharedModule.cs b/Modules/CommonServicesModule/CommonServicesModule.cs
similarity index 88%
rename from SharedModule/SharedModule.cs
rename to Modules/CommonServicesModule/CommonServicesModule.cs
index 64e7bc4..321193c 100644
--- a/SharedModule/SharedModule.cs
+++ b/Modules/CommonServicesModule/CommonServicesModule.cs
@@ -1,11 +1,12 @@
-using NLog;
+using Core;
+using NLog;
using Prism.Ioc;
using Prism.Modularity;
using System;
namespace SharedModule
{
- public class SharedModule : IModule
+ public class CommonServicesModule : IModule
{
public void OnInitialized(IContainerProvider containerProvider)
{
diff --git a/SharedModule/SharedModule.csproj b/Modules/CommonServicesModule/CommonServicesModule.csproj
similarity index 79%
rename from SharedModule/SharedModule.csproj
rename to Modules/CommonServicesModule/CommonServicesModule.csproj
index c30c62d..103d3f9 100644
--- a/SharedModule/SharedModule.csproj
+++ b/Modules/CommonServicesModule/CommonServicesModule.csproj
@@ -1,4 +1,4 @@
-
+
netcoreapp3.1
@@ -12,6 +12,10 @@
+
+
+
+
Always
diff --git a/SharedModule/Implementations/FileDialogService.cs b/Modules/CommonServicesModule/Implementations/FileDialogService.cs
similarity index 96%
rename from SharedModule/Implementations/FileDialogService.cs
rename to Modules/CommonServicesModule/Implementations/FileDialogService.cs
index b30c0c7..9efcf24 100644
--- a/SharedModule/Implementations/FileDialogService.cs
+++ b/Modules/CommonServicesModule/Implementations/FileDialogService.cs
@@ -1,4 +1,5 @@
-using Microsoft.Win32;
+using Core;
+using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Text;
diff --git a/SharedModule/Implementations/Log.cs b/Modules/CommonServicesModule/Implementations/Log.cs
similarity index 91%
rename from SharedModule/Implementations/Log.cs
rename to Modules/CommonServicesModule/Implementations/Log.cs
index 7603f6a..01ba1f3 100644
--- a/SharedModule/Implementations/Log.cs
+++ b/Modules/CommonServicesModule/Implementations/Log.cs
@@ -1,4 +1,5 @@
-using NLog;
+using Core;
+using NLog;
using System;
using System.Collections.Generic;
using System.Text;
diff --git a/SharedModule/Implementations/MessageBoxService.cs b/Modules/CommonServicesModule/Implementations/MessageBoxService.cs
similarity index 92%
rename from SharedModule/Implementations/MessageBoxService.cs
rename to Modules/CommonServicesModule/Implementations/MessageBoxService.cs
index a9da334..f9dd16a 100644
--- a/SharedModule/Implementations/MessageBoxService.cs
+++ b/Modules/CommonServicesModule/Implementations/MessageBoxService.cs
@@ -1,4 +1,5 @@
-using System.Windows;
+using Core;
+using System.Windows;
namespace SharedModule
{
diff --git a/SharedModule/nlog.config b/Modules/CommonServicesModule/nlog.config
similarity index 100%
rename from SharedModule/nlog.config
rename to Modules/CommonServicesModule/nlog.config
diff --git a/MainModule/DialogServiceExtensions.cs b/Modules/MainModule/DialogServiceExtensions.cs
similarity index 100%
rename from MainModule/DialogServiceExtensions.cs
rename to Modules/MainModule/DialogServiceExtensions.cs
diff --git a/MainModule/MainModule.cs b/Modules/MainModule/MainModule.cs
similarity index 92%
rename from MainModule/MainModule.cs
rename to Modules/MainModule/MainModule.cs
index b54643a..cd17865 100644
--- a/MainModule/MainModule.cs
+++ b/Modules/MainModule/MainModule.cs
@@ -1,8 +1,8 @@
-using MainModule.Views;
+using Core;
+using MainModule.Views;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;
-using SharedModule;
using System;
namespace MainModule
diff --git a/MainModule/MainModule.csproj b/Modules/MainModule/MainModule.csproj
similarity index 67%
rename from MainModule/MainModule.csproj
rename to Modules/MainModule/MainModule.csproj
index e74d147..d49b0c4 100644
--- a/MainModule/MainModule.csproj
+++ b/Modules/MainModule/MainModule.csproj
@@ -1,4 +1,4 @@
-
+
netcoreapp3.1
@@ -10,7 +10,7 @@
-
+
diff --git a/MainModule/ViewModels/MainRegionViewModel.cs b/Modules/MainModule/ViewModels/MainRegionViewModel.cs
similarity index 93%
rename from MainModule/ViewModels/MainRegionViewModel.cs
rename to Modules/MainModule/ViewModels/MainRegionViewModel.cs
index 5596268..1024cd4 100644
--- a/MainModule/ViewModels/MainRegionViewModel.cs
+++ b/Modules/MainModule/ViewModels/MainRegionViewModel.cs
@@ -1,7 +1,7 @@
-using MainModule.Views;
+using Core;
+using MainModule.Views;
using Prism.Commands;
using Prism.Services.Dialogs;
-using SharedModule;
using System;
using System.Collections.Generic;
using System.Text;
diff --git a/MainModule/ViewModels/WindowTestViewModel.cs b/Modules/MainModule/ViewModels/WindowTestViewModel.cs
similarity index 70%
rename from MainModule/ViewModels/WindowTestViewModel.cs
rename to Modules/MainModule/ViewModels/WindowTestViewModel.cs
index 4d97ec8..8912a15 100644
--- a/MainModule/ViewModels/WindowTestViewModel.cs
+++ b/Modules/MainModule/ViewModels/WindowTestViewModel.cs
@@ -1,7 +1,4 @@
-using SharedModule;
-using System;
-using System.Collections.Generic;
-using System.Text;
+using Core;
namespace MainModule.ViewModels
{
diff --git a/MainModule/Views/MainRegionView.xaml b/Modules/MainModule/Views/MainRegionView.xaml
similarity index 100%
rename from MainModule/Views/MainRegionView.xaml
rename to Modules/MainModule/Views/MainRegionView.xaml
diff --git a/MainModule/Views/MainRegionView.xaml.cs b/Modules/MainModule/Views/MainRegionView.xaml.cs
similarity index 100%
rename from MainModule/Views/MainRegionView.xaml.cs
rename to Modules/MainModule/Views/MainRegionView.xaml.cs
diff --git a/MainModule/Views/WindowTestView.xaml b/Modules/MainModule/Views/WindowTestView.xaml
similarity index 100%
rename from MainModule/Views/WindowTestView.xaml
rename to Modules/MainModule/Views/WindowTestView.xaml
diff --git a/MainModule/Views/WindowTestView.xaml.cs b/Modules/MainModule/Views/WindowTestView.xaml.cs
similarity index 100%
rename from MainModule/Views/WindowTestView.xaml.cs
rename to Modules/MainModule/Views/WindowTestView.xaml.cs
diff --git a/WpfCoreApp/App.xaml b/Shell/App.xaml
similarity index 100%
rename from WpfCoreApp/App.xaml
rename to Shell/App.xaml
diff --git a/WpfCoreApp/App.xaml.cs b/Shell/App.xaml.cs
similarity index 83%
rename from WpfCoreApp/App.xaml.cs
rename to Shell/App.xaml.cs
index d70e19c..4275334 100644
--- a/WpfCoreApp/App.xaml.cs
+++ b/Shell/App.xaml.cs
@@ -1,5 +1,6 @@
using Prism.Ioc;
using Prism.Modularity;
+using SharedModule;
using System.Windows;
namespace WpfCoreApp
@@ -21,9 +22,7 @@ protected override void RegisterTypes(IContainerRegistry containerRegistry)
protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
{
- base.ConfigureModuleCatalog(moduleCatalog);
-
- moduleCatalog.AddModule();
+ moduleCatalog.AddModule();
moduleCatalog.AddModule();
}
}
diff --git a/WpfCoreApp/AssemblyInfo.cs b/Shell/AssemblyInfo.cs
similarity index 100%
rename from WpfCoreApp/AssemblyInfo.cs
rename to Shell/AssemblyInfo.cs
diff --git a/WpfCoreApp/MainWindow.xaml b/Shell/MainWindow.xaml
similarity index 76%
rename from WpfCoreApp/MainWindow.xaml
rename to Shell/MainWindow.xaml
index 7a6ff65..02194e9 100644
--- a/WpfCoreApp/MainWindow.xaml
+++ b/Shell/MainWindow.xaml
@@ -4,11 +4,11 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
- xmlns:shared="clr-namespace:SharedModule;assembly=SharedModule"
+ xmlns:core="clr-namespace:Core;assembly=Core"
prism:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d"
- Title="First WPF Core App" Height="450" Width="800">
+ Title="WPF .NET Core Shell" Height="450" Width="800">
-
+
diff --git a/WpfCoreApp/MainWindow.xaml.cs b/Shell/MainWindow.xaml.cs
similarity index 100%
rename from WpfCoreApp/MainWindow.xaml.cs
rename to Shell/MainWindow.xaml.cs
diff --git a/WpfCoreApp/WpfCoreApp.csproj b/Shell/Shell.csproj
similarity index 73%
rename from WpfCoreApp/WpfCoreApp.csproj
rename to Shell/Shell.csproj
index 095d53f..a87bc64 100644
--- a/WpfCoreApp/WpfCoreApp.csproj
+++ b/Shell/Shell.csproj
@@ -13,8 +13,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/WpfCoreApp.sln b/WpfCoreApp.sln
index ae177ac..e81b344 100644
--- a/WpfCoreApp.sln
+++ b/WpfCoreApp.sln
@@ -3,13 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfCoreApp", "WpfCoreApp\WpfCoreApp.csproj", "{CFC5C94B-87FB-46D3-AA88-87372A1D5314}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shell", "Shell\Shell.csproj", "{CFC5C94B-87FB-46D3-AA88-87372A1D5314}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{C61A656E-515E-4911-AE99-A84B699992BD}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedModule", "SharedModule\SharedModule.csproj", "{249554B8-60F8-4AEB-A033-F533D8C07B48}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommonServicesModule", "Modules\CommonServicesModule\CommonServicesModule.csproj", "{249554B8-60F8-4AEB-A033-F533D8C07B48}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MainModule", "MainModule\MainModule.csproj", "{7DF4675C-FD41-4B91-8F55-09CBA0791211}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MainModule", "Modules\MainModule\MainModule.csproj", "{7DF4675C-FD41-4B91-8F55-09CBA0791211}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core", "Core\Core.csproj", "{E274215D-3212-4598-ADC7-2CB224331B71}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -29,6 +31,10 @@ Global
{7DF4675C-FD41-4B91-8F55-09CBA0791211}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DF4675C-FD41-4B91-8F55-09CBA0791211}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7DF4675C-FD41-4B91-8F55-09CBA0791211}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E274215D-3212-4598-ADC7-2CB224331B71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E274215D-3212-4598-ADC7-2CB224331B71}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E274215D-3212-4598-ADC7-2CB224331B71}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E274215D-3212-4598-ADC7-2CB224331B71}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE