forked from ddrilling/AsbCloudServer
Рефакторинг интерфейсов экспорта
This commit is contained in:
parent
b662f13819
commit
e3a7767a41
@ -0,0 +1,8 @@
|
|||||||
|
namespace AsbCloudApp.Requests.ExportOptions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Параметры экспорта
|
||||||
|
/// </summary>
|
||||||
|
public interface IExportOptionsRequest
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
namespace AsbCloudApp.Requests.ExportOptions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Параметры экспорта
|
||||||
|
/// </summary>
|
||||||
|
public class WellRelatedExportRequest : IExportOptionsRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Конструктор
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idWell">Id скважины</param>
|
||||||
|
public WellRelatedExportRequest(int idWell)
|
||||||
|
{
|
||||||
|
IdWell = idWell;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Id скважины
|
||||||
|
/// </summary>
|
||||||
|
public int IdWell { get; }
|
||||||
|
}
|
21
AsbCloudApp/Services/IExportService.cs
Normal file
21
AsbCloudApp/Services/IExportService.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System.IO;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using AsbCloudApp.Requests.ExportOptions;
|
||||||
|
|
||||||
|
namespace AsbCloudApp.Services;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Экспорт данных
|
||||||
|
/// </summary>
|
||||||
|
public interface IExportService<in TOptions>
|
||||||
|
where TOptions : IExportOptionsRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Экспортировать данные
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="options"></param>
|
||||||
|
/// <param name="token"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<(string FileName, Stream File)> ExportAsync(TOptions options, CancellationToken token);
|
||||||
|
}
|
@ -1,19 +0,0 @@
|
|||||||
using System.IO;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AsbCloudApp.Services;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Экспорт РТК
|
|
||||||
/// </summary>
|
|
||||||
public interface IProcessMapPlanExportService
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Экспортировать РТК по скважине
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="idWell"></param>
|
|
||||||
/// <param name="token"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<(string FileName, Stream File)> ExportAsync(int idWell, CancellationToken token);
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
using System.IO;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AsbCloudApp.Services;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Экспорт траекторий
|
|
||||||
/// </summary>
|
|
||||||
public interface ITrajectoryExportService
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Экспортировать траектории по скважине
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="idWell"></param>
|
|
||||||
/// <param name="token"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<(string FileName, Stream File)> ExportAsync(int idWell, CancellationToken token);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user