Example #1
0
        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);
        }
Example #2
0
 /// <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));
Example #3
0
 /// <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)));