NatTypeTesterModule.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.ApplicationModel.Resources;
  24. global using Windows.Graphics;
  25. global using Windows.System;
  26. namespace NatTypeTester;
  27. [DependsOn(
  28. typeof(AbpAutofacModule),
  29. typeof(NatTypeTesterViewModelModule)
  30. )]
  31. [UsedImplicitly]
  32. internal class NatTypeTesterModule : AbpModule
  33. {
  34. public override void PreConfigureServices(ServiceConfigurationContext context)
  35. {
  36. context.Services.UseMicrosoftDependencyResolver();
  37. Locator.CurrentMutable.InitializeSplat();
  38. Locator.CurrentMutable.InitializeReactiveUI(RegistrationNamespace.WinUI);
  39. }
  40. public override void ConfigureServices(ServiceConfigurationContext context)
  41. {
  42. context.Services.TryAddTransient<RoutingState>();
  43. }
  44. }