TimeProvider - New Date & Time Abstractions in .NET 8!
Vložit
- čas přidán 19. 06. 2024
- With .NET 8, we get a new TimeProvider class and an ITimer interface. Today, I will explain how those two types work and how they solve the challenge of testing time-dependent code.
00:00 Introduction
00:34 Exploring the TimeProvider APIs
01:20 Mocking DateTime in a Test
04:48 Setting up a TimeProvider in ASP.NET Core
06:21 Simulating a Different Time Zone
07:38 Conclusion
🔥 C#/.NET Bootcamp: The Fundamentals & more (Code FRIENDS10 for 10% OFF)*
claudiobernasconi.ch/dotnet-c...
📌 .NET Developer Roadmap
claudiobernasconi.ch/learn-do...
📌 CZcams Playlists:
The FREE Blazor Crash Course: • The FREE Blazor Crash ...
Blazor: • Blazor
✅ SUBSCRIBE FOR MORE VIDEOS
Subscribe: 🔔 claudiobernasconi.ch/Subscribe
🚀 CONNECT & SUPPORT
Twitter: / chbernasconic
Blog: claudiobernasconi.ch
Newsletter: claudiobernasconi.ch/newsletter
* Affiliate Link: I earn a small commission at no additional cost - Věda a technologie
Please, a cart tutorial with Blazor 8
You can do things in so many different ways in Blazor 8 that I don't know how you would even know which to pick. SSR, Web assembly, SignalR...
This new stuff is pretty much to write more robust and testable code when dealing with time-dependent logic. Anything else?
No, it's exactly that. 👍
@@ClaudioBernasconi cool thanks