Fix NSDistributedNotificationCenter.DefaultCenter return value

- As we can't change NSDistributedNotificationCenter.DefaultCenter return value outside of XAMCORE_4_0 add NSDistributedNotificationCenter.GetDefaultCenter () and point people to that for now.
- Fixed in XAMCORE_4_0 without the hack
This commit is contained in:
P3PPP 2018-06-30 05:27:53 +09:00 коммит произвёл Chris Hamons
Родитель e110612118
Коммит c1f759ee56
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -10255,7 +10255,15 @@ namespace Foundation
interface NSDistributedNotificationCenter {
[Static]
[Export ("defaultCenter")]
#if XAMCORE_4_0
NSDistributedNotificationCenter DefaultCenter { get; }
#else
NSDistributedNotificationCenter GetDefaultCenter ();
[Advice ("Use 'GetDefaultCenter ()' for a strongly typed version.")]
[Wrap ("GetDefaultCenter ()", IsVirtual = true)]
NSObject DefaultCenter { get; }
#endif
[Export ("addObserver:selector:name:object:suspensionBehavior:")]
void AddObserver (NSObject observer, Selector selector, [NullAllowed] string notificationName, [NullAllowed] string notificationSenderc, NSNotificationSuspensionBehavior suspensionBehavior);