public ContentModule(ICms nodeTreeCms) { Get["/"] = Get["/{any}"] = _ => { var node = nodeTreeCms.DocumentNodeByUrl(Request.Url.Path); return View[node.ViewPath, node]; }; }
public AdminModule(ICms nodeTreeCms) : base(nodeTreeCms.Settings.AdminUrl) { Get["/"] = Get["/{root}"] = parameters => { return nodeTreeCms.AdminPage(Request.Url.Path).ToString(); }; Post["/"] = Post["/{root}"] = parameters => { return nodeTreeCms.AdminPage(Request.Url.Path, Request.Form).ToString(); }; }
public TreeService( ISetupResolver <ICollectionSetup> collectionResolver, ISetupResolver <IPageSetup> pageResolver, ISetupResolver <IEnumerable <ITreeElementSetup> > treeElementResolver, ICms cms, IRepositoryResolver repositoryResolver, IAuthService authService, IParentService parentService) { _collectionResolver = collectionResolver; _pageResolver = pageResolver; _treeElementResolver = treeElementResolver; _cms = cms; _repositoryResolver = repositoryResolver; _authService = authService; _parentService = parentService; }
internal static ICms Create(byte[] cmsBytes) { if (cmsBytes == null) { throw new ArgumentNullException(nameof(cmsBytes)); } #if IS_SIGNING_SUPPORTED ICms cms = null; #if IS_DESKTOP NativeCms nativeCms = NativeCms.Decode(cmsBytes); cms = new NativeCmsWrapper(nativeCms); #else SignedCms signedCms = new SignedCms(); signedCms.Decode(cmsBytes); cms = new ManagedCmsWrapper(signedCms); #endif return(cms); #else throw new NotSupportedException(); #endif }
public TreeService( ISetupResolver <CollectionSetup> collectionResolver, ISetupResolver <PageSetup> pageResolver, ISetupResolver <IEnumerable <TreeElementSetup> > treeElementResolver, ICms cms, IRepositoryResolver repositoryResolver, IAuthService authService, IParentService parentService, IConcurrencyService concurrencyService, IHttpContextAccessor httpContextAccessor) { _collectionResolver = collectionResolver; _pageResolver = pageResolver; _treeElementResolver = treeElementResolver; _cms = cms; _repositoryResolver = repositoryResolver; _authService = authService; _parentService = parentService; _concurrencyService = concurrencyService; _httpContextAccessor = httpContextAccessor; }