Skip to content

Instantly share code, notes, and snippets.

@joshuaflanagan
Created June 15, 2011 02:25
Show Gist options
  • Save joshuaflanagan/1026358 to your computer and use it in GitHub Desktop.
Save joshuaflanagan/1026358 to your computer and use it in GitHub Desktop.
Resharper demo
Assumes Resharper IntelliJ/IDEA Resharper keybindings
Create a new ASP.NET MVC Web application (Internet)
Open HomeController.cs and start typing outside of HomeController, but within the namespace:
cl[Tab]WorkController[Enter]
p[Tab]Ac[Tab]Show(){[Enter]
return _workflowService.GetResult();[Enter]
*position cursor on _workflowService
[Alt+Enter]f
IWorkflowService[Enter]
*position cursor on IWorkflowService
[Alt+Enter][Enter][Enter]
*position cursor on GetResult() call
[Alt+Enter][Enter][Enter]
*position cursor on _workflowService (field declaration)
[Alt+Enter][Enter]
*position cursor after workflowService in constructor (before closing paren)
ISecurityService[Space][CTRL+Space][UP arrow][Enter]
[Alt+Enter][Enter]
*position cursor on ISecurityService
[Alt+Enter][Enter]
*in IWorkflowService.GetResult, add a parameter so it looks like:
ActionResult GetResult(bool authorized);
*position cursor between parens in GetResult invocation of Show() method
_s[Tab].IsAuthorized()
*position cursor on IsAuthorized
[Alt+Enter][Enter][Enter]
*position cursor on ISecurityService (interface definition)
[Alt+Enter][Down][Enter][Enter]
[Alt+Enter][Enter]
re[Tab]tr[Tab];
*position cursor on WorkController
[Alt+Enter][Enter]
*position curosr on ISecurityService
[F6]
*change target folder to <appname>\Services (click Create this folder)
*check ISecurityService,SecurityService,IWorkflowService, press [Enter]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment