MVVM Source Generators: Never Write MVVM Boilerplate Code Again!

James Montemagno
James Montemagno
75.3 هزار بار بازدید - 2 سال پیش - Imagine a world where you
Imagine a world where you never had to raise another property changed event or write another IComand. Well, those days are here with the new .NET Community Toolkit, which introduces brand new source generators and helper classes to enable you to write super minimal code. I break down everything you need to know about the toolkit, how to use it, and why it is awesome!

There have been several updates to the library and name changes for the properties, so check out https://github.com/CommunityToolkit/d... for changes

Links:
Source Code - https://github.com/jamesmontemagno/MV...
Toolkit Blog -  https://devblogs.microsoft.com/dotnet...
Documentation - https://docs.microsoft.com/dotnet/com...
Community Toolkit on GitHub - https://github.com/CommunityToolkit/d...

Join this channel to get access to perks:
@jamesmontemagno

👕 Buy some swag! - https://jamesmontemagno.myspreadshop....
☕️ Buy me a coffee - https://www.buymeacoffee.com/jamesmon...

Follow:
👨‍💻 GitHub: https://github.com/jamesmontemagno
🦜 Twitter: Twitter: jamesmontemagno
📄 Website: https://www.montemagno.com
📰 Newsletter: https://newsletter.montemagno.com/

Chapters:
00:00 - Introduction to MVVM
06:20 - Installing .NET Community Toolkit and INotifyPropertyChanged
10:20 - ObservableObject and property changes
12:00 - ObservableProperty source generator
14:35 - ICommand source generator
17:00 - Source Generator Wrap-up

Disclaimer: This channel, videos, and streams are created in my spare time and are a product of me... James Montemagno! They are NOT officially affiliated or endorsed by Microsoft (my employer) in any way. Opinions and views are my own.

What is on my hat? It is the CLE clothing logo because I am from Cleveland! Checkout their awesome CLE merch: https://cleclothingco.myshopify.com/

What is that art on my wall? It is an original piece from the French street artist Gregos of La Butte Montmartre: Instagram: BceZ1oNHiQx

My Setup:
💡 Nanoleaf Elements Lights - https://amzn.to/3umwJVW
🎙 Blue Spark Microphone - https://amzn.to/3qgtYkq
🎙 Blue Pop Filter - https://amzn.to/3jEWM3r
🤳 Rode Microphone Arm - https://amzn.to/2Z68AlE
🎧 Sony MDR7306 Headphones - https://amzn.to/372jxta
📲 Stream Deck - https://amzn.to/373Uk1n
📹 Elgato Cam Link - https://amzn.to/3a9eGbh
📷 GoPro Hero - https://amzn.to/374lm90
🖱 MX Master 2S Mouse - https://amzn.to/3d7J2gj
⌨️ Tecware Phantom Keyboard - https://amzn.to/3aUP4y9

#dotnet #mvvm #sourcegenerators
2 سال پیش در تاریخ 1400/12/19 منتشر شده است.
75,349 بـار بازدید شده
... بیشتر