public string GetView(HttpListenerContext context, TemplatingProcessor templatingProcessor) { CurrentTime = DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture); Image = "/public/fahrenheit-451.png"; Test = context.Request.RemoteEndPoint.ToString(); SpartanTemplate template = new SpartanTemplate("image.html", "test.html", templatingProcessor, this); // Render the template. return(template.Render()); }
/// <summary> /// Initializes the route management class. /// This will also add all IView derived classes containing a RouteAttribute to a list. /// </summary> /// <param name="errorHandler"></param> public RouteManager(IErrorHandler errorHandler) { // Initialize the error handler. _errorHandler = errorHandler; // Create a list of views InitializeViews(); // Create an instance of the static file processor _staticFileProcessor = new StaticFileProcessor(); // Create an instance of the templating processor _templatingProcessor = new TemplatingProcessor(_errorHandler); }
public string GetView(HttpListenerContext context, TemplatingProcessor templatingProcessor) { return "View data from TestView"; }