using System.Collections.Generic; using System.ComponentModel; using System.Runtime.CompilerServices; namespace DCIT.Core.Models { public class ExtractionProgress { public int Current { get; set; } public int Total { get; set; } public string Message { get; set; } } public class ExtractedDocumentText { public string FilePath { get; set; } public string VisibleText { get; set; } } public class ExtractionCandidate : INotifyPropertyChanged { private bool _append = true; private AutoExtractCategory _primaryCategory; private string _categoryDisplay; private string _originalText; private string _statisticDisplay; private string _firstDocumentPath; private int _firstOccurrenceOrder; public bool Append { get { return _append; } set { SetField(ref _append, value); } } public AutoExtractCategory PrimaryCategory { get { return _primaryCategory; } set { SetField(ref _primaryCategory, value); } } public string CategoryDisplay { get { return _categoryDisplay; } set { SetField(ref _categoryDisplay, value); } } public string OriginalText { get { return _originalText; } set { SetField(ref _originalText, value); } } public string StatisticDisplay { get { return _statisticDisplay; } set { SetField(ref _statisticDisplay, value); } } public string FirstDocumentPath { get { return _firstDocumentPath; } set { SetField(ref _firstDocumentPath, value); } } public int FirstOccurrenceOrder { get { return _firstOccurrenceOrder; } set { SetField(ref _firstOccurrenceOrder, value); } } public event PropertyChangedEventHandler PropertyChanged; protected void SetField(ref T field, T value, [CallerMemberName] string propertyName = null) { if (EqualityComparer.Default.Equals(field, value)) { return; } field = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } } public class AutoExtractResult { public List Candidates { get; } = new List(); public List Warnings { get; } = new List(); public int DocumentsProcessed { get; set; } public int DocumentsSkipped { get; set; } } }