Created
January 19, 2012 03:42
-
-
Save JakeGinnivan/1637638 to your computer and use it in GitHub Desktop.
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
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