using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.FileData
{
public enum SearchMode
{
///
/// Ricerca occorrenze di una RegExp dentro il contenuto del file
///
StringOnFile,
///
/// Cerca da path relativo + nome file
///
PathAndName
}
public class SearchRules
{
#region Public Properties
///
/// Estensioni file esclusi
///
public List ExcludedFileExt { get; set; } = new List();
///
/// Pattern esclusione Tags (stop-words)
///
public List ExcludedTags { get; set; } = new List();
///
/// Pattern in formato RegExp
///
public Dictionary FileNameExtReplace { get; set; } = new Dictionary();
///
/// Quantità massima di caratteri da analizzare, 0 = tutti
///
public int MaxChar2Search { get; set; } = 100;
///
/// Modalità ricerca
///
public SearchMode Mode { get; set; } = SearchMode.StringOnFile;
///
/// Nome della regola di ricerca
///
public string Name { get; set; } = "ND";
///
/// Configurazione opzionale x rimozione filename da output finali
///
public bool OutExcludeFileName { get; set; } = true;
///
/// Replace in uscita per "bonificare" il tag
///
public Dictionary OutReplace { get; set; } = new Dictionary();
///
/// Pattern in formato RegExp
///
public string RegExPattern { get; set; } = "";
///
/// Configurazione opzionale x sostituzione placeholder {{fileName}} in RegExp con il VERO nome file
///
public bool RegExRepFileName { get; set; } = true;
///
/// Configurazione opzionale x sostituzione carriage return --> spazi
///
public bool ReplaceCR { get; set; } = true;
#endregion Public Properties
}
}