Example #1
0
        private void InitilizeBaseUrls()
        {
            var tempDic = GetAddresses <Dictionary <ServiceIdentifier, ServiceInfo[]> >(Config)
                          .Where(it => it.Value?.Select(v => v.Address).FirstOrDefault() != null)
                          .ToDictionary(it => it.Key, it => it.Value);

            var tmp = new QuickReadConcurrentDictionary <ServiceIdentifier, ServiceInfo[]>();

            foreach (var item in tempDic)
            {
                tmp.Add(item.Key, item.Value);
            }

            _defaultBaseUrlDictionary = tmp;
        }
Example #2
0
        private void InitilizeBaseUrls()
        {
            var tempDic = GetAddresses<Dictionary<ServiceIdentifier, ServiceInfo[]>>(Config)
                .Where(it => it.Value?.Select(v => v.Address).FirstOrDefault() != null)
                .ToDictionary(it => it.Key, it => it.Value);

            var tmp = new QuickReadConcurrentDictionary<ServiceIdentifier, ServiceInfo[]>();
            foreach (var item in tempDic)
            {
                tmp.Add(item.Key, item.Value);
            }

            _defaultBaseUrlDictionary = tmp;
        }