8000 GitHub - magerate/XamarinDispatchScheduler
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

magerate/XamarinDispatchScheduler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xamarin Main Thread Dispatcher

Nuget

Examples

Observable
    .Timer(TimeSpan.FromSeconds(2))
    .ObserveOn(XamarinDispatcherScheduler.Current)
    .Subscribe(_ =>
    {
        lblChangeMe.Text = "Changed";
    });
//Helper to check if you're on the main thread
if (!XamarinDispatcherScheduler.OnMainThread())
{
    throw new Exception("Scheduler fail");
}

I borrowed from the CoreDispatchScheduler From Rx.NET and the Xamarin.Forms BeginInvokeOnMainThread implementations to create a combined Scheduler that will work Cross Platform for Xamarin.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.3%
  • Batchfile 0.7%
0