dotnetConf 12/3/2018 1:48 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
dotnetConf 12/3/2018 1:48 AM The Power of Roslyn: Improving Your Productivity with Live Code Analyzers Dustin Campbell Principal Software Engineer © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Agenda Roslyn Analyzers, fixers, & code-aware libraries Overview of APIs for understanding and generating source Introduce new IOperation API Build analyzer/fixer with IOperation
http://roslyn.io
Demo
Identify errors before compile Enforce code style rules Introduce best practices for SDK Teach new language features/concepts
Syntax and Semantic APIs Syntax Tree High-fidelity representation of source code Semantic Model Answers semantic questions about syntax IOperation In-progress evolution of the Roslyn APIs Provides semantic information Abstracts over common syntactic shapes Common representation for C# and VB Syntax Generator Can generate source code for both C# and VB
Let’s build something! var a = new int[0]; var a = Array.Empty<int>();
Demo
Call to Action Explore and use existing analyzers today Try to build some! Give us feedback on the APIs dustinca@microsoft.com @dcampbell http://roslyn.io Follow @roslyn on Twitter Any questions?
dotnetConf 12/3/2018 1:48 AM © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.