Esempio n. 1
0
        private void FillCreditTypeAndSubtypeHash(string creditType, string creditSubtype)
        {
            if (CreditType.Contains(creditType) == false)
            {
                CreditType.Add(creditType);

                CreditSubtype.Add(creditType, new HashSet <string>());
            }

            var creditSubTypes = CreditSubtype[creditType];

            if (creditSubTypes.Contains(creditSubtype) == false)
            {
                creditSubTypes.Add(creditSubtype);
            }
        }
Esempio n. 2
0
        private void InsertCreditSubtypes()
        {
            var count = _cache.CreditSubtype.Select(c => c.Value.Count).Sum();

            ProgressMaxChanged?.Invoke(this, new EventArgs <int>(count));

            Feedback?.Invoke(this, new EventArgs <string>("Credit Subtype"));

            var currentProgress = 0;

            foreach (var item in _cache.CreditSubtype)
            {
                var creditTypeEntity = CreditType[item.Key];

                var creditSubtype = InsertCreditSubtypes(creditTypeEntity, item.Value, ref currentProgress);

                CreditSubtype.Add(item.Key, creditSubtype);
            }

            ReportFinish();
        }