Last active
December 23, 2015 13:19
-
-
Save beyond-code-github/6641602 to your computer and use it in GitHub Desktop.
Time dependant insulting route behavior with Superscribe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace WebApiModuleHelloWorld | |
{ | |
using System; | |
using Superscribe.Models; | |
public class HelloWorldModule : Superscribe.WebApi.Modules.SuperscribeModule | |
{ | |
public HelloWorldModule() | |
{ | |
this.Get["/"] = _ => "Hello World!"; | |
this.Get[ʅ / "Hello" / ((o, s) => DateTime.Now.Second > 45) * (ʃString)"Name"] = | |
_ => string.Format("Hello {0}... you smeg head", _.Parameters.Name); | |
this.Get[ʅ / "Hello" / (ʃString)"Name"] = | |
_ => string.Format("Hello {0}", _.Parameters.Name); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment