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> ReportErrors { get; } Action SetProgress { get; } Action SetStatus { get; } } public class ImportNotification : IImportNotification { public ImportNotification(Action> reportErrors, Action setStatus, Action setProgress, Action importDone) { ReportErrors = reportErrors; SetStatus = setStatus; SetProgress = setProgress; ImportDone = importDone; } public ImportNotification() { ReportErrors = (x) => { }; SetStatus = (x) => { }; SetProgress = (x) => { }; ImportDone = () => { }; } public Action> ReportErrors { get; private set; } public Action SetStatus { get; private set; } public Action SetProgress { get; private set; } public Action ImportDone { get; private set; } } }