diff options
author | Miguel de Icaza <miguel@gnome.org> | 2015-09-08 17:34:39 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2015-09-08 17:34:47 +0300 |
commit | 12fcfa38163d0326967d918217d195fa36787135 (patch) | |
tree | 88c061373d2d867ef4b80accde309ebcfa0f9084 /mcs | |
parent | e3f6e7a7742fc7910308f641676c85fb2579eb60 (diff) |
[corlib] MulticastDelegate, bring back the HasSingleTarget internal method for public use
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/corlib/System/MulticastDelegate.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mcs/class/corlib/System/MulticastDelegate.cs b/mcs/class/corlib/System/MulticastDelegate.cs index 4941e7cea50..405894b4a5d 100644 --- a/mcs/class/corlib/System/MulticastDelegate.cs +++ b/mcs/class/corlib/System/MulticastDelegate.cs @@ -74,6 +74,17 @@ namespace System } } + // Some high-performance applications use this internal property + // to avoid using a slow path to determine if there is more than one handler + // This brings an API that we removed in f410e545e2db0e0dc338673a6b10a5cfd2d3340f + // which some users depeneded on + // + // This is an example of code that used this: + // https://gist.github.com/migueldeicaza/cd99938c2a4372e7e5d5 + // + // Do not remove this API + internal bool HasSingleTarget => delegates == null; + // <remarks> // Equals: two multicast delegates are equal if their base is equal // and their invocations list is equal. |