Aqueduct.Appia.Host.HtmlExporter.ConvertPathToNancyRequest C# (CSharp) Method

ConvertPathToNancyRequest() private method

private ConvertPathToNancyRequest ( string pagePath ) : Nancy.Request
pagePath string
return Nancy.Request
        private Request ConvertPathToNancyRequest(string pagePath)
        {
            //the result will be pages/test.cshtml
            string basePath = Path.Combine(_basePath, _configuration.PagesPath);
            string relativeUrl = pagePath.Replace(basePath, "").Replace(@"\", @"/").TrimStart('/');

            if (relativeUrl.LastIndexOf('.') > 0)
                relativeUrl = relativeUrl.Substring(0, relativeUrl.LastIndexOf('.'));

            return new Request(
                "GET",
                string.Concat("/", relativeUrl),
                "http");
        }