Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Diagnostic Analyzers in Visual Studio 2015

689 views

Published on

What are diagnostic analyzers, why would one need them and how to develop them

Published in: Software
  • Login to see the comments

  • Be the first to like this

Diagnostic Analyzers in Visual Studio 2015

  1. 1. Diagnostični analizatorji v Visual Studiu 2015 Damir Arh
  2. 2. Diagnostični analizator? Kako? Zakaj? Kaj?
  3. 3. .NET Compiler Platform Formatter Colorizer Outlining NavigateTo Object Browser Completion List FindAll References Rename QuickInfo Signature Help Extract Method GoTo Definition Editand Continue Syntax Tree API Symbol API Binding and Analysis API Emit API Parser Symbols Binder IL Emitter Metadata Import
  4. 4. Kaj?
  5. 5. FxCop Analyzers
  6. 6. Načini distribucije • NuGet – Vezano na projekt – Za vse razvijalce • VSIX – Za vse projekte – Vezano na razvijalca
  7. 7. Uporabnost analizatorjev
  8. 8. Zahtevana programska oprema • http://bit.ly/VS2015download – Visual Studio Extensibility Tools • http://bit.ly/RoslynSDK
  9. 9. Predloga za diagnostični analizator
  10. 10. Preverjanje regularnih izrazov
  11. 11. Roslyn Syntax Visualizer
  12. 12. Sintaktično drevo InvocationExpression SimpleMemberAccessExpression IdentifierName Regex WhitespaceTrivia . IdentifierName Match ArgumentList ( Argument StringLiteralExpression " " , WhitespaceTrivia Argument StringLiteralExpression " [ " )
  13. 13. Implementacija analizatorja
  14. 14. Strukturiranje izvorne kode Workspace Solution Project Metadata Reference Document ImmutableArray<Diagnostic> CompilationWithAnalyzers GetAnalyzerDiagnosticsAsync() Compilation WithAnalyzers() Project GetCompilationAsync()
  15. 15. Testno ogrodje
  16. 16. Uporabne povezave • http://bit.ly/RoslynOverview • http://bit.ly/DotNetConfAnalyzersVideo • http://bit.ly/MsdnMagLiveCodeAnalyzer • http://bit.ly/MsdnMagCodeFix • http://bit.ly/RefactoringEssentials • http://bit.ly/CodeCrackerAnalyzers • http://bit.ly/CSharpEssentials
  17. 17. Veliko novosti • Prevajalnik kot storitev • Prenovljen urejevalnik • Lažje dostopna analiza kode • Avtomatični popravki Oživitev dokumentov s pravili kodiranja
  18. 18. damir.arh@gmail.com http://twitter.com/DamirArh http://www.damirscorner.com Vprašanja

×