本文整理汇总了C#中MonoMac.Foundation.NSAutoreleasePool.InvokeOnMainThread方法的典型用法代码示例。如果您正苦于以下问题:C# NSAutoreleasePool.InvokeOnMainThread方法的具体用法?C# NSAutoreleasePool.InvokeOnMainThread怎么用?C# NSAutoreleasePool.InvokeOnMainThread使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoMac.Foundation.NSAutoreleasePool
的用法示例。
在下文中一共展示了NSAutoreleasePool.InvokeOnMainThread方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreatePreferencesView
public override IDesktopPreferencesView CreatePreferencesView()
{
IDesktopPreferencesView view = null;
using (var pool = new NSAutoreleasePool())
{
pool.InvokeOnMainThread(delegate {
view = base.CreatePreferencesView();
});
}
return view;
}
示例2: CreateCloudConnectView
public override ICloudConnectView CreateCloudConnectView()
{
ICloudConnectView view = null;
using (var pool = new NSAutoreleasePool())
{
pool.InvokeOnMainThread(delegate {
view = base.CreateCloudConnectView();
});
}
return view;
}
示例3: CreateStartResumePlaybackView
public override IStartResumePlaybackView CreateStartResumePlaybackView()
{
IStartResumePlaybackView view = null;
using (var pool = new NSAutoreleasePool())
{
pool.InvokeOnMainThread(delegate {
view = base.CreateStartResumePlaybackView();
});
}
return view;
}
示例4: CreateEditSongMetadataView
public override IEditSongMetadataView CreateEditSongMetadataView(AudioFile audioFile)
{
IEditSongMetadataView view = null;
using (var pool = new NSAutoreleasePool())
{
pool.InvokeOnMainThread(delegate {
view = base.CreateEditSongMetadataView(audioFile);
});
}
return view;
}
示例5: CreateSyncWebBrowserView
public override ISyncWebBrowserView CreateSyncWebBrowserView()
{
ISyncWebBrowserView view = null;
using (var pool = new NSAutoreleasePool())
{
pool.InvokeOnMainThread(delegate {
view = base.CreateSyncWebBrowserView();
});
}
return view;
}
示例6: CreateSyncDownloadView
public override ISyncDownloadView CreateSyncDownloadView(SyncDevice device, IEnumerable<AudioFile> audioFiles)
{
ISyncDownloadView view = null;
using (var pool = new NSAutoreleasePool())
{
pool.InvokeOnMainThread(delegate {
view = base.CreateSyncDownloadView(device, audioFiles);
});
}
return view;
}
示例7: CreateSyncMenuView
public override ISyncMenuView CreateSyncMenuView(SyncDevice device)
{
ISyncMenuView view = null;
using (var pool = new NSAutoreleasePool())
{
pool.InvokeOnMainThread(delegate {
view = base.CreateSyncMenuView(device);
});
}
return view;
}
示例8: CreateSyncView
public override ISyncView CreateSyncView()
{
ISyncView view = null;
using (var pool = new NSAutoreleasePool())
{
pool.InvokeOnMainThread(delegate {
view = base.CreateSyncView();
});
}
return view;
// if (_syncView == null)
// {
// using (var pool = new NSAutoreleasePool())
// {
// pool.InvokeOnMainThread(delegate
// {
// _syncView = base.CreateSyncView();
// });
// }
// }
// else
// {
// _syncView.ShowView(true);
// }
// return _syncView;
}
示例9: OnUsageUpdated
protected virtual void OnUsageUpdated()
{
// Usage info comes from an async request, it could be on any thread
// So we need to make sure we have a release pool for ObjC code in the thread
// We also need to ensure we get back on the UI thread to prevent potential cross-thread issues
using (var pool = new NSAutoreleasePool())
{
pool.InvokeOnMainThread(() =>
{
UsageInformation usage;
lock (_lockObject)
usage = _currentUsage;
if (UsageUpdated != null)
UsageUpdated(this, new UsageUpdatedEventArgs(usage));
});
}
}