Skip to content

Instantly share code, notes, and snippets.

@chrisortman
Created January 15, 2009 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisortman/47273 to your computer and use it in GitHub Desktop.
Save chrisortman/47273 to your computer and use it in GitHub Desktop.
public partial class Application {
public Func<Url> Blog_Url = get('/blogs/index', x => x.Class('BlogController').Action('ShowBlogs'))
}
public partial class Site {
public class Blogs {
public static Func<int,URL> Show = get(() => {
//do some lookup and render
});
}
}
<a href="Site.Blogs.Show(1)">Show</a>
Somewhere in framework code
var action = ActionRegistry.Find(Site.Blogs.Show);
action.Invoke();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment