SlideShare ist ein Scribd-Unternehmen logo
1 von 51
Introducing



The most intelligent plug-in for
Visual Studio




                                   1
ReSharper in a Nutshell

Coding productivity tool for Visual Studio users
Supports C#, VB.NET, XML, XAML, ASP.NET, HTML/
 CSS/JavaScript, build scripts
Continuous code quality analysis: error detection and
 quick-fixes
Navigation, coding assistance, code generation, unit
 test integration…

                                                         2
Visual Studio with ReSharper




                               3
Syntax Highlighting
R# extends VS highlighting:
 For fields, variables, constants, methods, operators, types, etc.
 In C# and VB.NET:




                                                                      4
Code Analysis
R# provides on-the-fly code quality analysis.
4 categories of analysis results:
 Errors


 Warnings


 Suggestions




 Hints

                                                5
Code Inspections Wiki
Some suggestions are very technical, so ReSharper offers explanations:




  Clicking on the “Why is ReSharper
  Suggesting This” item opens up
  the corresponding page in the
  Code Inspection Wiki:

                                                                         6
Marker Bar

 Marker Bar is a sidebar to the right-  Status Indicator shows the
  hand side of the text editor.            overall status of the current file:
 MB represents all R# highlights in
  file (warnings, errors, suggestions,    It changes color if file contains
  to-do items and search results):         errors or warnings:
                                               File contains compilation errors
                                               File has warnings but no errors
                                               File doesn't contain errors or
                                                   warnings




                                                                                  7
Solution-Wide Analysis
 ReSharper can analyze your whole solution for errors
 To turn on, double-click the bottom left icon in Visual Studio:




 Circle is green if there are no errors, red otherwise
 Double-click the circle to see a list of issues




                                                                    8
Find Code Issues

 ReSharper can locate all issues (errors       ReSharper can also help find issues
  and warnings) in the current project or        similar to the one that has just been
  the whole solution                             encountered:

 To get a list of issues, use the menu item
  ReSharper | Inspect | Code Issues in
  Solution/Current Project


 ReSharper presents a tree of all issues       Similar issues can be searched at

  found, with various grouping options:          different (including Custom) scopes:




                                                                                         9
Quick-Fixes
 Quick-fixes make you code free of errors and smells
 Available for most errors, warnings, and suggestions that R# displays
 Bulbs used to indicate availability
     Red bulb       indicates an error
     Yellow bulb        indicates a warning
 To display the list of available quick-fixes, press Alt+Enter:




 Hundreds of quick-fixes to perform multiple fixes

                                                                          10
Context Actions
 Context actions are "mini-refactorings" intended for optional code
  transformations in a certain context. Examples:
      Modifying the structure of conditional statements
      Joining local variable declaration and assignment
      Iterating collections with foreach statements
 Context actions are available for C#, VB.NET and XML
 Pencil icon    to the left a code line means CAs are available




                                                                       11
Code Completion
 R# complements native VS IntelliSense with 3 types of code completion:
      Symbol Completion
      Smart Completion
      Import Symbol Completion
 Enhancements compared to Visual Studio include:
      Immediate members are highlighted (vs inherited members)
      All overloads displayed in a pop-up, you can scroll between them
      Icons for parameters and local vars to distinguish them from fields
      Completion list is narrowed down to match user input
      CamelHumps: complete a long type name by typing “drfb"
       instead of "DecoderReplacementFallbackBuffer"

                                                                         12
Symbol Completion
 Suggesting type-based variable names:




 Suggesting members of a class:




 Suggesting visible types:



                                           13
Symbol Completion (cont.)
 Suggesting C# keywords:




 Symbol completion using CamelHumps:




 Completing names of symbols in build scripts:




                                                  14
Smart Completion
 Smart Code Completion (Ctrl+Alt+Space):
      Filters the list of types, methods, and variables to match the
       expected type of an expression
      If several return types are possible, detects the most recently used
       symbol of an applicable type and focuses it in the lookup list
      Suggests creating anonymous delegates, lambda expressions, and
       regular methods, as well as local variables for out parameters
      In object initializers, suggests fields/properties that were not yet
       assigned a value



                                                                              15
Smart Completion (cont.)
 In object initializers:




 In lambda expressions:




 Creating a local variable in place of an out parameter:




                                                            16
Import Completion
 In C# for extension methods:




 In C# using CamelHumps:




 In ASP.NET:




                                           17
Complete Statement
 Complete Statement (Ctrl+Shift+Enter):
      Inserts necessary syntax elements (braces, semicolons etc.)
       and gets you in position to start the next statement
      Is helpful in auto-closing parentheses, adding semicolons,
       completing if, while and for statements etc.
      Available for type members, statements, and expressions
 Nested method invocation: before Complete Statement:




 Nested method invocation: after Complete Statement:

                                                                     18
Parameter Info
 When you call a method, Parameter Info (Ctrl+Shift+Space):
      Automatically shows all available signatures and parameters with
       relevant documentation
      Grays out inapplicable signatures as you add new arguments




                                                                          19
Quick Documentation
 Quick Documentation (Ctrl+Shift+F1):
      Shows a pop-up with available doc for any documented symbol
      Does so in the text editor, in any ReSharper tool window, or within
       documentation comments
      Provides hyperlinks to detailed information and documentation for
       related symbols




                                                                         20
Namespace Import Pop-Ups
 When referencing a non-imported type, ReSharper helps promptly add it
  to the list of namespace import directives
 Adding a using directive this way doesn't interrupt your coding session




 When pasting code from another part of your application, ReSharper will
  offer to import all required types:



                                                                            21
Live Templates
 Live templates are predefined code fragments (expressions, constructs,
  classes, methods etc.) that can be quickly inserted into code
 By default, ReSharper 5 provides more than 20 live templates for C#, 17
  for VB.NET, 6 for ASP.NET and 3 for XML
      Iterating through collections
      Creating assertion methods
      Creating new arrays
      Outputting values
      Coding LINQ queries
      Generating auto-properties

                                                                       22
Surround Templates
 Surround templates let you select code and surround it with code from a
  live template (e.g., with a try-catch block)
 Select the text to surround and press Ctrl+E,Ctrl+U to open up a list of
  surround templates
 Use keyboard shortcuts to select
  one of the templates
 Choose More… to see all available
  templates and select which ones
  appear in the quicklist



                                                                             23
Structural Search and Replace (SSR)
 SSR lets you create your own patterns to search for code smells, legacy
  code constructs, etc.
 Open the patterns catalog in ReSharper | Tools | Patterns Catalog
 Define your own patterns and what to replace them with
 ReSharper will highlight instances where pattern matches, and offers the
  quick-fix for replacement:




                                                                        24
Navigate To
 Navigate To (Alt+`): context menu that shows all navigation options
  available at the current caret position:




                                                                        25
Navigate To (cont.)
 Specifically, you can navigate to:
      Declaration                      Conflicting declarations
      Implementation                   Member overloads
      Base symbols                     Related files
      Derived symbols                  To-do explorer
      Types of symbol                  Test explorer
      Usages of symbol                 Object browser
      Control flow target              Metadata view
      Function exit(s)                 Sources from symbol files
      Overriding members               Decompiled sources

                                                                     26
Navigate To (cont.)
 You can navigate to source files    ReSharper downloads PDBs from
  located outside your solution        the source server…
      E.g., .Net Framework
        Source Code

 Simply select navigation to
  external symbol



                                      And displays the source file:




                                                                       27
Call & Value Tracking
 ReSharper lets you can track…      Inspections indicate all affected
 Incoming and outgoing               locations up/down the call chain:
  calls to a method (method calls
  resulting in this call being
  made, or calls resulting from
  the call of this method)
 Origin and destination
  of values (who provides
  the value and where it goes)
 Menu items are available
  under ReSharper | Inspect
                                                                      28
Generate
 Generate drop-down menu (Alt+Ins) helps:
      Implement and override members
      Generate properties
      Generate type constructors
      Generate delegating members
      Generate equality members
      Generate formatting members




                                             29
Refactor This
 ReSharper provides 40+ solution-wide refactorings.
 Refactor This (Ctrl+Shift+R): context menu to view and call refactorings
  available at a certain code position:




                                                                         30
Find Usages
 Find Usages (Alt+F7) quickly locates usages of a symbol solution-wide
 In mixed-language solutions, finds usages multiple languages
 Search results are displayed in the Find Results window:




                                                                          31
Navigation & Search
3 groups of "go to" navigation commands.
 Group 1: Navigate from anywhere. Commands in this group open in pop-
  up windows, support CamelHumps and wildcards (* for 0 or more
  characters, ? for 1 or more characters):
      Go to Symbol
      Go to Type
      Go to File Member
      Go to File




                                                                    32
Navigation & Search (cont.)
 Group 2: Navigate from occurrence of a specific symbol. Navigate from
  Here is used as a shortcut for these commands:
      Go to Declaration
      Go to Type Declaration
      Go to Base
      Go to Inheritor
      Go to Usages




                                                                      33
Navigation & Search (cont.)
 Group 3: Navigate from anywhere within a type:
      Go to Next/Previous Member
      Go to Containing Declaration
+ Go to Last Edit Location navigates to the point of the most recent code
  modification




                                                                            34
View Recent Edits
 Recent Edits (Ctrl+Shift+,) is a pop-up window similar to Recent Files
  that shows files and symbols that you have recently modified:




                                                                           35
Locate in Solution Explorer
 Locate in Solution Explorer (Shift+Alt+L) highlights the currently opened
  file in Solution Explorer and auto-scrolls to its entry:




 It is especially useful in large solutions, or when screen area limitations
  forces you to shrink the Solution Explorer window to the limit




                                                                                36
File Structure
 File Structure window (Ctrl+Alt+F) shows members or elements that the
  current code or markup file contains, and lets you navigate directly to
  their declarations:




                                                                            37
Type Hierarchy
 Type Hierarchy (Ctrl+Alt+H at a type usage) shows the inheritance
  hierarchy of a specified type; its base types and inheritors:




                                                                      38
ReSharper Refactorings
 The richest set of automated solution-wide refactorings for C# and VB
  available in Visual Studio ecosystem (40+ refactorings as of R# 5)
 200+ context actions = “mini-refactorings”
 Each code refactoring analyzes the entire scope of the code selection to
  which it is applied (as wide as whole solution), including cross-language
  code




                                                                          39
ReSharper Refactorings (cont.)
 Refactorings can be invoked with:
      Individual keyboard shortcuts (whenever available)
      Refactor This (Ctrl+Shift+R) context menu that lists contextually
        available refactorings
      ReSharper | Refactor menu
      Some refactorings can be triggered with context actions (watch the
        yellow bulb)
 If a conflict is detected that prevents running a refactoring, a special
  warning screen is shown, and the user can modify the code to resolve
  the issue

                                                                             40
In-Place Refactorings
 ReSharper can detect when changes in code lead to a refactoring. In
  this case, the refactoring is offered in-place via a context action.


 For example, when a variable is renamed, the Rename refactoring is
  offered in-place:




                                                                         41
Code Cleanup
 Code Cleanup (Ctrl+E,C) combines customizable code formatting in any
  scope with a set of other useful actions, including:
      Removing code redundancies (C#)
      Optimizing namespace import directives (C#, VB.NET)
      Reordering type members (C#)
      Migrating to C# 3.0/4.0
 For example, you can simply run Code Cleanup to remove code
  redundancies instead of navigating between individual warnings and
  fixing them one-by-one



                                                                       42
Unit Testing
 ReSharper recognizes NUnit
  tests and lets you run or debug
  them
  in Visual Studio
 You can run or debug:
      A single unit test
      All tests in a test class
      All tests in a project
      All tests in a solution
 ReSharper provides two tool
  windows – Unit Test Explorer and
  Unit Test Sessions – to view, run
  and manage unit tests                           43
Support for ASP.NET MVC
 Special syntax highlighting for      Dedicated code completion to
  ASP.NET MVC method calls              help you reference actions and
  and parameters                        controllers in string literals:




 Navigation to/from actions and controllers




 Creation of new controllers and actions from usage




                                                                          44
Support for HTML/CSS/JavaScript
 ReSharper comes with comprehensive support for HTML, CSS and
  JavaScript, including
     Inspections


     Refactorings




     Navigation



     And a lot more…
                                                                 45
Localization
 Localizable strings are highlighted  Refactorings (move, rename,
  and context actions are available     inline, safe delete) are available
  for moving them to resources          on resources
                                       A special version of the File
                                        Structure window is available for
                                        viewing resource files
                                       Resource-specific code
                                        inspections are available
                                       Find Usages works naturally on
                                        resources
                                       Navigation items “Go to Inheritor”
 This functionality is available not   and “Go to Base” help you move
  just in code, but also in web apps    between culture-neutral and
  and arbitrary HTML strings            culture-specific resource files


                                                                         46
Color Assistance

ReSharper helps identify colors in code (C#, VB) and
markup (XAML, CSS) by using the color to underline
the identifier:



Completion menus are stylized   CSS support also comes with a
to show colors:                 dedicated color palette:




                                                                47
Decompiler

No source? No problem! ReSharper comes with a
built-in decompiler*




*Also available separately as dotPeek, see http://jetbrains.com/decompiler   48
Optimize References

ReSharper can show you details of how project references are
used in your project:




Alternatively, you can just quickly remove all unused ones:




                                                               49
ReSharper Plugins
 Some of ReSharper plug-ins include:
      Gallio: support for MbUnit, MSTest, NBehave, NUnit and xUnit.Net
      Agent Smith: validation of XML comments and naming
        conventions; spell checking in XML comments, string literals,
        identifiers and resources
      Agent Johnson: miscellaneous tools and refactorings
      StyleCop for ReSharper: support for Microsoft StyleCop




                                                                        50
Summary: Most Important Shortcuts
 Alt+Enter: display the list of available quick-fixes and/or context actions
 Alt+Ins: show code generation options
 Alt+` (Navigate To): show available navigation options
 Ctrl+Shift+R (Refactor This): show available refactorings
 Ctrl+Space (Symbol Completion), Ctrl+Alt+Space (Smart Completion),
  Shift+Alt+Space (Import Symbol Completion)
 Ctrl+E,C (Code Cleanup)




                                                                            51

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展
 
Bloc for Pharo: Current State and Future Perspective
Bloc for Pharo: Current State and Future PerspectiveBloc for Pharo: Current State and Future Perspective
Bloc for Pharo: Current State and Future Perspective
 
Postman.ppt
Postman.pptPostman.ppt
Postman.ppt
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Microdown
MicrodownMicrodown
Microdown
 
Oops concept on c#
Oops concept on c#Oops concept on c#
Oops concept on c#
 
Clean Code na Prática
Clean Code na PráticaClean Code na Prática
Clean Code na Prática
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#
 
software process model
software process modelsoftware process model
software process model
 
Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for selenium
 
c# usage,applications and advantages
c# usage,applications and advantages c# usage,applications and advantages
c# usage,applications and advantages
 
Api testing bible using postman
Api testing bible using postmanApi testing bible using postman
Api testing bible using postman
 
On to code review lessons learned at microsoft
On to code review lessons learned at microsoftOn to code review lessons learned at microsoft
On to code review lessons learned at microsoft
 
Java class,object,method introduction
Java class,object,method introductionJava class,object,method introduction
Java class,object,method introduction
 
Performance tests with Gatling
Performance tests with GatlingPerformance tests with Gatling
Performance tests with Gatling
 
Painless JavaScript Testing with Jest
Painless JavaScript Testing with JestPainless JavaScript Testing with Jest
Painless JavaScript Testing with Jest
 
A journey beyond the page object pattern
A journey beyond the page object patternA journey beyond the page object pattern
A journey beyond the page object pattern
 
C# language
C# languageC# language
C# language
 
Clean code
Clean codeClean code
Clean code
 
Advance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptxAdvance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptx
 

Andere mochten auch

Developing multi tenant applications for the cloud 3rd edition
Developing multi tenant applications for the cloud 3rd editionDeveloping multi tenant applications for the cloud 3rd edition
Developing multi tenant applications for the cloud 3rd edition
Steve Xu
 

Andere mochten auch (17)

JetBrains ReSharper
JetBrains ReSharperJetBrains ReSharper
JetBrains ReSharper
 
ReSharper SDK
ReSharper SDKReSharper SDK
ReSharper SDK
 
Docker workflow
Docker workflowDocker workflow
Docker workflow
 
Ficha de videos
Ficha de videosFicha de videos
Ficha de videos
 
Car Decals
Car DecalsCar Decals
Car Decals
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
24 Resharper Tricks Every .Net Developer Should Know
24 Resharper Tricks Every .Net Developer Should Know24 Resharper Tricks Every .Net Developer Should Know
24 Resharper Tricks Every .Net Developer Should Know
 
Deploying web apis on core clr to docker
Deploying web apis on core clr to dockerDeploying web apis on core clr to docker
Deploying web apis on core clr to docker
 
Developing multi tenant applications for the cloud 3rd edition
Developing multi tenant applications for the cloud 3rd editionDeveloping multi tenant applications for the cloud 3rd edition
Developing multi tenant applications for the cloud 3rd edition
 
Building Multi-tenant, Configurable, High Quality Applications on .NET for an...
Building Multi-tenant, Configurable, High Quality Applications on .NET for an...Building Multi-tenant, Configurable, High Quality Applications on .NET for an...
Building Multi-tenant, Configurable, High Quality Applications on .NET for an...
 
Cloud architecture from the field v1 (in touch)
Cloud architecture from the field v1 (in touch)Cloud architecture from the field v1 (in touch)
Cloud architecture from the field v1 (in touch)
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with Overview
 
ASP.NET Core 1.0 Overview
ASP.NET Core 1.0 OverviewASP.NET Core 1.0 Overview
ASP.NET Core 1.0 Overview
 
iOS Coding Best Practices
iOS Coding Best PracticesiOS Coding Best Practices
iOS Coding Best Practices
 
Introduction to Windows IoT via Raspberry Pi 3
Introduction to Windows IoT via Raspberry Pi 3Introduction to Windows IoT via Raspberry Pi 3
Introduction to Windows IoT via Raspberry Pi 3
 
C# coding standards, good programming principles & refactoring
C# coding standards, good programming principles & refactoringC# coding standards, good programming principles & refactoring
C# coding standards, good programming principles & refactoring
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Ähnlich wie ReSharper Presentation for NUGs

Chapter 1 1
Chapter 1 1Chapter 1 1
Chapter 1 1
bolovv
 
434090527-C-Cheat-Sheet. pdf C# program
434090527-C-Cheat-Sheet. pdf  C# program434090527-C-Cheat-Sheet. pdf  C# program
434090527-C-Cheat-Sheet. pdf C# program
MAHESHV559910
 
Compiler Design lab manual for Computer Engineering .pdf
Compiler Design lab manual for Computer Engineering .pdfCompiler Design lab manual for Computer Engineering .pdf
Compiler Design lab manual for Computer Engineering .pdf
kalpana Manudhane
 
Lec 04 intro assembly
Lec 04 intro assemblyLec 04 intro assembly
Lec 04 intro assembly
Abdul Khan
 
Chapter One
Chapter OneChapter One
Chapter One
bolovv
 

Ähnlich wie ReSharper Presentation for NUGs (20)

CSharpCheatSheetV1.pdf
CSharpCheatSheetV1.pdfCSharpCheatSheetV1.pdf
CSharpCheatSheetV1.pdf
 
Chapter 1 1
Chapter 1 1Chapter 1 1
Chapter 1 1
 
434090527-C-Cheat-Sheet. pdf C# program
434090527-C-Cheat-Sheet. pdf  C# program434090527-C-Cheat-Sheet. pdf  C# program
434090527-C-Cheat-Sheet. pdf C# program
 
C++ lecture 01
C++   lecture 01C++   lecture 01
C++ lecture 01
 
Compiler Design lab manual for Computer Engineering .pdf
Compiler Design lab manual for Computer Engineering .pdfCompiler Design lab manual for Computer Engineering .pdf
Compiler Design lab manual for Computer Engineering .pdf
 
presentation_intro_to_python
presentation_intro_to_pythonpresentation_intro_to_python
presentation_intro_to_python
 
presentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.pptpresentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.ppt
 
C# tutorial
C# tutorialC# tutorial
C# tutorial
 
Lecture 01 2017
Lecture 01 2017Lecture 01 2017
Lecture 01 2017
 
Basics1
Basics1Basics1
Basics1
 
Lec 04 intro assembly
Lec 04 intro assemblyLec 04 intro assembly
Lec 04 intro assembly
 
unit 1 cpds.pptx
unit 1 cpds.pptxunit 1 cpds.pptx
unit 1 cpds.pptx
 
Chapter One
Chapter OneChapter One
Chapter One
 
C++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWAREC++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWARE
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
 
Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfChapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdf
 
Assignment1
Assignment1Assignment1
Assignment1
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
 
Code generation errors and recovery
Code generation errors and recoveryCode generation errors and recovery
Code generation errors and recovery
 
Lexical analyzer
Lexical analyzerLexical analyzer
Lexical analyzer
 

Mehr von Dmitri Nesteruk

Converting Managed Languages to C++
Converting Managed Languages to C++Converting Managed Languages to C++
Converting Managed Languages to C++
Dmitri Nesteruk
 
Dynamics CRM Data Integration
Dynamics CRM Data IntegrationDynamics CRM Data Integration
Dynamics CRM Data Integration
Dmitri Nesteruk
 
ReSharper Architecture & Extensions
ReSharper Architecture & ExtensionsReSharper Architecture & Extensions
ReSharper Architecture & Extensions
Dmitri Nesteruk
 

Mehr von Dmitri Nesteruk (20)

Good Ideas in Programming Languages
Good Ideas in Programming LanguagesGood Ideas in Programming Languages
Good Ideas in Programming Languages
 
Design Pattern Observations
Design Pattern ObservationsDesign Pattern Observations
Design Pattern Observations
 
CallSharp: Automatic Input/Output Matching in .NET
CallSharp: Automatic Input/Output Matching in .NETCallSharp: Automatic Input/Output Matching in .NET
CallSharp: Automatic Input/Output Matching in .NET
 
Design Patterns in Modern C++
Design Patterns in Modern C++Design Patterns in Modern C++
Design Patterns in Modern C++
 
C# Tricks
C# TricksC# Tricks
C# Tricks
 
Introduction to Programming Bots
Introduction to Programming BotsIntroduction to Programming Bots
Introduction to Programming Bots
 
Converting Managed Languages to C++
Converting Managed Languages to C++Converting Managed Languages to C++
Converting Managed Languages to C++
 
Monte Carlo C++
Monte Carlo C++Monte Carlo C++
Monte Carlo C++
 
Tpl DataFlow
Tpl DataFlowTpl DataFlow
Tpl DataFlow
 
YouTrack: Not Just an Issue Tracker
YouTrack: Not Just an Issue TrackerYouTrack: Not Just an Issue Tracker
YouTrack: Not Just an Issue Tracker
 
Проект X2C
Проект X2CПроект X2C
Проект X2C
 
Domain Transformations
Domain TransformationsDomain Transformations
Domain Transformations
 
Victor CG Erofeev - Metro UI
Victor CG Erofeev - Metro UIVictor CG Erofeev - Metro UI
Victor CG Erofeev - Metro UI
 
Developer Efficiency
Developer EfficiencyDeveloper Efficiency
Developer Efficiency
 
Distributed Development
Distributed DevelopmentDistributed Development
Distributed Development
 
Dynamics CRM Data Integration
Dynamics CRM Data IntegrationDynamics CRM Data Integration
Dynamics CRM Data Integration
 
ReSharper Architecture & Extensions
ReSharper Architecture & ExtensionsReSharper Architecture & Extensions
ReSharper Architecture & Extensions
 
Web mining
Web miningWeb mining
Web mining
 
Data mapping tutorial
Data mapping tutorialData mapping tutorial
Data mapping tutorial
 
Reactive Extensions
Reactive ExtensionsReactive Extensions
Reactive Extensions
 

Kürzlich hochgeladen

0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
Renandantas16
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
dlhescort
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
daisycvs
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Sheetaleventcompany
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Kürzlich hochgeladen (20)

Business Model Canvas (BMC)- A new venture concept
Business Model Canvas (BMC)-  A new venture conceptBusiness Model Canvas (BMC)-  A new venture concept
Business Model Canvas (BMC)- A new venture concept
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
Falcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in indiaFalcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in india
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
 

ReSharper Presentation for NUGs

  • 1. Introducing The most intelligent plug-in for Visual Studio 1
  • 2. ReSharper in a Nutshell Coding productivity tool for Visual Studio users Supports C#, VB.NET, XML, XAML, ASP.NET, HTML/ CSS/JavaScript, build scripts Continuous code quality analysis: error detection and quick-fixes Navigation, coding assistance, code generation, unit test integration… 2
  • 3. Visual Studio with ReSharper 3
  • 4. Syntax Highlighting R# extends VS highlighting:  For fields, variables, constants, methods, operators, types, etc.  In C# and VB.NET: 4
  • 5. Code Analysis R# provides on-the-fly code quality analysis. 4 categories of analysis results:  Errors  Warnings  Suggestions  Hints 5
  • 6. Code Inspections Wiki Some suggestions are very technical, so ReSharper offers explanations: Clicking on the “Why is ReSharper Suggesting This” item opens up the corresponding page in the Code Inspection Wiki: 6
  • 7. Marker Bar  Marker Bar is a sidebar to the right-  Status Indicator shows the hand side of the text editor. overall status of the current file:  MB represents all R# highlights in file (warnings, errors, suggestions,  It changes color if file contains to-do items and search results): errors or warnings: File contains compilation errors File has warnings but no errors File doesn't contain errors or warnings 7
  • 8. Solution-Wide Analysis  ReSharper can analyze your whole solution for errors  To turn on, double-click the bottom left icon in Visual Studio:  Circle is green if there are no errors, red otherwise  Double-click the circle to see a list of issues 8
  • 9. Find Code Issues  ReSharper can locate all issues (errors  ReSharper can also help find issues and warnings) in the current project or similar to the one that has just been the whole solution encountered:  To get a list of issues, use the menu item ReSharper | Inspect | Code Issues in Solution/Current Project  ReSharper presents a tree of all issues  Similar issues can be searched at found, with various grouping options: different (including Custom) scopes: 9
  • 10. Quick-Fixes  Quick-fixes make you code free of errors and smells  Available for most errors, warnings, and suggestions that R# displays  Bulbs used to indicate availability Red bulb indicates an error Yellow bulb indicates a warning  To display the list of available quick-fixes, press Alt+Enter:  Hundreds of quick-fixes to perform multiple fixes 10
  • 11. Context Actions  Context actions are "mini-refactorings" intended for optional code transformations in a certain context. Examples:  Modifying the structure of conditional statements  Joining local variable declaration and assignment  Iterating collections with foreach statements  Context actions are available for C#, VB.NET and XML  Pencil icon to the left a code line means CAs are available 11
  • 12. Code Completion  R# complements native VS IntelliSense with 3 types of code completion:  Symbol Completion  Smart Completion  Import Symbol Completion  Enhancements compared to Visual Studio include:  Immediate members are highlighted (vs inherited members)  All overloads displayed in a pop-up, you can scroll between them  Icons for parameters and local vars to distinguish them from fields  Completion list is narrowed down to match user input  CamelHumps: complete a long type name by typing “drfb" instead of "DecoderReplacementFallbackBuffer" 12
  • 13. Symbol Completion  Suggesting type-based variable names:  Suggesting members of a class:  Suggesting visible types: 13
  • 14. Symbol Completion (cont.)  Suggesting C# keywords:  Symbol completion using CamelHumps:  Completing names of symbols in build scripts: 14
  • 15. Smart Completion  Smart Code Completion (Ctrl+Alt+Space):  Filters the list of types, methods, and variables to match the expected type of an expression  If several return types are possible, detects the most recently used symbol of an applicable type and focuses it in the lookup list  Suggests creating anonymous delegates, lambda expressions, and regular methods, as well as local variables for out parameters  In object initializers, suggests fields/properties that were not yet assigned a value 15
  • 16. Smart Completion (cont.)  In object initializers:  In lambda expressions:  Creating a local variable in place of an out parameter: 16
  • 17. Import Completion  In C# for extension methods:  In C# using CamelHumps:  In ASP.NET: 17
  • 18. Complete Statement  Complete Statement (Ctrl+Shift+Enter):  Inserts necessary syntax elements (braces, semicolons etc.) and gets you in position to start the next statement  Is helpful in auto-closing parentheses, adding semicolons, completing if, while and for statements etc.  Available for type members, statements, and expressions  Nested method invocation: before Complete Statement:  Nested method invocation: after Complete Statement: 18
  • 19. Parameter Info  When you call a method, Parameter Info (Ctrl+Shift+Space):  Automatically shows all available signatures and parameters with relevant documentation  Grays out inapplicable signatures as you add new arguments 19
  • 20. Quick Documentation  Quick Documentation (Ctrl+Shift+F1):  Shows a pop-up with available doc for any documented symbol  Does so in the text editor, in any ReSharper tool window, or within documentation comments  Provides hyperlinks to detailed information and documentation for related symbols 20
  • 21. Namespace Import Pop-Ups  When referencing a non-imported type, ReSharper helps promptly add it to the list of namespace import directives  Adding a using directive this way doesn't interrupt your coding session  When pasting code from another part of your application, ReSharper will offer to import all required types: 21
  • 22. Live Templates  Live templates are predefined code fragments (expressions, constructs, classes, methods etc.) that can be quickly inserted into code  By default, ReSharper 5 provides more than 20 live templates for C#, 17 for VB.NET, 6 for ASP.NET and 3 for XML  Iterating through collections  Creating assertion methods  Creating new arrays  Outputting values  Coding LINQ queries  Generating auto-properties 22
  • 23. Surround Templates  Surround templates let you select code and surround it with code from a live template (e.g., with a try-catch block)  Select the text to surround and press Ctrl+E,Ctrl+U to open up a list of surround templates  Use keyboard shortcuts to select one of the templates  Choose More… to see all available templates and select which ones appear in the quicklist 23
  • 24. Structural Search and Replace (SSR)  SSR lets you create your own patterns to search for code smells, legacy code constructs, etc.  Open the patterns catalog in ReSharper | Tools | Patterns Catalog  Define your own patterns and what to replace them with  ReSharper will highlight instances where pattern matches, and offers the quick-fix for replacement: 24
  • 25. Navigate To  Navigate To (Alt+`): context menu that shows all navigation options available at the current caret position: 25
  • 26. Navigate To (cont.)  Specifically, you can navigate to:  Declaration  Conflicting declarations  Implementation  Member overloads  Base symbols  Related files  Derived symbols  To-do explorer  Types of symbol  Test explorer  Usages of symbol  Object browser  Control flow target  Metadata view  Function exit(s)  Sources from symbol files  Overriding members  Decompiled sources 26
  • 27. Navigate To (cont.)  You can navigate to source files  ReSharper downloads PDBs from located outside your solution the source server…  E.g., .Net Framework Source Code  Simply select navigation to external symbol  And displays the source file: 27
  • 28. Call & Value Tracking  ReSharper lets you can track…  Inspections indicate all affected  Incoming and outgoing locations up/down the call chain: calls to a method (method calls resulting in this call being made, or calls resulting from the call of this method)  Origin and destination of values (who provides the value and where it goes)  Menu items are available under ReSharper | Inspect 28
  • 29. Generate  Generate drop-down menu (Alt+Ins) helps:  Implement and override members  Generate properties  Generate type constructors  Generate delegating members  Generate equality members  Generate formatting members 29
  • 30. Refactor This  ReSharper provides 40+ solution-wide refactorings.  Refactor This (Ctrl+Shift+R): context menu to view and call refactorings available at a certain code position: 30
  • 31. Find Usages  Find Usages (Alt+F7) quickly locates usages of a symbol solution-wide  In mixed-language solutions, finds usages multiple languages  Search results are displayed in the Find Results window: 31
  • 32. Navigation & Search 3 groups of "go to" navigation commands.  Group 1: Navigate from anywhere. Commands in this group open in pop- up windows, support CamelHumps and wildcards (* for 0 or more characters, ? for 1 or more characters):  Go to Symbol  Go to Type  Go to File Member  Go to File 32
  • 33. Navigation & Search (cont.)  Group 2: Navigate from occurrence of a specific symbol. Navigate from Here is used as a shortcut for these commands:  Go to Declaration  Go to Type Declaration  Go to Base  Go to Inheritor  Go to Usages 33
  • 34. Navigation & Search (cont.)  Group 3: Navigate from anywhere within a type:  Go to Next/Previous Member  Go to Containing Declaration + Go to Last Edit Location navigates to the point of the most recent code modification 34
  • 35. View Recent Edits  Recent Edits (Ctrl+Shift+,) is a pop-up window similar to Recent Files that shows files and symbols that you have recently modified: 35
  • 36. Locate in Solution Explorer  Locate in Solution Explorer (Shift+Alt+L) highlights the currently opened file in Solution Explorer and auto-scrolls to its entry:  It is especially useful in large solutions, or when screen area limitations forces you to shrink the Solution Explorer window to the limit 36
  • 37. File Structure  File Structure window (Ctrl+Alt+F) shows members or elements that the current code or markup file contains, and lets you navigate directly to their declarations: 37
  • 38. Type Hierarchy  Type Hierarchy (Ctrl+Alt+H at a type usage) shows the inheritance hierarchy of a specified type; its base types and inheritors: 38
  • 39. ReSharper Refactorings  The richest set of automated solution-wide refactorings for C# and VB available in Visual Studio ecosystem (40+ refactorings as of R# 5)  200+ context actions = “mini-refactorings”  Each code refactoring analyzes the entire scope of the code selection to which it is applied (as wide as whole solution), including cross-language code 39
  • 40. ReSharper Refactorings (cont.)  Refactorings can be invoked with:  Individual keyboard shortcuts (whenever available)  Refactor This (Ctrl+Shift+R) context menu that lists contextually available refactorings  ReSharper | Refactor menu  Some refactorings can be triggered with context actions (watch the yellow bulb)  If a conflict is detected that prevents running a refactoring, a special warning screen is shown, and the user can modify the code to resolve the issue 40
  • 41. In-Place Refactorings  ReSharper can detect when changes in code lead to a refactoring. In this case, the refactoring is offered in-place via a context action.  For example, when a variable is renamed, the Rename refactoring is offered in-place: 41
  • 42. Code Cleanup  Code Cleanup (Ctrl+E,C) combines customizable code formatting in any scope with a set of other useful actions, including:  Removing code redundancies (C#)  Optimizing namespace import directives (C#, VB.NET)  Reordering type members (C#)  Migrating to C# 3.0/4.0  For example, you can simply run Code Cleanup to remove code redundancies instead of navigating between individual warnings and fixing them one-by-one 42
  • 43. Unit Testing  ReSharper recognizes NUnit tests and lets you run or debug them in Visual Studio  You can run or debug:  A single unit test  All tests in a test class  All tests in a project  All tests in a solution  ReSharper provides two tool windows – Unit Test Explorer and Unit Test Sessions – to view, run and manage unit tests 43
  • 44. Support for ASP.NET MVC  Special syntax highlighting for  Dedicated code completion to ASP.NET MVC method calls help you reference actions and and parameters controllers in string literals:  Navigation to/from actions and controllers  Creation of new controllers and actions from usage 44
  • 45. Support for HTML/CSS/JavaScript  ReSharper comes with comprehensive support for HTML, CSS and JavaScript, including  Inspections  Refactorings  Navigation  And a lot more… 45
  • 46. Localization  Localizable strings are highlighted  Refactorings (move, rename, and context actions are available inline, safe delete) are available for moving them to resources on resources  A special version of the File Structure window is available for viewing resource files  Resource-specific code inspections are available  Find Usages works naturally on resources  Navigation items “Go to Inheritor”  This functionality is available not and “Go to Base” help you move just in code, but also in web apps between culture-neutral and and arbitrary HTML strings culture-specific resource files 46
  • 47. Color Assistance ReSharper helps identify colors in code (C#, VB) and markup (XAML, CSS) by using the color to underline the identifier: Completion menus are stylized CSS support also comes with a to show colors: dedicated color palette: 47
  • 48. Decompiler No source? No problem! ReSharper comes with a built-in decompiler* *Also available separately as dotPeek, see http://jetbrains.com/decompiler 48
  • 49. Optimize References ReSharper can show you details of how project references are used in your project: Alternatively, you can just quickly remove all unused ones: 49
  • 50. ReSharper Plugins  Some of ReSharper plug-ins include:  Gallio: support for MbUnit, MSTest, NBehave, NUnit and xUnit.Net  Agent Smith: validation of XML comments and naming conventions; spell checking in XML comments, string literals, identifiers and resources  Agent Johnson: miscellaneous tools and refactorings  StyleCop for ReSharper: support for Microsoft StyleCop 50
  • 51. Summary: Most Important Shortcuts  Alt+Enter: display the list of available quick-fixes and/or context actions  Alt+Ins: show code generation options  Alt+` (Navigate To): show available navigation options  Ctrl+Shift+R (Refactor This): show available refactorings  Ctrl+Space (Symbol Completion), Ctrl+Alt+Space (Smart Completion), Shift+Alt+Space (Import Symbol Completion)  Ctrl+E,C (Code Cleanup) 51