/ReactiveExtensionExamples/App.cs

https://github.com/TheEightBot/Reactive-Examples · C# · 36 lines · 29 code · 5 blank · 2 comment · 0 complexity · 3f12dce1d40d8e80b4d651ab302efc3e MD5 · raw file

  1. using System;
  2. using Refit;
  3. using Splat;
  4. using Xamarin.Forms;
  5. namespace ReactiveExtensionExamples
  6. {
  7. public class App : Application
  8. {
  9. public App ()
  10. {
  11. Values.Styles.Initialize ();
  12. MainPage = new UserInterface.Pages.NavigationContainerPage ();
  13. }
  14. protected override void OnStart ()
  15. {
  16. Locator
  17. .CurrentMutable
  18. .RegisterLazySingleton(
  19. () => RestService.For<Services.Api.IDuckDuckGoApi>("https://api.duckduckgo.com"),
  20. typeof(Services.Api.IDuckDuckGoApi));
  21. }
  22. protected override void OnSleep ()
  23. {
  24. // Handle when your app sleeps
  25. }
  26. protected override void OnResume ()
  27. {
  28. // Handle when your app resumes
  29. }
  30. }
  31. }