private void AddToTable(string name, ProviderItem provider)
        {
            //try to find if the provider is in the table already

            if (_psProviderCacheTable.ContainsKey(name))
            {
                var list = _psProviderCacheTable[name];

                var index = list.FindIndex(each => (each.ModuleInfo.Version == provider.ModuleInfo.Version) && (each.ProviderPath.EqualsIgnoreCase(provider.ProviderPath)));

                if (index != -1)
                {
                    list[index] = provider;
                }
                else
                {
                    _psProviderCacheTable[name].Add(provider);
                }
            }
            else
            {
                var entry = new List <ProviderItem> {
                    provider
                };
                _psProviderCacheTable.Add(name, entry);
            }
        }
        private void AddToTable(string name, ProviderItem provider) {
            //try to find if the provider is in the table already

            if (_psProviderCacheTable.ContainsKey(name)) {
                var list = _psProviderCacheTable[name];

                var index = list.FindIndex(each => (each.ModuleInfo.Version == provider.ModuleInfo.Version) && (each.ProviderPath.EqualsIgnoreCase(provider.ProviderPath)));
 
                if (index != -1) {
                    list[index] = provider;

                } else {
                    _psProviderCacheTable[name].Add(provider);
                }
            } else {
                var entry = new List<ProviderItem> {
                    provider
                };
                _psProviderCacheTable.Add(name, entry);
            }
        }