internal void PublishErrorPage() { const string address = ServerLauncher.ErrorAddress; var page = new PagePublished(DefaultServerError, HttpStatusCode.InternalServerError); _published.Publish(address, page); var combined = Published.CombinePathMethod(address, "POST"); _published.Publish(combined, page); }
/// <summary> /// Publishes a page. /// </summary> /// <param name="address">The URL address of the page.</param> /// <param name="pageFactory">Handler that creates instances of the page</param> public void PublishPage(string address, Func <IPage> pageFactory) => _published.Publish(address, new PagePublished(pageFactory));
/// <summary> /// Publishes a page with a component /// </summary> /// <param name="address">The URL address of the page</param> /// <param name="nodeFactory">Handler that creates instances of the component</param> public void PublishPage(string address, Func <Node> nodeFactory) => _published.Publish(address, new PagePublished(() => new SingleElementPage(nodeFactory)));