Example #1
0
        public void ClientRoute(dynamic Display, dynamic Shape, TextWriter Output)
        {
            var isFrontEnd = Shape.IsFrontEnd;
            var routes     = _clientRouteTableManager.GetRouteTable(isFrontEnd);
            var result     = Display.ClientBootstrapScript(IsFrontEnd: isFrontEnd, Routes: routes);

            Output.Write(result);
        }
Example #2
0
        // GET api/route
        public HttpResponseMessage Get(bool isFront)
        {
            var routes = new {
                f = "/404",
                t = _clientRouteTableManager.GetRouteTable(isFront)
            };

            var json    = JsonConvert.SerializeObject(routes);
            var message = new HttpResponseMessage {
                Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
            };

            return(message);
        }