Observer Design Pattern (An Introduction for .NET Developers [.NET 6 and C# 10])

Поділитися
Вставка
  • Опубліковано 3 січ 2025

КОМЕНТАРІ •

  • @F2H16
    @F2H16 2 роки тому +1

    Your vids are awesome.But if you could show some diagrams to explain the notion behind a concept that would make your tutorials even more appealing.

  • @williamliu8985
    @williamliu8985 3 роки тому

    thanks for the great video. Looks like the *event* mode also performs the similar Observer Design Pattern job, could you let us know the benefit of using the IObservable/IObserver interface?

    • @DotNetCoreCentral
      @DotNetCoreCentral  3 роки тому

      @William Liu, the main benefit of IObservable/IObserver implementation is that the entire registration between the subject and the observer relationship is invested. And that provides an opportunity to further decouple the two.
      So we can create a separate event manager class that can manage the relationship between the subject (IObservable) and the observer (IObserver).

    • @williamliu8985
      @williamliu8985 3 роки тому +1

      @@DotNetCoreCentral Thank you for clarifying it!

  • @F2H16
    @F2H16 2 роки тому

    Thanks for the nice content. By the way, internal is the default if no access modifier is specified in c# not private.

    • @paulembleton2936
      @paulembleton2936 Рік тому

      For classes the default is internal. For class members the default is private.