public ViewModel(BaseImporter importer, Stream fileStream) { reporter.LabelChanged += OnChange; reporter.ProgressChanged += OnChange; Load(importer, fileStream); }
/// <summary> /// Adds the importer to the manager. /// </summary> /// <param name="importer">Importer.</param> public void AddImporter(BaseImporter importer) { importers.Add(importer); }
async void Load(BaseImporter importer, Stream fileStream) { Value = (await importer.ImportAsync(fileStream, reporter)).ToString(); }