A New Way To Deal With Time In .NET 8

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2024
  • 💻Get the source code: go.dotnetacade...
    .NET 8 Preview 4 is out and it brings a bunch of goodness. Among them, a great new abstraction that will make your unit tests really happy.
    I go over all the details in this video.
    🔥Become a Senior C# Backend Engineer: juliocasal.com...
    🗺️Get My Free .NET Backend Developer Roadmap: juliocasal.com...
    Join me on Patreon: / juliocasal
    Follow me on LinkedIn: / juliocasal
    Follow me on X: x.com/julioc
    #csharp #dotnet #unittesting

ความคิดเห็น • 9

  • @Khl8122
    @Khl8122 6 หลายเดือนก่อน

    A simpler way is to write methods as “pure functions”. In this case, the CreateGame’s signature will include an additional argument which is the date

  • @kristianaranda
    @kristianaranda ปีที่แล้ว

    thank you for sharing your knowledge, I love your videos and your teaching style!

    • @juliocasal
      @juliocasal  ปีที่แล้ว

      Thank you, you're welcome!

  • @dariusChS
    @dariusChS ปีที่แล้ว

    Thanks for sharing,

  • @Davsan1
    @Davsan1 ปีที่แล้ว

    Great video!

  • @user-ti7zu7wz5e
    @user-ti7zu7wz5e ปีที่แล้ว

    Hello. I have a question, what are the benefits of TimeProvider? I could have a interface that abstracts the DateTimeOffset or atleast the .utcnow
    What would be the advantages comparing to mine solution?
    Always learning with you, thank you so much.

    • @juliocasal
      @juliocasal  ปีที่แล้ว +1

      Main benefit is that the class is there for you to use out of the box. If you already have something equivalent, no need to change. But, for new projects, it can be a nice time saver.