将NotificationService抽取成接口,并将所有使用NotificationService全部替换为接口INotificationService
This commit is contained in:
@@ -6,6 +6,7 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using DMS.Core.Interfaces.Services;
|
||||
using DMS.Core.Models;
|
||||
using DMS.WPF.Interfaces;
|
||||
using DMS.WPF.Services;
|
||||
using DMS.WPF.ViewModels.Items;
|
||||
|
||||
@@ -15,7 +16,7 @@ public partial class ImportExcelDialogViewModel : DialogViewModelBase<List<Varia
|
||||
{
|
||||
private readonly IMapper _mapper;
|
||||
private readonly IExcelService _excelService;
|
||||
private readonly NotificationService _notificationService;
|
||||
private readonly INotificationService _notificationService;
|
||||
|
||||
[ObservableProperty]
|
||||
private string? _filePath;
|
||||
@@ -29,7 +30,7 @@ public partial class ImportExcelDialogViewModel : DialogViewModelBase<List<Varia
|
||||
[ObservableProperty]
|
||||
private IList _selectedVariables = new ArrayList();
|
||||
|
||||
public ImportExcelDialogViewModel(IMapper mapper,IExcelService excelService, NotificationService notificationService)
|
||||
public ImportExcelDialogViewModel(IMapper mapper,IExcelService excelService, INotificationService notificationService)
|
||||
{
|
||||
_mapper = mapper;
|
||||
_excelService = excelService;
|
||||
|
||||
@@ -6,6 +6,7 @@ using CommunityToolkit.Mvvm.Input;
|
||||
using DMS.Core.Enums;
|
||||
using DMS.Infrastructure.Interfaces.Services;
|
||||
using DMS.Infrastructure.Models;
|
||||
using DMS.WPF.Interfaces;
|
||||
using DMS.WPF.Services;
|
||||
using DMS.WPF.ViewModels.Items;
|
||||
using Opc.Ua;
|
||||
@@ -92,7 +93,7 @@ public partial class ImportOpcUaDialogViewModel : DialogViewModelBase<List<Varia
|
||||
/// <summary>
|
||||
/// 通知服务实例
|
||||
/// </summary>
|
||||
private readonly NotificationService _notificationService;
|
||||
private readonly INotificationService _notificationService;
|
||||
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
@@ -101,7 +102,7 @@ public partial class ImportOpcUaDialogViewModel : DialogViewModelBase<List<Varia
|
||||
/// <param name="opcUaService">OPC UA服务接口实例</param>
|
||||
/// <param name="mapper">对象映射器实例</param>
|
||||
/// <param name="notificationService">通知服务实例</param>
|
||||
public ImportOpcUaDialogViewModel(IOpcUaService opcUaService, IMapper mapper, NotificationService notificationService)
|
||||
public ImportOpcUaDialogViewModel(IOpcUaService opcUaService, IMapper mapper, INotificationService notificationService)
|
||||
{
|
||||
_opcUaService = opcUaService;
|
||||
_mapper = mapper;
|
||||
|
||||
Reference in New Issue
Block a user