c# - How to avoid the use of Subjects in RX -


So I keep reading everywhere that the use of the subject is "bad" And I agree with the logic.

However, I'm trying the best way to avoid using it and is an example.

At the moment, I have my abstract configuration class which contains a protected save () method that is said to be continuing when a property changes. This message can be found on the topic T & gt; Pumps a message to IObservable & lt; T & gt; comes out through the interface, which listens to serialization service class and performs serials. At this time it was the most obvious, simple and fast way to implement it.

So, what would be the RX method of doing this without using a subject? Can I expose an incident instead and use it to use Observable.FromEventPattern () ? - As it seems to be a much more complicated way to go about it.

It is not used by subject & lt; T & gt; is bad - there should be a way to "enter madad" - this is the educational way to say "a IObservable . You need to start somewhere. Problems arise with

topic when an existing subscription is used instead of membership, subject matter exists only on the edges of your RX machinery should be there.

If none of the entry points (for example FromEvent , FromEventPattern , FromAsync , return , ToObservable () and so on) work for you, then Subject & lt; T & gt; Using is fully valid. And there is no need to add additional complexity to the convenience of using one of the above versions - most of them use any type of topics or content in any way.

In your case, like topics & lt; T & gt; Just fine, to hide the details of the implementation, you should show it how.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -