public static void Go(Helpers.Path.Parser path) { if (path.IsEmpty) { new BasicResponses.Login.Handler(path); } else if (path.Count.Equals(1)) { new BasicResponses.Login.Handler(path); } else if (path.Peek().Equals("dologin")) { BasicResponses.Login.Action.AttemptLogin(); } else { new BasicResponses.Login.Handler(path); } }
public static bool RequestSessionExempt(Helpers.Path.Parser path) { if (!path.IsEmpty) { string firstElement = path.Peek(); switch (firstElement) { case "resources": path.RemoveAt(0); Output.OutputBase response; Helpers.Resource resource = new Helpers.Resource(path); if (resource.IsBinary) { response = new Output.BinaryResource(resource); } else { response = new Output.StringResource(resource); } response.PrepareOutput(); response.Send(); return(true); case "selection": WebServer.Response.Write("<h1>Selection Screen</h1>"); return(true); case "quote": new BaseHandlers.QuoteHandler(); return(true); } } return(false); }