Coding Shorts: Building a Source Generator - Part 1

  Рет қаралды 9,378

Shawn Wildermuth

Shawn Wildermuth

Күн бұрын

Пікірлер: 32
@juleseastlondoncockney8131
@juleseastlondoncockney8131 Жыл бұрын
Really like your videos. Always find something interesting in them.
@swildermuth
@swildermuth Жыл бұрын
I appreciate that!
@fullemptiness
@fullemptiness Жыл бұрын
Great video! By the way you can drag the class library project and drop it into the console project, this feature saved me opening the add reference window
@swildermuth
@swildermuth Жыл бұрын
Thanks for the tip!
@ronnieoverby
@ronnieoverby 8 ай бұрын
I love this guy. Thanks, Shawn!
@cyrildouglas9262
@cyrildouglas9262 Жыл бұрын
Thanks for the video, does part 2 comes next week?
@swildermuth
@swildermuth Жыл бұрын
Probably Thursday.
@the-nasim
@the-nasim Жыл бұрын
Please make a video about refresh tokens.
@FunWithBits
@FunWithBits Жыл бұрын
Thanks for the great video. I probobly would not have watched this but it was suggested by youtube's magic suggestion engine... so I did. I think I might re-watch it and experiment with this... anything as an alternative to reflection! =)
@swildermuth
@swildermuth Жыл бұрын
Thank you!
@FunWithBits
@FunWithBits Жыл бұрын
@@swildermuth - fyi - I built it but it ended up not working for some reason. The 'using SampleSourceGenerator' line had an error here with a type or namespace name 'type/namespace' could not be found. I added the reference and the Analyzer line in for the project but no luck. I added the project to github but don't want to add it to add it because the comment might be removed.. this is my 3rd post of this text.
@elerius2
@elerius2 Жыл бұрын
Hi Shawn, will your SG series cover debugging/unit testing source generators?
@swildermuth
@swildermuth Жыл бұрын
No unit testing, though it just builds code, so unit testing the generated code shouldn't be too difficult. The second episode (this week) will cover how to read the Roslyn data to build up your own code and how to debug it in Visual Studio. Look for it Thursday.
@lordgaulo6520
@lordgaulo6520 Жыл бұрын
I always learn so many extra useful things from your videos I love it I always get way more than i planned for and you do it without wasting any time .
@chjr4740
@chjr4740 Жыл бұрын
Could the Where clause be removed and instead the nullcheck be added to the predicate?
@swildermuth
@swildermuth Жыл бұрын
I don't think so, as the predicate is fired as the code changes, the null check to to ensure that the predicates are not null, not the result.
@williamliu8985
@williamliu8985 Жыл бұрын
The idea of SG is cool, but it seems that the tools (VS/rider) is not that completely ready.
@swildermuth
@swildermuth Жыл бұрын
Shouldn't matter, on tools that do not use them, they are executed at compile time too. Lots of tools you're already using probably employ them and you never noticed.
@williamliu8985
@williamliu8985 Жыл бұрын
@@swildermuth I think the SG can be a tool that is biased towards the needs of individual developers, so it is better to be easy to use. But its current usage and syntax do not seem so approachable, and if the tool developed for it is not user-friendly neither, ordinary developers may feel that this tool is inaccessible.
@swildermuth
@swildermuth Жыл бұрын
That's why I decided to do the video, to make it more approachable.
@nayanchoudhary4353
@nayanchoudhary4353 Жыл бұрын
Topic is interesting. However, the lack of explicit type declaration made it hard to understand. I also wish you didn't follow the code, but rather lead the video. Nick Chapsas does an excellent job that way. His narration is very good.
@swildermuth
@swildermuth Жыл бұрын
Not sure what you mean , rather not follow the code.
@kiqyou
@kiqyou Жыл бұрын
yeah but what even IS a source generator?
@swildermuth
@swildermuth Жыл бұрын
Not to be pedantic, but it's code that generates source based on the code you're writing. Generators run while roslyn is parsing your code while you're writing in the editor as well as at build-time.
@draganradovac8803
@draganradovac8803 3 ай бұрын
That was really cool. Thanks
@kodikodi9948
@kodikodi9948 6 ай бұрын
this is exactly what i needed. thank you.
@swildermuth
@swildermuth 6 ай бұрын
Awesome
@matadorso
@matadorso Жыл бұрын
Your latest content is awesome!
@gelordtube
@gelordtube Жыл бұрын
Hi Mr Shawn, It was a wonderful video about code generation!! :) ;) I thought that one of the ways to generate code was the T4 templates, but along with this, I think is another thing to do w/ code generate!! Thx You!
@swildermuth
@swildermuth Жыл бұрын
Glad you liked it.
@mlhtest5928
@mlhtest5928 Жыл бұрын
Interesting topic, thanks!
@swildermuth
@swildermuth Жыл бұрын
Glad you liked it!
Coding Shorts: Can You Use VSCode for Full-Time ASP.NET Core Dev?
21:21
Coding Shorts: Building a Source Generator - Part 2
11:26
Shawn Wildermuth
Рет қаралды 3,2 М.
Amazing Parenting Hacks! 👶✨ #ParentingTips #LifeHacks
00:18
Snack Chat
Рет қаралды 22 МЛН
WORLD BEST MAGIC SECRETS
00:50
MasomkaMagic
Рет қаралды 53 МЛН
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 68 МЛН
All About C# Source Generators | .NET Conf 2023
27:59
dotnet
Рет қаралды 26 М.
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 80 М.
Сергей Васильев - Анализ C# кода на Roslyn: от теории к практике
59:40
DotNext — конференция для .NET‑разработчиков
Рет қаралды 1,7 М.
Don't Use AutoMapper in C#! Do THIS Instead!
16:17
Codewrinkles
Рет қаралды 69 М.
Андрей Дятлов - Source Generators в действии
1:12:29
DotNext — конференция для .NET‑разработчиков
Рет қаралды 4,4 М.
Thoughts About Unit Testing | Prime Reacts
11:21
ThePrimeTime
Рет қаралды 225 М.
The 3 Biggest Mistakes of Object Mapping in .NET
11:33
Nick Chapsas
Рет қаралды 64 М.
The Home Server I've Been Wanting
18:14
Hardware Haven
Рет қаралды 140 М.
I added reflection to C++ just to make my game work.
16:30
Amazing Parenting Hacks! 👶✨ #ParentingTips #LifeHacks
00:18
Snack Chat
Рет қаралды 22 МЛН