Exemple #1
0
        public void LoadOrReload(List <string> sources)
        {
            sources.ForEach(s =>
            {
                // Añadimos los no existentes.
                if (Counters.ContainsKey(s) == false)
                {
                    Counters[s] = new int[InitialValue.Count()];
                    Array.Copy(InitialValue, Counters[s], InitialValue.Count());
                }
            });
            // Borramos los no Existentes.
            var missings = Counters.Keys.Where(k => sources.Contains(k) == false).ToList();

            missings.ForEach(k => Counters.Remove(k));

            Trace($"FFH. LoadOrReload;;;{ToString()}");
        }