4 ms·
They also added a TimeProvider to help with testing time objects. Maybe one day we will also get an FileSystemProvider.. TimeProviderFake: https://learn.micros
by 0xcoffee 3y ago
They also added a TimeProvider to help with testing time objects. Maybe one day we will also get an FileSystemProvider..
TimeProviderFake: https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.time.testing.faketimeprovider?view=dotnet-plat-ext-8.0&viewFallbackFrom=net-8.0 https://learn.microsoft.com/en-us/dotnet/api/microsoft.exten...
ReleaseNotes: https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-8#time-abstraction https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotn...
- leosanchez 3y ago> Maybe one day we will also get an FileSystemProvider. Until then you can use System.IO.Abstraction[1] if you aren't already :) [1] https://github.com/TestableIO/System.IO.Abstractions https://github.com/TestableIO/System.IO.Abstractions
- majora2007 3y agoThis is what I use, but damn, does it make coding a bit annoying having to have an instance of the filesystem rather than using static classes like Path.
- NicoJuicy 3y agoThah. Made a "stupid" joke about this ( naming). > If you lack time to finish something, use the TimeProvider. It provides time.