NatTypeTesterModule.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. global using JetBrains.Annotations;
  2. global using Microsoft;
  3. global using Microsoft.Extensions.DependencyInjection;
  4. global using Microsoft.Extensions.DependencyInjection.Extensions;
  5. global using Microsoft.UI.Windowing;
  6. global using Microsoft.UI.Xaml;
  7. global using Microsoft.UI.Xaml.Controls;
  8. global using Microsoft.VisualStudio.Threading;
  9. global using NatTypeTester.Extensions;
  10. global using NatTypeTester.ViewModels;
  11. global using NatTypeTester.Views;
  12. global using ReactiveMarbles.ObservableEvents;
  13. global using ReactiveUI;
  14. global using Splat;
  15. global using Splat.Microsoft.Extensions.DependencyInjection;
  16. global using STUN.Enums;
  17. global using System.Reactive.Disposables;
  18. global using System.Reactive.Linq;
  19. global using Volo.Abp;
  20. global using Volo.Abp.Autofac;
  21. global using Volo.Abp.DependencyInjection;
  22. global using Volo.Abp.Modularity;
  23. global using Windows.Graphics;
  24. global using Windows.System;
  25. namespace NatTypeTester;
  26. [DependsOn(
  27. typeof(AbpAutofacModule),
  28. typeof(NatTypeTesterViewModelModule)
  29. )]
  30. [UsedImplicitly]
  31. internal class NatTypeTesterModule : AbpModule
  32. {
  33. public override void PreConfigureServices(ServiceConfigurationContext context)
  34. {
  35. context.Services.UseMicrosoftDependencyResolver();
  36. Locator.CurrentMutable.InitializeSplat();
  37. Locator.CurrentMutable.InitializeReactiveUI(RegistrationNamespace.WinUI);
  38. }
  39. public override void ConfigureServices(ServiceConfigurationContext context)
  40. {
  41. context.Services.TryAddTransient<RoutingState>();
  42. }
  43. }