From e3a7767a41917f4676b8bda45391ff8b2557177a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Thu, 14 Mar 2024 13:16:56 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84?= =?UTF-8?q?=D0=B5=D0=B9=D1=81=D0=BE=D0=B2=20=D1=8D=D0=BA=D1=81=D0=BF=D0=BE?= =?UTF-8?q?=D1=80=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExportOptions/IExportOptionsRequest.cs | 8 +++++++ .../ExportOptions/WellRelatedExportRequest.cs | 21 +++++++++++++++++++ AsbCloudApp/Services/IExportService.cs | 21 +++++++++++++++++++ .../Services/IProcessMapPlanExportService.cs | 19 ----------------- .../Services/ITrajectoryExportService.cs | 19 ----------------- 5 files changed, 50 insertions(+), 38 deletions(-) create mode 100644 AsbCloudApp/Requests/ExportOptions/IExportOptionsRequest.cs create mode 100644 AsbCloudApp/Requests/ExportOptions/WellRelatedExportRequest.cs create mode 100644 AsbCloudApp/Services/IExportService.cs delete mode 100644 AsbCloudApp/Services/IProcessMapPlanExportService.cs delete mode 100644 AsbCloudApp/Services/ITrajectoryExportService.cs diff --git a/AsbCloudApp/Requests/ExportOptions/IExportOptionsRequest.cs b/AsbCloudApp/Requests/ExportOptions/IExportOptionsRequest.cs new file mode 100644 index 00000000..8d65572b --- /dev/null +++ b/AsbCloudApp/Requests/ExportOptions/IExportOptionsRequest.cs @@ -0,0 +1,8 @@ +namespace AsbCloudApp.Requests.ExportOptions; + +/// +/// Параметры экспорта +/// +public interface IExportOptionsRequest +{ +} \ No newline at end of file diff --git a/AsbCloudApp/Requests/ExportOptions/WellRelatedExportRequest.cs b/AsbCloudApp/Requests/ExportOptions/WellRelatedExportRequest.cs new file mode 100644 index 00000000..63b185cd --- /dev/null +++ b/AsbCloudApp/Requests/ExportOptions/WellRelatedExportRequest.cs @@ -0,0 +1,21 @@ +namespace AsbCloudApp.Requests.ExportOptions; + +/// +/// Параметры экспорта +/// +public class WellRelatedExportRequest : IExportOptionsRequest +{ + /// + /// Конструктор + /// + /// Id скважины + public WellRelatedExportRequest(int idWell) + { + IdWell = idWell; + } + + /// + /// Id скважины + /// + public int IdWell { get; } +} \ No newline at end of file diff --git a/AsbCloudApp/Services/IExportService.cs b/AsbCloudApp/Services/IExportService.cs new file mode 100644 index 00000000..b921fec5 --- /dev/null +++ b/AsbCloudApp/Services/IExportService.cs @@ -0,0 +1,21 @@ +using System.IO; +using System.Threading; +using System.Threading.Tasks; +using AsbCloudApp.Requests.ExportOptions; + +namespace AsbCloudApp.Services; + +/// +/// Экспорт данных +/// +public interface IExportService + where TOptions : IExportOptionsRequest +{ + /// + /// Экспортировать данные + /// + /// + /// + /// + Task<(string FileName, Stream File)> ExportAsync(TOptions options, CancellationToken token); +} \ No newline at end of file diff --git a/AsbCloudApp/Services/IProcessMapPlanExportService.cs b/AsbCloudApp/Services/IProcessMapPlanExportService.cs deleted file mode 100644 index 6c226a55..00000000 --- a/AsbCloudApp/Services/IProcessMapPlanExportService.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.IO; -using System.Threading; -using System.Threading.Tasks; - -namespace AsbCloudApp.Services; - -/// -/// Экспорт РТК -/// -public interface IProcessMapPlanExportService -{ - /// - /// Экспортировать РТК по скважине - /// - /// - /// - /// - Task<(string FileName, Stream File)> ExportAsync(int idWell, CancellationToken token); -} \ No newline at end of file diff --git a/AsbCloudApp/Services/ITrajectoryExportService.cs b/AsbCloudApp/Services/ITrajectoryExportService.cs deleted file mode 100644 index 610ccf9f..00000000 --- a/AsbCloudApp/Services/ITrajectoryExportService.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.IO; -using System.Threading; -using System.Threading.Tasks; - -namespace AsbCloudApp.Services; - -/// -/// Экспорт траекторий -/// -public interface ITrajectoryExportService -{ - /// - /// Экспортировать траектории по скважине - /// - /// - /// - /// - Task<(string FileName, Stream File)> ExportAsync(int idWell, CancellationToken token); -} \ No newline at end of file