Roslyn for teamlead.If something takes more than 5 minutes -write a script.
summary
Shows how Roslyn powers concrete, project-specific diagnostics: a microanalyzer that finds repeated expensive lookups in Update methods, flags methods over ~500 statements or classes with >50 members, detects magic numbers with a whitelist, forbids string.Replace in favor of a one-pass replacer, and disallows throw statements outside a designated class. Demonstrates using the semantic model, AST traversal, symbol checks, and code fixes, notes semantic-model glitches and memory cost on large codebases, and reports real savings because fixes found during development cost ~30–60 minutes versus much more later. semantic model AST traversal code fixes
AI-written summary · about
chapters (11)
- 0:00Introduction
- 3:38What Roslyn is and why use it
- 6:13Writing diagnostics in Roslyn
- 8:45Simple diagnostics examples
- 13:10Banning dangerous method calls
- 16:45Naming and comments control
- 20:58Conditional compilation handling
- 23:28Roslyn limitations
- 26:04Automating analyzer support
- 28:11Useful links and resources
- 30:00Q&A
related talks
01h 00mAutomate Yourself Out of a Job with Roslyn
01h 16mAutomate yourself out of a job with Roslyn
57mRoslyn: The Craft of Static Analysis
01h 01mThe Power of Roslyn
01h 08mAnalyzing source code using Roslyn
54mContinuous Integration: Live Static Analysis using Visual Studio & the Roslyn API
50mAnalyzing Code in .NET
01h 02mUse your source code to document your application
