using MP.Data.DatabaseModels; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MP.Data.Services { public class SharedMemService { /// /// Dizionario macchine (shared) /// public Dictionary DictMacchine { get; set; } = new Dictionary(); /// /// Dizionario Menu /// public Dictionary> DictMenu { get; set; } = new Dictionary>(); /// /// Reset cache memory /// public void ResetCache() { DictMacchine = new Dictionary(); DictMenu = new Dictionary>(); } /// /// Restituisce il livello pagina dato URL /// - se contiene ?IdxMacc --> T2D (detail) /// - altrimenti --> T2H /// /// /// public string PageLevel(string pageUrl) { string answ = "T2H"; if (pageUrl.Contains("?IdxMacc=")) { answ = "T2D"; } return answ; } } }