Esempio n. 1
0
        public ActionResult Story(string name, string animal, string bathroomTask, string reflectiveObject)
        {
            StoryVariables myStoryVariables = new StoryVariables();

            myStoryVariables.Name             = name;
            myStoryVariables.Animal           = animal;
            myStoryVariables.BathroomTask     = bathroomTask;
            myStoryVariables.ReflectiveObject = reflectiveObject;
            return(View(myStoryVariables));
        }
Esempio n. 2
0
        public ActionResult PrincessStory(string adjectiveOne, string name, string number, string relative, string firstLocation, string secondLocation)
        {
            StoryVariables myStoryVariables = new StoryVariables();

            myStoryVariables.AdjectiveOne   = adjectiveOne;
            myStoryVariables.Name           = name;
            myStoryVariables.Number         = number;
            myStoryVariables.Relative       = relative;
            myStoryVariables.FirstLocation  = firstLocation;
            myStoryVariables.SecondLocation = secondLocation;
            return(View(myStoryVariables));
        }
Esempio n. 3
0
        public ActionResult HalloweenStory(string verbOne, string adjectiveOne, string pluralNounOne, string colorOne, string noun, string verbTwo, string adjectiveTwo, string food)
        {
            StoryVariables myStoryVariables = new StoryVariables();

            myStoryVariables.VerbOne      = verbOne;
            myStoryVariables.AdjectiveOne = adjectiveOne;
            myStoryVariables.PluralNoun   = pluralNounOne;
            myStoryVariables.Color        = colorOne;
            myStoryVariables.Noun         = noun;
            myStoryVariables.VerbTwo      = verbTwo;
            myStoryVariables.AdjectiveTwo = adjectiveTwo;
            myStoryVariables.Food         = food;
            return(View(myStoryVariables));
        }
Esempio n. 4
0
 public HomeModule()
 {
     Get["/form"]  = parameters => View["form.html"];
     Get["/story"] = parameters => {
         var 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.cshtml", myStoryVariables]);
     };
 }
Esempio n. 5
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. 6
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]);
     };
 }