public void LoadPageData(string rootPath, string site, string parameter) { foreach (var region in regions) { switch (region.regionType) { case RegionType.Gallery: var galleryRegion = new GalleryRegion(region); galleryRegion.LoadData(rootPath, region.mappedObject, site); galleryRegions.Add(galleryRegion); break; case RegionType.Html: var htmlRegion = new HtmlRegion(region); htmlRegion.LoadData(site, rootPath, title, region.mappedObject); htmlRegions.Add(htmlRegion); break; case RegionType.YouTube: var youtubeRegion = new YouTubeRegion(region); youtubeRegion.LoadData(site, rootPath, title, region.mappedObject); youtubeRegions.Add(youtubeRegion); break; case RegionType.Blog: var blogRegion = new BlogRegion(region); blogRegion.LoadData(rootPath, region.mappedObject, site, parameter, friendlyUrl); blogRegions.Add(blogRegion); break; case RegionType.Map: var mapRegion = new MapRegion(region); mapRegion.LoadData(site, rootPath, title, region.mappedObject); mapRegions.Add(mapRegion); break; } } }