From dc1fc8b221e9324fe0f82c4ea4a32d87d282bd25 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 8 Dec 2021 14:45:14 +0300 Subject: [PATCH] refactoring namespaces --- RehauSku.Assist.csproj | 2 +- Source/AddIn/AddIn.cs | 2 +- Source/AddIn/Functions.cs | 3 ++- Source/Assistant/HttpClientUtil.cs | 2 +- Source/Assistant/IProduct.cs | 2 +- Source/Assistant/RequestModifier.cs | 2 +- Source/Assistant/SkuAssist.cs | 2 +- Source/Assistant/StoreResponse.cs | 2 +- Source/DataExport/{DataWriter.cs => Exporter.cs} | 7 ++++--- Source/Ribbon/RibbonController.cs | 6 +++--- 10 files changed, 16 insertions(+), 14 deletions(-) rename Source/DataExport/{DataWriter.cs => Exporter.cs} (96%) diff --git a/RehauSku.Assist.csproj b/RehauSku.Assist.csproj index 5fd5051..63b4063 100644 --- a/RehauSku.Assist.csproj +++ b/RehauSku.Assist.csproj @@ -100,7 +100,7 @@ - + diff --git a/Source/AddIn/AddIn.cs b/Source/AddIn/AddIn.cs index 3c82406..5255e2e 100644 --- a/Source/AddIn/AddIn.cs +++ b/Source/AddIn/AddIn.cs @@ -3,7 +3,7 @@ using ExcelDna.Registration; using Microsoft.Win32; using System.Net.Http; -namespace RehauSku.Assist +namespace RehauSku { public enum ResponseOrder { diff --git a/Source/AddIn/Functions.cs b/Source/AddIn/Functions.cs index 6d94e24..c6e9da4 100644 --- a/Source/AddIn/Functions.cs +++ b/Source/AddIn/Functions.cs @@ -1,6 +1,7 @@ using ExcelDna.Integration; +using RehauSku.Assistant; -namespace RehauSku.Assist +namespace RehauSku { public class Functions { diff --git a/Source/Assistant/HttpClientUtil.cs b/Source/Assistant/HttpClientUtil.cs index 57cd060..95a90e9 100644 --- a/Source/Assistant/HttpClientUtil.cs +++ b/Source/Assistant/HttpClientUtil.cs @@ -5,7 +5,7 @@ using System.Net; using System.Net.Http; using System.Threading.Tasks; -namespace RehauSku.Assist +namespace RehauSku.Assistant { static class HttpClientUtil { diff --git a/Source/Assistant/IProduct.cs b/Source/Assistant/IProduct.cs index e469ff8..9494eeb 100644 --- a/Source/Assistant/IProduct.cs +++ b/Source/Assistant/IProduct.cs @@ -1,4 +1,4 @@ -namespace RehauSku.Assist +namespace RehauSku.Assistant { interface IProduct { diff --git a/Source/Assistant/RequestModifier.cs b/Source/Assistant/RequestModifier.cs index c479a74..0db0b90 100644 --- a/Source/Assistant/RequestModifier.cs +++ b/Source/Assistant/RequestModifier.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Text; using System.Text.RegularExpressions; -namespace RehauSku.Assist +namespace RehauSku.Assistant { public static class RequestModifier { diff --git a/Source/Assistant/SkuAssist.cs b/Source/Assistant/SkuAssist.cs index 775a33c..eddb0cd 100644 --- a/Source/Assistant/SkuAssist.cs +++ b/Source/Assistant/SkuAssist.cs @@ -9,7 +9,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Forms; -namespace RehauSku.Assist +namespace RehauSku.Assistant { public enum ProductField { diff --git a/Source/Assistant/StoreResponse.cs b/Source/Assistant/StoreResponse.cs index ef1f05d..8e1759d 100644 --- a/Source/Assistant/StoreResponse.cs +++ b/Source/Assistant/StoreResponse.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace RehauSku.Assist +namespace RehauSku.Assistant { public class StoreResponce { diff --git a/Source/DataExport/DataWriter.cs b/Source/DataExport/Exporter.cs similarity index 96% rename from Source/DataExport/DataWriter.cs rename to Source/DataExport/Exporter.cs index cf18c9e..d8b8380 100644 --- a/Source/DataExport/DataWriter.cs +++ b/Source/DataExport/Exporter.cs @@ -3,17 +3,18 @@ using Microsoft.Office.Interop.Excel; using System; using System.Collections.Generic; using System.IO; +using RehauSku.Assistant; -namespace RehauSku.Assist +namespace RehauSku.DataExport { - public class DataWriter : IDisposable + public class Exporter : IDisposable { private Application xlApp; private Dictionary SkuAmount { get; set; } private object[,] SelectedCells { get; set; } private string WorkingFileName { get; set; } - public DataWriter() + public Exporter() { this.xlApp = (Application)ExcelDnaUtil.Application; this.WorkingFileName = xlApp.ActiveWorkbook.FullName; diff --git a/Source/Ribbon/RibbonController.cs b/Source/Ribbon/RibbonController.cs index c4ca6d7..7402a09 100644 --- a/Source/Ribbon/RibbonController.cs +++ b/Source/Ribbon/RibbonController.cs @@ -1,9 +1,9 @@ using System.Runtime.InteropServices; using System.Windows.Forms; using ExcelDna.Integration.CustomUI; -using RehauSku.Assist; +using RehauSku.DataExport; -namespace Ribbon +namespace RehauSku.Ribbon { [ComVisible(true)] public class RibbonController : ExcelRibbon @@ -26,7 +26,7 @@ namespace Ribbon public void OnButtonPressed(IRibbonControl control) { - using (DataWriter dw = new DataWriter()) + using (Exporter dw = new Exporter()) { if (!dw.IsRangeValid()) {