ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

C# Source Generators – Why and How

Автор: Microsoft Visual Studio

Загружено: 2025-12-16

Просмотров: 8128

Описание: In this recorded Live! 360 session, you’ll learn how C# source generators work, why they matter, and how they can dramatically improve app performance by eliminating runtime reflection, reducing allocations, and enabling ahead-of-time (AOT) execution. Jim Wooley walks through real examples, from logging and regex optimization to JSON serialization, and shows how incremental generators improve build performance and keep generated code in sync as you type.

You’ll also explore how to write your own source generator using Roslyn APIs, understand syntax trees and semantic models, and validate generators with unit tests. If you're building .NET apps and want to automate boilerplate, remove reflection, or tune your app for speed, this session gives you the foundations to get started.

🔑 What You’ll Learn
• What source generators are and how they fit into meta-programming
• How generators eliminate reflection and support AOT compilation
• Real examples: logging, regex, JSON, validation, mappers
• How incremental generators improve performance over older models
• How to explore Roslyn syntax trees & semantic models
• How to write your own generator using attributes & visitors
• Unit testing and debugging approaches for source generators
• Performance impacts and comparisons (AutoMapper, Mapster, mocking libs)

⏱️ Chapters
00:00 Intro + What source generators are & why they exist
02:54 Eliminating reflection and enabling AOT
05:44 How source generators differ from GenAI
08:05 Examples in .NET: logging, regex, JSON, validation
11:58 Demo: Logging generator & partial methods
14:46 Demo: Regex generator & performance benefits
16:14 Demo: JSON serialization generator
17:40 Live change-tracking: how generators respond to edits
19:20 Using attributes to trigger generation
20:00 Intro to Roslyn syntax trees & code analysis
26:05 Navigating syntax with the Syntax Visualizer
29:32 Understanding attributes & metadata via Roslyn APIs
31:00 Demo: Building a simple CSV generator
35:55 Classic (non-incremental) generator architecture
38:30 Walking the syntax tree & extracting semantic info
41:52 Generating new code with StringBuilder
43:10 Incremental generators & why they matter
45:30 Transformations, caching, and performance optimization
47:25 Using records and value semantics in generator pipelines
49:00 Executing generation & adding output to the compilation
50:55 Demo: Extended CSV generator with new properties
54:00 How to test generators with xUnit & Verify snapshots
58:30 Debugging generators (best practices & pitfalls)
1:01:00 How Roslyn builds trees, tokens, trivia & factories
1:01:49 When meta-programming makes sense (mapping, DTOs, reflection removal)
1:03:00 Performance comparisons (AutoMapper, Mapster, mocking frameworks)
1:06:20 Licensing, open source considerations & practical guidance
1:08:48 Q&A + extending the sample generator
1:10:03 Additional resources & where to go next

👤 Speaker: Jim Wooley
Senior Principal, Slalom Consulting

🔗 Links
• Jim's Roslyn Labs repo: https://github.com/jwooley/RoslynLabs
• Explore more Live! 360 sessions: https://aka.ms/L360Orlando25
• Check out upcoming VS Live! events: https://aka.ms/VSLiveEvents

#csharp #dotnet #visualstudio #roslyn

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
C# Source Generators – Why and How

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

Zero to Hero: Blazor Web Apps

Zero to Hero: Blazor Web Apps

Андрей Дятлов — Source Generators в действии

Андрей Дятлов — Source Generators в действии

7. Custom Identity Service in .NET  | .NET 8 | C#

7. Custom Identity Service in .NET | .NET 8 | C#

Deep .NET: A Complete .NET Developer's Guide to Span with Stephen Toub and Scott Hanselman

Deep .NET: A Complete .NET Developer's Guide to Span with Stephen Toub and Scott Hanselman

Aspire – Beyond the Basics

Aspire – Beyond the Basics

Correcting Common Async/Await Mistakes in .NET 8 - Brandon Minnick - Copenhagen DevFest 2023

Correcting Common Async/Await Mistakes in .NET 8 - Brandon Minnick - Copenhagen DevFest 2023

Data Structure and Algorithm Patterns for LeetCode Interviews – Tutorial

Data Structure and Algorithm Patterns for LeetCode Interviews – Tutorial

Микросервисы на практике - сервис продажи билетов

Микросервисы на практике - сервис продажи билетов

КАК УСТРОЕН TCP/IP?

КАК УСТРОЕН TCP/IP?

System Design Concepts Course and Interview Prep

System Design Concepts Course and Interview Prep

Azure at 15: What’s Next for the Cloud, AI, and You

Azure at 15: What’s Next for the Cloud, AI, and You

Becoming a Data Architect

Becoming a Data Architect

Next-Level Debugging with GitHub Copilot in Visual Studio

Next-Level Debugging with GitHub Copilot in Visual Studio

What Is Model Context Protocol (MCP) and Why Should You Care? A Beginner's Guide

What Is Model Context Protocol (MCP) and Why Should You Care? A Beginner's Guide

Turbocharged: Writing High-Performance C# and .NET Code - Steve Gordon - NDC Oslo 2024

Turbocharged: Writing High-Performance C# and .NET Code - Steve Gordon - NDC Oslo 2024

Agentic DevOps in Real Life –  Build Faster, Ship Safer, Keep Humans in the Loop

Agentic DevOps in Real Life – Build Faster, Ship Safer, Keep Humans in the Loop

Почему ваш код не соответствует Python (и как это исправить)

Почему ваш код не соответствует Python (и как это исправить)

Что нового в C# 14

Что нового в C# 14

Take Action: Go Fast with GitHub

Take Action: Go Fast with GitHub

Zed IDE: Полный обзор спустя год | Личный опыт разработки на ней

Zed IDE: Полный обзор спустя год | Личный опыт разработки на ней

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]