рефакторинг, работа с зависимостями
This commit is contained in:
parent
05d88ca8f1
commit
4fa2dc1779
@ -11,6 +11,7 @@ using ToolsDesktop.Models;
|
|||||||
using ToolsModule.Attributes;
|
using ToolsModule.Attributes;
|
||||||
using ToolsModule.BindingModels;
|
using ToolsModule.BindingModels;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.BusinessLogics;
|
||||||
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using ToolsModule.Extensions;
|
using ToolsModule.Extensions;
|
||||||
using ToolsModule.Interfaces;
|
using ToolsModule.Interfaces;
|
||||||
|
@ -10,7 +10,7 @@ using ToolsDesktop.Interfaces;
|
|||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.Attributes;
|
using ToolsModule.Attributes;
|
||||||
using ToolsModule.BindingModels;
|
using ToolsModule.BindingModels;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using ToolsModule.Extensions;
|
using ToolsModule.Extensions;
|
||||||
using ToolsModule.Interfaces;
|
using ToolsModule.Interfaces;
|
||||||
|
@ -3,6 +3,7 @@ using ToolsModule.Enums;
|
|||||||
using ToolsModule.Interfaces;
|
using ToolsModule.Interfaces;
|
||||||
using ToolsModule.Models;
|
using ToolsModule.Models;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using ToolsModule.DependencyManagment;
|
||||||
|
|
||||||
namespace ToolsModule.BusinessLogics
|
namespace ToolsModule.BusinessLogics
|
||||||
{
|
{
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
using ToolsModule.Interfaces;
|
using System;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace ToolsModule.BusinessLogics
|
namespace ToolsModule.DependencyManagment
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Менеджер для работы с зависимостями
|
/// Менеджер для работы с зависимостями
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DependencyManager
|
public class DependencyManager
|
||||||
{
|
{
|
||||||
private readonly IDependencyManager _dependencyManager;
|
private readonly IDependencyManager _dependencyManager;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace ToolsModule.Interfaces
|
namespace ToolsModule.DependencyManagment
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Интерфейс установки зависмости между элементами
|
/// Интерфейс установки зависмости между элементами
|
@ -1,4 +1,4 @@
|
|||||||
namespace ToolsModule.Interfaces
|
namespace ToolsModule.DependencyManagment
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Интерфейс для регистрации зависимостей в модулях
|
/// Интерфейс для регистрации зависимостей в модулях
|
@ -1,18 +1,17 @@
|
|||||||
using ToolsModule.Extensions;
|
using System;
|
||||||
using ToolsModule.Interfaces;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Xml.XPath;
|
using System.Xml.XPath;
|
||||||
|
using ToolsModule.Extensions;
|
||||||
|
|
||||||
namespace ToolsModule.BusinessLogics
|
namespace ToolsModule.DependencyManagment
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Загрузчик данных
|
/// Загрузчик данных
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static partial class ServiceProviderLoader
|
public static partial class ServiceProviderLoader
|
||||||
{
|
{
|
||||||
private static readonly string _configFileName = "DepartmentPortal.config";
|
private static readonly string _configFileName = "DepartmentPortal.config";
|
||||||
|
|
@ -1,14 +1,13 @@
|
|||||||
using ToolsModule.Interfaces;
|
using System;
|
||||||
using System;
|
|
||||||
using Unity;
|
using Unity;
|
||||||
using Unity.Lifetime;
|
using Unity.Lifetime;
|
||||||
|
|
||||||
namespace ToolsModule.BusinessLogics
|
namespace ToolsModule.DependencyManagment
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Работа с UnityContainer
|
/// Работа с UnityContainer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class UnityContainerManager : IDependencyManager
|
public class UnityContainerManager : IDependencyManager
|
||||||
{
|
{
|
||||||
private readonly IUnityContainer _unityContainer;
|
private readonly IUnityContainer _unityContainer;
|
||||||
|
|
@ -6,6 +6,7 @@ using DepartmentContract.ViewModels;
|
|||||||
using SecurityContract.BindingModels;
|
using SecurityContract.BindingModels;
|
||||||
using SecurityContract.Logics.IGenericEntityLogic;
|
using SecurityContract.Logics.IGenericEntityLogic;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.BusinessLogics;
|
||||||
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
|
|
||||||
namespace DepartmentBusinessLogic.BusinessLogics.GenericBusinessLogic
|
namespace DepartmentBusinessLogic.BusinessLogics.GenericBusinessLogic
|
||||||
|
@ -16,6 +16,7 @@ using System.Text;
|
|||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.BusinessLogics;
|
||||||
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using ToolsModule.Extensions;
|
using ToolsModule.Extensions;
|
||||||
using ToolsModule.Interfaces;
|
using ToolsModule.Interfaces;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
using DepartmentBusinessLogic.BusinessLogics.GenericBusinessLogic;
|
using DepartmentBusinessLogic.BusinessLogics.GenericBusinessLogic;
|
||||||
using DepartmentContract.Logics.IGenericEntityLogic;
|
using DepartmentContract.Logics.IGenericEntityLogic;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Interfaces;
|
|
||||||
|
|
||||||
namespace DepartmentBusinessLogic
|
namespace DepartmentBusinessLogic
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
using DepartmentContract.Services.IGenericEntityService;
|
using DepartmentContract.Services.IGenericEntityService;
|
||||||
using DepartmentDatabaseImplementation.Implementations;
|
using DepartmentDatabaseImplementation.Implementations;
|
||||||
using DepartmentDatabaseImplementation.Implementations.AbstractGenerticEntityService;
|
using DepartmentDatabaseImplementation.Implementations.AbstractGenerticEntityService;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Interfaces;
|
|
||||||
|
|
||||||
namespace DepartmentDatabaseImplementation
|
namespace DepartmentDatabaseImplementation
|
||||||
{
|
{
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
using DepartmentWindowsDesktop.EntityControls;
|
using DepartmentWindowsDesktop.EntityControls;
|
||||||
|
using System.Collections.Generic;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BindingModels;
|
using ToolsModule.BindingModels;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using ToolsModule.Interfaces;
|
using ToolsModule.Interfaces;
|
||||||
using ToolsModule.Models;
|
using ToolsModule.Models;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace DepartmentWindowsDesktop
|
namespace DepartmentWindowsDesktop
|
||||||
{
|
{
|
||||||
public class DepartmentWindowDesktopExtension : IWindowDesktopExtension
|
public class DepartmentWindowDesktopExtension : IWindowDesktopExtension
|
||||||
{
|
{
|
||||||
public List<WindowDesktopExtensionControlModel> GetListControlEntityList()
|
public List<WindowDesktopExtensionControlModel> GetListControlEntityList()
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@ using ToolsDesktop.BaseControls;
|
|||||||
using ToolsDesktop.Controls;
|
using ToolsDesktop.Controls;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
|
|
||||||
namespace DepartmentWindowsDesktop.EntityControls
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
@ -12,6 +12,7 @@ using ToolsDesktop.Helpers;
|
|||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.BusinessLogics;
|
||||||
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Extensions;
|
using ToolsModule.Extensions;
|
||||||
|
|
||||||
namespace DepartmentWindowsDesktop.EntityControls
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
@ -12,6 +12,7 @@ using ToolsDesktop.Helpers;
|
|||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.BusinessLogics;
|
||||||
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Extensions;
|
using ToolsModule.Extensions;
|
||||||
|
|
||||||
namespace DepartmentWindowsDesktop.EntityControls
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
@ -7,7 +7,7 @@ using ToolsDesktop.Controls;
|
|||||||
using ToolsDesktop.Helpers;
|
using ToolsDesktop.Helpers;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
|
|
||||||
namespace DepartmentWindowsDesktop.EntityControls
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
@ -12,6 +12,7 @@ using ToolsDesktop.Helpers;
|
|||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.BusinessLogics;
|
||||||
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Extensions;
|
using ToolsModule.Extensions;
|
||||||
|
|
||||||
namespace DepartmentWindowsDesktop.EntityControls
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
using ToolsModule.BusinessLogics;
|
using System;
|
||||||
using ToolsModule.Extensions;
|
|
||||||
using ToolsModule.Interfaces;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using ToolsModule.DependencyManagment;
|
||||||
|
using ToolsModule.Extensions;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
namespace DepartmentPortalDesctop
|
namespace DepartmentPortalDesctop
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Форма входа в систему
|
/// Форма входа в систему
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class FormEnter : Form
|
public partial class FormEnter : Form
|
||||||
{
|
{
|
||||||
public FormEnter()
|
public FormEnter()
|
||||||
{
|
{
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
using CoreDatabase;
|
using CoreDatabase;
|
||||||
using ToolsModule.BusinessLogics;
|
|
||||||
using ToolsModule.Interfaces;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using ToolsModule.DependencyManagment;
|
||||||
|
using ToolsModule.Interfaces;
|
||||||
|
|
||||||
namespace DepartmentPortalDesctop
|
namespace DepartmentPortalDesctop
|
||||||
{
|
{
|
||||||
static class Program
|
static class Program
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The main entry point for the application.
|
/// The main entry point for the application.
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
using SecurityBusinessLogic.BusinessLogics.GenericBusinessLogic;
|
using SecurityBusinessLogic.BusinessLogics.GenericBusinessLogic;
|
||||||
using SecurityContract.Logics;
|
using SecurityContract.Logics;
|
||||||
using SecurityContract.Logics.IGenericEntityLogic;
|
using SecurityContract.Logics.IGenericEntityLogic;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Interfaces;
|
|
||||||
|
|
||||||
namespace SecurityBusinessLogic
|
namespace SecurityBusinessLogic
|
||||||
{
|
{
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
using SecurityContract.Services.IGenericEntityService;
|
using SecurityContract.Services.IGenericEntityService;
|
||||||
using SecurityDatabaseImplementation.Implementations;
|
using SecurityDatabaseImplementation.Implementations;
|
||||||
using SecurityDatabaseImplementation.Implementations.AbstractGenerticEntityService;
|
using SecurityDatabaseImplementation.Implementations.AbstractGenerticEntityService;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Interfaces;
|
|
||||||
|
|
||||||
namespace SecurityDatabaseImplementation
|
namespace SecurityDatabaseImplementation
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,7 @@ using ToolsDesktop.Controls;
|
|||||||
using ToolsDesktop.Enums;
|
using ToolsDesktop.Enums;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.EntityControls
|
namespace SecurityWindowsDesktop.EntityControls
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
using ToolsDesktop.Interfaces;
|
using SecurityWindowsDesktop.EntityControls;
|
||||||
|
using SecurityWindowsDesktop.SpecialControls;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BindingModels;
|
using ToolsModule.BindingModels;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
using ToolsModule.Interfaces;
|
using ToolsModule.Interfaces;
|
||||||
using ToolsModule.Models;
|
using ToolsModule.Models;
|
||||||
using SecurityWindowsDesktop.EntityControls;
|
|
||||||
using SecurityWindowsDesktop.SpecialControls;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop
|
namespace SecurityWindowsDesktop
|
||||||
{
|
{
|
||||||
public class SecurityWindowDesktopExtension : IWindowDesktopExtension
|
public class SecurityWindowDesktopExtension : IWindowDesktopExtension
|
||||||
{
|
{
|
||||||
public List<WindowDesktopExtensionControlModel> GetListControlEntityList()
|
public List<WindowDesktopExtensionControlModel> GetListControlEntityList()
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ using System.Xml.Linq;
|
|||||||
using ToolsDesktop.Helpers;
|
using ToolsDesktop.Helpers;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.SpecialControls
|
namespace SecurityWindowsDesktop.SpecialControls
|
||||||
|
@ -5,7 +5,7 @@ using System.Xml.Linq;
|
|||||||
using ToolsDesktop.Helpers;
|
using ToolsDesktop.Helpers;
|
||||||
using ToolsDesktop.Interfaces;
|
using ToolsDesktop.Interfaces;
|
||||||
using ToolsDesktop.Models;
|
using ToolsDesktop.Models;
|
||||||
using ToolsModule.BusinessLogics;
|
using ToolsModule.DependencyManagment;
|
||||||
using ToolsModule.Enums;
|
using ToolsModule.Enums;
|
||||||
|
|
||||||
namespace SecurityWindowsDesktop.SpecialControls
|
namespace SecurityWindowsDesktop.SpecialControls
|
||||||
|
Loading…
Reference in New Issue
Block a user