public HelpModule(IPoolManager poolManager, IConfigManager configManager, ISoftwareRepository softwareRepository) : base("/help") { Get["/faq"] = _ => { ViewBag.Header = "Frequently Asked Questions"; return(View["faq"]); }; Get["/gettingstarted/"] = _ => { var model = new GettingStartedModel { Stack = configManager.StackConfig, Pool = poolManager.Get(slug) }; ViewBag.ActiveLink = "help"; return(View["gettingstarted/index", model]); }; Get["/miningsoftware/"] = _ => { ViewBag.ActiveLink = "help"; return(View["miningsoftware", softwareRepository]); }; }
public ActionResult GettingStarted() { var gettingStartedModel = new GettingStartedModel { SurveyModel = new SurveyModel("GettingStarted") }; return(View(gettingStartedModel)); }
public HelpModule(IPoolManager poolManager, IConfigManager configManager, ISoftwareRepository softwareRepository) : base("/help") { Get["/faq"] = _ => { ViewBag.Header = "Frequently Asked Questions"; return(View["faq"]); }; Get["/gettingstarted/"] = _ => { var model = new GettingStartedModel { Stack = configManager.StackConfig, Pools = poolManager.GetAllAsReadOnly() }; return(View["gettingstarted/index", model]); }; Get["/gettingstarted/pool/{slug}"] = _ => { var pool = poolManager.Get(HttpUtility.HtmlEncode(_.slug)); // find the requested pool. if (pool == null) { return(View["error", new ErrorViewModel { Details = string.Format("The requested pool does not exist: {0}", _.slug) }]); } var model = new GettingStartedPoolModel { Stack = configManager.StackConfig, Pool = pool }; return(View["gettingstarted/pool", model]); }; Get["/miningsoftware/"] = _ => { return(View["miningsoftware", softwareRepository]); }; }