Browse Source

feat: Optimize the data export interface

pull/1470/head
colin 5 months ago
parent
commit
2d765cdb96
  1. 13
      aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MagicodesIE.Excel/LINGYUN/Abp/Exporter/AbpExporterMagicodesIEExcelModule.cs
  2. 5
      aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MagicodesIE.Excel/LINGYUN/Abp/Exporter/MagicodesIEExcelExporterProvider.cs
  3. 4
      aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MagicodesIE.Excel/LINGYUN/Abp/Exporter/MagicodesIEExcelImporterProvider.cs
  4. 16
      aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MiniExcel/LINGYUN/Abp/Exporter/AbpExporterMiniExcelModule.cs
  5. 6
      aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MiniExcel/LINGYUN/Abp/Exporter/MiniExcelExporterProvider.cs
  6. 6
      aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MiniExcel/LINGYUN/Abp/Exporter/MiniExcelImporterProvider.cs
  7. 4
      aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MiniSoftware/LINGYUN/Abp/Exporter/MiniSoftware/MiniExcelExporterProvider.cs
  8. 5
      aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MiniSoftware/LINGYUN/Abp/Exporter/MiniSoftware/MiniExcelImporterProvider.cs

13
aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MagicodesIE.Excel/LINGYUN/Abp/Exporter/AbpExporterMagicodesIEExcelModule.cs

@ -1,7 +1,6 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Exporter.MagicodesIE.Excel;
@ -12,19 +11,7 @@ public class AbpExporterMagicodesIEExcelModule : AbpModule
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddScoped<IExcelExporter, ExcelExporter>();
context.Services.AddScoped<IExcelImporter, ExcelImporter>();
context.Services.AddScoped<IExportFileByTemplate, ExcelExporter>();
context.Services.Replace(
ServiceDescriptor.Transient(
typeof(IExporterProvider),
typeof(MagicodesIEExcelExporterProvider)));
context.Services.Replace(
ServiceDescriptor.Transient(
typeof(IImporterProvider),
typeof(MagicodesIEExcelImporterProvider)));
}
}

5
aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MagicodesIE.Excel/LINGYUN/Abp/Exporter/MagicodesIEExcelExporterProvider.cs

@ -9,6 +9,11 @@ using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.Exporter.MagicodesIE.Excel;
#pragma warning disable CS0618
[ExposeServices(typeof(IExporterProvider))]
#pragma warning restore CS0618
[ExposeServices(typeof(IExcelExporterProvider))]
public class MagicodesIEExcelExporterProvider :
IExcelExporterProvider,
#pragma warning disable CS0618

4
aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MagicodesIE.Excel/LINGYUN/Abp/Exporter/MagicodesIEExcelImporterProvider.cs

@ -12,6 +12,10 @@ using Volo.Abp.Json;
namespace LINGYUN.Abp.Exporter.MagicodesIE.Excel;
#pragma warning disable CS0618
[ExposeServices(typeof(IImporterProvider))]
#pragma warning restore CS0618
[ExposeServices(typeof(IExcelImporterProvider))]
public class MagicodesIEExcelImporterProvider :
IExcelImporterProvider,
#pragma warning disable CS0618

16
aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MiniExcel/LINGYUN/Abp/Exporter/AbpExporterMiniExcelModule.cs

@ -1,6 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;
using System;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Exporter.MiniExcel;
@ -9,16 +7,4 @@ namespace LINGYUN.Abp.Exporter.MiniExcel;
[DependsOn(typeof(AbpExporterCoreModule))]
public class AbpExporterMiniExcelModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.Replace(
ServiceDescriptor.Transient(
typeof(IExporterProvider),
typeof(MiniExcelExporterProvider)));
context.Services.Replace(
ServiceDescriptor.Transient(
typeof(IImporterProvider),
typeof(MiniExcelImporterProvider)));
}
}

6
aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MiniExcel/LINGYUN/Abp/Exporter/MiniExcelExporterProvider.cs

@ -1,6 +1,7 @@
using Microsoft.Extensions.Options;
using MiniExcelLibs;
using MiniExcelLibs.OpenXml;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
@ -8,6 +9,11 @@ using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.Exporter.MiniExcel;
#pragma warning disable CS0618
[ExposeServices(typeof(IExporterProvider))]
#pragma warning restore CS0618
[Obsolete("Use AbpExporterMiniSoftwareModule")]
public class MiniExcelExporterProvider : IExporterProvider, ITransientDependency
{
private readonly AbpExporterMiniExcelOptions _options;

6
aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MiniExcel/LINGYUN/Abp/Exporter/MiniExcelImporterProvider.cs

@ -1,6 +1,7 @@
using Microsoft.Extensions.Options;
using MiniExcelLibs;
using MiniExcelLibs.OpenXml;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.IO;
@ -8,6 +9,11 @@ using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.Exporter.MiniExcel;
#pragma warning disable CS0618
[ExposeServices(typeof(IImporterProvider))]
#pragma warning restore CS0618
[Obsolete("Use AbpExporterMiniSoftwareModule")]
public class MiniExcelImporterProvider : IImporterProvider, ITransientDependency
{
private readonly AbpExporterMiniExcelOptions _options;

4
aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MiniSoftware/LINGYUN/Abp/Exporter/MiniSoftware/MiniExcelExporterProvider.cs

@ -10,6 +10,10 @@ using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.Exporter.MiniSoftware;
#pragma warning disable CS0618
[ExposeServices(typeof(IExporterProvider))]
#pragma warning restore CS0618
[ExposeServices(typeof(IExcelExporterProvider))]
public class MiniExcelExporterProvider :
IExcelExporterProvider,
#pragma warning disable CS0618

5
aspnet-core/framework/exporter/LINGYUN.Abp.Exporter.MiniSoftware/LINGYUN/Abp/Exporter/MiniSoftware/MiniExcelImporterProvider.cs

@ -8,6 +8,11 @@ using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.Exporter.MiniSoftware;
#pragma warning disable CS0618
[ExposeServices(typeof(IImporterProvider))]
#pragma warning restore CS0618
[ExposeServices(typeof(IExcelImporterProvider))]
public class MiniExcelImporterProvider :
IExcelImporterProvider,
#pragma warning disable CS0618

Loading…
Cancel
Save