Commit Graph

14 Commits

Author SHA1 Message Date
Antony Male b3064171c1 Fix up the failing unit tests 2019-09-22 17:12:54 +01:00
Antony Male 8183c83190 Add BindAndInvoke
Fixes #43
2018-09-30 18:50:55 +01:00
Antony Male eb2da81b9d Deprecate BindWeak
Weak event subscriptions are basically impossible to get right, if
you allow anonymous delegates.

Fixes #38
2018-09-30 18:43:31 +01:00
Antony Male fc7f164c53 Remove unnecessary usings in unit tests 2015-09-23 21:46:36 +01:00
Antony Male f36de34bb2 Execute.Dispatcher can never be null, and dispatches synchronously by default
The previous behaviour was to raise an exception unless Execute.Dispatcher
had been explicitly defined. This was to detect cases where the user hadn't
set up Execute correctly, and treat them as errors rather than simply going
ahead with some possibly-unexpected behaviour.

However, since BootstrapperBase sets Execute.Dispatcher automatically, it's
highly unlikely that itwould ever not be set when it needed to be. Exceptions
are design mode and unit tests, both of which want (or can cope with) a
synchronous dispatcher.

Hence the behaviour change. Execute.Dispatcher is a synchronous dispatcher
by default, but is overridden to one that uses Application.Current.Dispatcher
by the bootstrapper if we're in a real application.
2015-01-04 21:30:34 +00:00
Antony Male 9ee23f1469 Remove Execute.TestExecuteSynchronously, in favour of a synchronous IDispatcher implementation 2015-01-04 13:10:37 +00:00
Antony Male 58d5a6e55e Change the handler type for Bind and BindWeak, to include the sender and property name 2014-06-22 17:22:24 +01:00
Antony Male c18563267f Remove the WeakEventManager, as it was too complex
It's replaced with a BindWeak extension method, similar to the existing
Bind. This rejects delegates with compiler-generated targets
2014-06-22 16:41:52 +01:00
Antony Male 4711e3fefa Fix tests involving changes to Execute 2014-04-24 12:58:09 +01:00
Antony Male f7210b8aa9 Rename IPropertyChangedBinding -> IEventBinding 2014-04-23 17:45:26 +01:00
Antony Male afe8b9c20f Remove tests which were no longer relevant, since Bind/BindWeak refactor 2014-04-23 17:44:55 +01:00
Antony Male 6eb9c6dbef Replace BindWeak with a WeakEventManager, and let Screen have an instance 2014-04-17 10:11:53 +01:00
Antony Male cc8e3343cf Finish off (?) the PropertyChangedExtensionsTests 2014-03-05 12:37:49 +00:00
Antony Male 3f304d131c Start writing tests for (and fixing) PropertyChangedExtensions
Currently a test is breaking, not sure why
2014-03-04 13:20:58 +00:00