Work with Signals
What you should know beforehand:
Signal is a way for a class to provide notifications. Signals are very similar to C# events, nevertheless, there are differences that make them more suitable for use within ReSharper data flow infrastructure.
Signals must implement the
To "subscribe" a handler to a signal, use the
Advisemethod. A signal allows any number of listeners.
Unlike C# events, you should not care about "unsubscribing" from a signal to prevent memory leak. When you "subscribe" to a signal via
Advise, you also pass a lifetime. Once the lifetime is terminated, ReSharper will take care about "unsubscribing" by itself.
To fire the signal, use the
Signals have much in common with IProperty.
Signals are perfectly suited for MVC concept when an event should be fired by a view.
In simple cases, when you need a signal only for notification purposes (with no payload), you can use the