Search code examples
c#.netobserver-patternreactor

Name of the classes to implement observer pattern in .NET?


What are the names of the classes in .NET library that implement the observer publish-subscribe pattern?

I understand that Rx.NET is implemented with reactor pattern and there are differences between observer and reactor pattern.

Update after selecting an answer:

This question received 3 votes to close. I don't know whether the reason is because there is no answer for this question. Here is what I know from the answer that Václav Struhár posted and from further reading.

The Observable is a word used in many frameworks and languages. In Java, there is an Observable. .NET has IObservable which is available from the System namespace.

The observer pattern can be implemented in C# with the IObservable generic interface. The Rx.NET has Observable extension methods for System.IObservable<T>.


Solution

  • You can implement your own Observer Design Pattern without usage of any .NET classes.