private static MicrosoftCmsViewModel MapUmbracoContentToViewModel(IPublishedContent content, ILatestService latestService, ISocialMediaService socialMediaService, IEastSussex1SpaceService eastSussex1SpaceService, IWebChatSettingsService webChatSettingsService, IContentExperimentSettingsService contentExperimentSettingsService, IEscisService escisService)
        {
            var model = new MicrosoftCmsViewModel();

            var modelBuilder = new BaseViewModelBuilder();

            modelBuilder.PopulateBaseViewModel(model, content, contentExperimentSettingsService, UmbracoContext.Current.InPreviewMode);
            modelBuilder.PopulateBaseViewModelWithInheritedContent(model, latestService, socialMediaService, eastSussex1SpaceService, webChatSettingsService, escisService);

            return(model);
        }
Exemple #2
0
        private static async Task <MicrosoftCmsViewModel> MapUmbracoContentToViewModel(HttpRequestBase request, IPublishedContent content, DateTime?expiryDate, latest.ILatestService latestService, ISocialMediaService socialMediaService, IEastSussex1SpaceService eastSussex1SpaceService, IWebChatSettingsService webChatSettingsService, IContentExperimentSettingsService contentExperimentSettingsService, IEscisService escisService, IRatingSettingsProvider ratingSettings, ISkinToApplyService skinService)
        {
            var model = new MicrosoftCmsViewModel();

            var modelBuilder = new BaseViewModelBuilder(new EastSussexGovUKTemplateRequest(request, webChatSettingsService: webChatSettingsService));
            await modelBuilder.PopulateBaseViewModel(model, content, contentExperimentSettingsService,
                                                     expiryDate,
                                                     UmbracoContext.Current.InPreviewMode, skinService);

            modelBuilder.PopulateBaseViewModelWithInheritedContent(model, latestService, socialMediaService, eastSussex1SpaceService, escisService, ratingSettings);

            return(model);
        }