Created
September 18, 2012 04:32
-
-
Save jmarnold/3741267 to your computer and use it in GitHub Desktop.
Sample twitter app
This file contains hidden or 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
public class Global : System.Web.HttpApplication | |
{ | |
protected void Application_Start(object sender, EventArgs e) | |
{ | |
FubuApplication | |
.For(new FubuRegistry(x => | |
{ | |
x.Actions.IncludeClassesSuffixedWithController(); | |
x.Routes.HomeIs<MyController>(c => c.get_something()); | |
x.Services(s => s.ReplaceService(new OAuthSettings | |
{ | |
ConsumerKey = "key", | |
ConsumerSecret = "secret" | |
})); | |
})) | |
.StructureMapObjectFactory() | |
.Bootstrap(); | |
PackageRegistry.AssertNoFailures(); | |
} | |
} |
This file contains hidden or 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
public class MyController | |
{ | |
public HtmlDocument get_something() | |
{ | |
var doc = new HtmlDocument(); | |
doc.Add(new HtmlTag("h1").Text("Hello, {0}".ToFormat(FubuPrincipal.Current().Name))); | |
return doc; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment