Esempio n. 1
0
 public HomeModule()
 {
     Get["/form"] = _ => {
     return View["form.cshtml"];
       };
       Get["/story"] = _ => {
     StoryVariables myStoryVariables = new StoryVariables();
     myStoryVariables.SetPerson1(Request.Query["person1"]);
     myStoryVariables.SetPerson2(Request.Query["person2"]);
     myStoryVariables.SetAnimal(Request.Query["animal"]);
     myStoryVariables.SetExclamation(Request.Query["exclamation"]);
     myStoryVariables.SetVerb(Request.Query["verb"]);
     myStoryVariables.SetNoun(Request.Query["noun"]);
     return View["story.cshtml", myStoryVariables];
       };
 }
Esempio n. 2
0
 public HomeModule()
 {
     Get["/form"] = _ => {
     return View["form.cshtml"];
       };
       Get["/story"] = _ => {
     StoryVariables myStoryVariables = new StoryVariables
     {
       Person1 = Request.Query["person1"],
       Person2 = Request.Query["person2"],
       Animal = Request.Query["animal"],
       Exclamation = Request.Query["exclamation"],
       Verb = Request.Query["verb"],
       Noun = Request.Query["noun"]
     };
     return View["story.html", myStoryVariables];
       };
 }
Esempio n. 3
0
 public HomeModule()
 {
     Get["/form"]= _ => {
     return View["form.cshtml"];
       };
       Get["/excellent_story"]=_=>{
     StoryVariables myStoryVariables = new StoryVariables
     {
       Person1 = Request.Query["person1"],
       Person2 = Request.Query["person2"],
       Adjective = Request.Query["adjective"],
       PluralFood = Request.Query["pluralFood"],
       HistoricalFigure = Request.Query["historicalFigure"],
       Animal = Request.Query["animal"],
       Exclamation = Request.Query["exclamation"],
       Verb = Request.Query["verb"],
       TimePeriod = Request.Query["timePeriod"]
     };
     return View["story.cshtml", myStoryVariables];
       };
 }