private void AddInheritedProperties(Site site, List <KeyValuePair <string, Site> > siteDictionary)
        {
            var index         = site.Properties["inherits"];
            var inheritedSite = siteDictionary.GetSiteByKey(DynamicSiteManager.CleanCacheKeyName(index));

            Assert.IsNotNull(inheritedSite, "Could not find base site '{0}' for site '{1}'.", DynamicSiteManager.CleanCacheKeyName(index), site.Name);

            foreach (var keyValuePair in inheritedSite.Properties.Where(keyValuePair => !site.Properties.ContainsKey(keyValuePair.Key)))
            {
                site.Properties[keyValuePair.Key] = keyValuePair.Value;
            }
        }
 public override Site GetSite(string siteName)
 {
     Assert.ArgumentNotNullOrEmpty(siteName, "siteName");
     InitializeSites();
     return(_dynamicSiteDictionary.GetSiteByKey(DynamicSiteManager.CleanCacheKeyName(siteName)));
 }