rehansaeed.github.io icon indicating copy to clipboard operation
rehansaeed.github.io copied to clipboard

[Comment] Reactive Extensions (Rx) - Part 2 - Wrapping C# Events

Open RehanSaeed opened this issue 5 years ago • 4 comments

https://rehansaeed.com/reactive-extensions-part2-wrapping-events/

RehanSaeed avatar May 12 '20 11:05 RehanSaeed

Davide Cologni Davide Cologni commented on 2018-01-02 22:25:55

Hi I found this tutorial very useful, I want suggest to use the dot conditional operator (?.) in the protected method that wrap event wo explicit checking if handler is null in this way:

this.propertyChange?.Invoke(this, new EventArgsBlaBla());

With expression body function is very concise and elegant :^)

RehanSaeed avatar May 12 '20 11:05 RehanSaeed

Muhammad Rehan Saeed Muhammad Rehan Saeed commented on 2018-01-03 10:20:00

Hi I found this tutorial very useful, I want suggest to use the dot conditional operator (?.) in the protected method that wrap event wo explicit checking if handler is null in this way:

this.propertyChange?.Invoke(this, new EventArgsBlaBla());

With expression body function is very concise and elegant :^)

I wrote the blog post before the null conditional operator was available but I've now updated the post, thanks!

RehanSaeed avatar May 12 '20 11:05 RehanSaeed

George Papadopoulos George Papadopoulos commented on 2019-03-06 21:40:11

Hi there, is it possible to give us an example of how the abstract class NotifyPropertyChanges is used? Thanks In advance.

RehanSaeed avatar May 12 '20 11:05 RehanSaeed

Muhammad Rehan Saeed Muhammad Rehan Saeed commented on 2019-03-08 10:02:44

Hi there, is it possible to give us an example of how the abstract class NotifyPropertyChanges is used? Thanks In advance.

I wrote a series of blog posts you can look at here.

RehanSaeed avatar May 12 '20 11:05 RehanSaeed