init
This commit is contained in:
44
Common/DTS.Common.Import/ImportNotification.cs
Normal file
44
Common/DTS.Common.Import/ImportNotification.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Import.Enums;
|
||||
|
||||
namespace DTS.Common.Import
|
||||
{
|
||||
public class ImportStatus
|
||||
{
|
||||
public string Status { get; set; }
|
||||
public PossibleStatus PossibleStatus { get; set; }
|
||||
public ImportExtraStatus ExtraStatus { get; set; }
|
||||
}
|
||||
public interface IImportNotification
|
||||
{
|
||||
Action ImportDone { get; }
|
||||
Action<List<string>> ReportErrors { get; }
|
||||
Action<double> SetProgress { get; }
|
||||
Action<ImportStatus> SetStatus { get; }
|
||||
}
|
||||
|
||||
public class ImportNotification : IImportNotification
|
||||
{
|
||||
public ImportNotification(Action<List<string>> reportErrors, Action<ImportStatus> setStatus, Action<double> setProgress, Action importDone)
|
||||
{
|
||||
ReportErrors = reportErrors;
|
||||
SetStatus = setStatus;
|
||||
SetProgress = setProgress;
|
||||
ImportDone = importDone;
|
||||
}
|
||||
|
||||
public ImportNotification()
|
||||
{
|
||||
ReportErrors = (x) => { };
|
||||
SetStatus = (x) => { };
|
||||
SetProgress = (x) => { };
|
||||
ImportDone = () => { };
|
||||
}
|
||||
|
||||
public Action<List<string>> ReportErrors { get; private set; }
|
||||
public Action<ImportStatus> SetStatus { get; private set; }
|
||||
public Action<double> SetProgress { get; private set; }
|
||||
public Action ImportDone { get; private set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user