public override MultistepActionSettings Setup(int siteId, int contentId, bool?boundToExternal) { var content = ContentRepository.GetById(contentId); if (content == null) { throw new ApplicationException(string.Format(SiteStrings.SiteNotFound, siteId)); } List <Content.TreeItem> rebuildedViewSubContents; var helper = new VirtualContentHelper(); using (VirtualFieldRepository.LoadVirtualFieldsRelationsToMemory(contentId)) { rebuildedViewSubContents = helper.TraverseForUpdateVirtualSubContents(content); } _rebuildViewsCommand = new RebuildVirtualContentViewsCommand(contentId, content.Name, rebuildedViewSubContents); _rebuildViewsCommand.Setup(); _rebuildUserQueryCommand = new RebuildUserQueryCommand(contentId, content.Name, rebuildedViewSubContents); _rebuildUserQueryCommand.Setup(); return(base.Setup(siteId, contentId, boundToExternal)); }
public override void TearDown() { RebuildVirtualContentViewsCommand.TearDown(); RebuildUserQueryCommand.TearDown(); base.TearDown(); }