You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.7 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. using Microsoft.Extensions.DependencyInjection;
  2. using Microsoft.Extensions.DependencyInjection.Extensions;
  3. using Shentun.Peis.MultiTenancy;
  4. using Shentun.Peis.OrganizationUnits;
  5. using Volo.Abp.AuditLogging;
  6. using Volo.Abp.BackgroundJobs;
  7. using Volo.Abp.Emailing;
  8. using Volo.Abp.FeatureManagement;
  9. using Volo.Abp.Identity;
  10. using Volo.Abp.Modularity;
  11. using Volo.Abp.MultiTenancy;
  12. using Volo.Abp.OpenIddict;
  13. using Volo.Abp.PermissionManagement.Identity;
  14. using Volo.Abp.PermissionManagement.OpenIddict;
  15. using Volo.Abp.SettingManagement;
  16. using Volo.Abp.TenantManagement;
  17. namespace Shentun.Peis;
  18. [DependsOn(
  19. typeof(PeisDomainSharedModule),
  20. typeof(AbpAuditLoggingDomainModule),
  21. //typeof(AbpBackgroundJobsDomainModule),
  22. typeof(AbpFeatureManagementDomainModule),
  23. typeof(AbpIdentityDomainModule),
  24. typeof(AbpOpenIddictDomainModule),
  25. typeof(AbpPermissionManagementDomainOpenIddictModule),
  26. typeof(AbpPermissionManagementDomainIdentityModule),
  27. typeof(AbpSettingManagementDomainModule),
  28. typeof(AbpTenantManagementDomainModule),
  29. typeof(AbpEmailingModule)
  30. )]
  31. public class PeisDomainModule : AbpModule
  32. {
  33. public override void ConfigureServices(ServiceConfigurationContext context)
  34. {
  35. Configure<AbpMultiTenancyOptions>(options =>
  36. {
  37. options.IsEnabled = MultiTenancyConsts.IsEnabled;
  38. });
  39. AuditLogActionConsts.MaxParametersLength = 50000;
  40. context.Services.Replace(ServiceDescriptor.Singleton<OrganizationUnitManager, PeisOrganizationUnitManager>());
  41. #if DEBUG
  42. context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>());
  43. #endif
  44. //EntityHelper.ServiceScopeFactory = context.Services.GetRequiredService<IServiceScopeFactory>();
  45. }
  46. }