Skip to content

Instantly share code, notes, and snippets.

@JakeGinnivan
Created January 19, 2012 03:42
Show Gist options
  • Save JakeGinnivan/1637638 to your computer and use it in GitHub Desktop.
Save JakeGinnivan/1637638 to your computer and use it in GitHub Desktop.
public class ControllerActionShortcut<TController> : IShortcut where TController : Controller
{
readonly Expression<Func<TController, ActionResult>> controllerAction;
protected ControllerActionShortcut(
Expression<Func<TController, ActionResult>> controllerAction,
DesktopModuleDefinition parentDefinition)
{
this.controllerAction = controllerAction;
ParentDefinition = parentDefinition;
}
public DesktopModuleDefinition ParentDefinition { get; private set; }
public Task Execute(INavigationFrame targetFrame)
{
return new InvokeActionBuilder<TController>(new ControllerActionContext(phoenixApplication))
.InvokeAction(targetFrame, controllerAction);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment