internal bool TryGetContainerProvider(Guid id, out SPContainerProviderInfo containerProviderInfo)
 {
     lock (_containerProviders)
     {
         if (_containerProviders.TryGetValue(id, out containerProviderInfo))
         {
             return true;
         }
     }
     containerProviderInfo = null;
     return false;
 }
        private SPContainerProvider UpdateContainerProviderIfNecessary(ISharePointBoundary sharePointScope, SPContainerProviderInfo providerInfo)
        {
            var propertyProvider = sharePointScope.PropertyProvider;
            var configModules = Configuration.ReadAllModuleConfigurations(propertyProvider);
            foreach(var configModule in configModules)
            {
                // if the configuration is newer than the current provider
                // which means that new modules were added, since the provider was built
                if (configModule.ModifiedAt > providerInfo.LastRefresh)
                {
                    Trace.WriteLine(string.Format(Messages.ContainerProviderNeedsUpdate, sharePointScope, providerInfo.LastRefresh, configModule.ModifiedAt, Enum.GetName(typeof(SPScope), configModule.Scope)));
                    return CreateContainerProvider(sharePointScope, Configuration.ReadAllModules(configModules));
                }
            }

            Trace.WriteLine(string.Format(Messages.ContainerProviderNeedsNoUpdate, sharePointScope));
            // nothing changed, return "old" provider which is still valid);)
            return providerInfo.ContainerProvider;
        }