45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
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; }
|
|
}
|
|
}
|