Skip to content

Releases: thomaslevesque/WeakEvent

4.1.0

09 Mar 19:54
b34ba27
Compare
Choose a tag to compare

New

  • Ability to catch exceptions thrown by individual handlers (#41)

Changed

  • The overload of unsubscribe that accepts a lifetimeObject is now obsolete. You no longer need to specify the lifetime object to unsubscribe.

4.1.0-beta.2

16 Nov 00:23
Compare
Choose a tag to compare
4.1.0-beta.2 Pre-release
Pre-release

Changed

  • Removed "unsubscribe on throw" feature introduced in previous beta

4.1.0-beta.1

15 Nov 15:50
1649193
Compare
Choose a tag to compare
4.1.0-beta.1 Pre-release
Pre-release

New

  • Ability to catch exceptions thrown by individual handlers (#41)

Changed

  • The overload of unsubscribe that accepts a lifetimeObject is now obsolete. You no longer need to specify the lifetime object to unsubscribe.

4.0.1

31 Oct 10:19
Compare
Choose a tag to compare

Fixed

  • Dead handlers are never removed from the DelegateCollection if the event is not raised (#39)

4.0.1-beta.2

28 Oct 18:26
Compare
Choose a tag to compare
4.0.1-beta.2 Pre-release
Pre-release
Don't add new empty entries when rebuilding the index

4.0.1-beta.1

25 Oct 12:18
Compare
Choose a tag to compare
4.0.1-beta.1 Pre-release
Pre-release

Fixed

  • Dead handlers are never removed from the DelegateCollection if the event is not raised (#39)

4.0.0

12 Oct 12:06
Compare
Choose a tag to compare

New

  • Enable C# 8 nullability analysis (#34)
  • Allow to specify a lifetime object when subscribing to the event (useful when subscribing with an anonymous delegate) (#29)
  • Add documentation for public API
  • Add package logo

Breaking changes

  • Dropped support for .NET Framework 3.5 and .NET Standard 1.1 (.NET Standard 1.3 is now supported)
  • Unsubscribe has been changed to be consistent with the behavior of Delegate.Remove, which has a similar role. (#13)
    • Multiple occurrences of the same delegate
      • Previous behavior: all occurrences of the unsubscribed delegate were removed. If you subscribed with the same delegate A twice, and unsubscribed A only once, all occurrences of A were removed.
      • New behavior: only the last occurrence of the unsubscribed delegate is removed. If you subscribed with the same delegate A twice, and unsubscribed A only once, only the last occurrence of A is removed.
    • Multicast delegates:
      • Previous behavior: when unsubscribing a multicast delegate, all occurrences of each individual delegate in the invocation list was removed. If you had subscribed with delegates A, B, C, D, C, then unsubscribed with multicast delegate AC (combination of A and C), all occurrences of A and C were removed, and you ended up with handlers B, D.
      • New behavior: when unsubscribing a multicast delegate, the last occurrence of the complete invocation list is removed. If you had subscribed with delegates A, B, C, D, C, then unsubscribe with multicast delegate AC (combination of A and C), nothing is removed, because the sequence A, C don't appear in A, B, C, D, C. If you unsubscribe with multicast delegate BCD, then B, C and D are removed, and you end up with handlers A, C.

4.0.0-beta.3

12 Oct 11:44
Compare
Choose a tag to compare
4.0.0-beta.3 Pre-release
Pre-release

New

  • Added package logo

4.0.0-beta.2

30 Sep 21:45
Compare
Choose a tag to compare
4.0.0-beta.2 Pre-release
Pre-release

New

  • Add documentation for public API

4.0.0-beta.1

24 Sep 10:41
10ecde8
Compare
Choose a tag to compare
4.0.0-beta.1 Pre-release
Pre-release

New

  • Enable C# 8 nullability analysis (#34)
  • Allow to specify a lifetime object when subscribing to the event (useful when subscribing with an anonymous delegate) (#29)

Breaking changes

  • Dropped support for .NET Framework 3.5 and .NET Standard 1.1 (.NET Standard 1.3 is now supported)
  • Unsubscribe has been changed to be consistent with the behavior of Delegate.Remove, which has a similar role. (#13)
    • Multiple occurrences of the same delegate
      • Previous behavior: all occurrences of the unsubscribed delegate were removed. If you subscribed with the same delegate A twice, and unsubscribed A only once, all occurrences of A were removed.
      • New behavior: only the last occurrence of the unsubscribed delegate is removed. If you subscribed with the same delegate A twice, and unsubscribed A only once, only the last occurrence of A is removed.
    • Multicast delegates:
      • Previous behavior: when unsubscribing a multicast delegate, all occurrences of each individual delegate in the invocation list was removed. If you had subscribed with delegates A, B, C, D, C, then unsubscribed with multicast delegate AC (combination of A and C), all occurrences of A and C were removed, and you ended up with handlers B, D.
      • New behavior: when unsubscribing a multicast delegate, the last occurrence of the complete invocation list is removed. If you had subscribed with delegates A, B, C, D, C, then unsubscribe with multicast delegate AC (combination of A and C), nothing is removed, because the sequence A, C don't appear in A, B, C, D, C. If you unsubscribe with multicast delegate BCD, then B, C and D are removed, and you end up with handlers A, C.