From 9730600164205385950aaf404fd85d4722a62759 Mon Sep 17 00:00:00 2001 From: James Kolpack Date: Wed, 27 Apr 2016 09:52:41 -0400 Subject: [PATCH] Code rearrange for services and charting --- Core/Charter/CurveDataConverter.cs | 4 ++-- Web/Controllers/LeafCharterController.cs | 4 ++-- Web/HangfireStartup.cs | 1 + .../LeafGasCharter.cs} | 4 ++-- Web/Services/{ => PiscalQueue}/FinishComplete.cs | 2 +- Web/Services/{ => PiscalQueue}/PiscalQueueBase.cs | 2 +- .../{ => PiscalQueue}/PiscalQueueManager.cs | 2 +- .../{ => PiscalQueue}/PiscalQueueWorker.cs | 2 +- Web/Services/{ => PiscalQueue}/PiscalService.cs | 2 +- Web/Services/{ => PiscalQueue}/StartPending.cs | 2 +- Web/Web.csproj | 14 +++++++------- 11 files changed, 20 insertions(+), 19 deletions(-) rename Web/{Charter/LeafWebCharter.cs => Services/LeafGasCharter.cs} (99%) rename Web/Services/{ => PiscalQueue}/FinishComplete.cs (96%) rename Web/Services/{ => PiscalQueue}/PiscalQueueBase.cs (97%) rename Web/Services/{ => PiscalQueue}/PiscalQueueManager.cs (98%) rename Web/Services/{ => PiscalQueue}/PiscalQueueWorker.cs (95%) rename Web/Services/{ => PiscalQueue}/PiscalService.cs (96%) rename Web/Services/{ => PiscalQueue}/StartPending.cs (88%) diff --git a/Core/Charter/CurveDataConverter.cs b/Core/Charter/CurveDataConverter.cs index 0358560..85b7981 100644 --- a/Core/Charter/CurveDataConverter.cs +++ b/Core/Charter/CurveDataConverter.cs @@ -8,10 +8,10 @@ namespace LeafWeb.Core.Charter { public static class CurveDataConverter { - public static IEnumerable Convert(IEnumerable cntrlComparison) + public static IEnumerable Convert(IEnumerable leafGasComparison) { var comparisonGroups = - from comparison in cntrlComparison + from comparison in leafGasComparison group comparison by comparison.CurveID into curves select new { diff --git a/Web/Controllers/LeafCharterController.cs b/Web/Controllers/LeafCharterController.cs index 719a17f..3e570d5 100644 --- a/Web/Controllers/LeafCharterController.cs +++ b/Web/Controllers/LeafCharterController.cs @@ -10,7 +10,7 @@ using System.Web.UI.WebControls; using LeafWeb.Core.Charter; using LeafWeb.Core.Entities; using LeafWeb.Core.Parsers; -using LeafWeb.Web.Charter; +using LeafWeb.Web.Services; using LeafWeb.Web.ViewModels.LeafCharter; namespace LeafWeb.Web.Controllers @@ -80,7 +80,7 @@ namespace LeafWeb.Web.Controllers private IEnumerable GetChartBitmaps(CurveData curveData) { - var charts = LeafWebCharter.ProduceCharts(curveData); + var charts = LeafGasCharter.ProduceCharts(curveData); foreach (var chart in charts) { diff --git a/Web/HangfireStartup.cs b/Web/HangfireStartup.cs index 5a41206..35bd0f7 100644 --- a/Web/HangfireStartup.cs +++ b/Web/HangfireStartup.cs @@ -3,6 +3,7 @@ using Hangfire; using Microsoft.Owin; using LeafWeb.Web; using LeafWeb.Web.Services; +using LeafWeb.Web.Services.PiscalQueue; using Owin; using ConfigurationManager = System.Configuration.ConfigurationManager; diff --git a/Web/Charter/LeafWebCharter.cs b/Web/Services/LeafGasCharter.cs similarity index 99% rename from Web/Charter/LeafWebCharter.cs rename to Web/Services/LeafGasCharter.cs index c8b0f49..40367b1 100644 --- a/Web/Charter/LeafWebCharter.cs +++ b/Web/Services/LeafGasCharter.cs @@ -6,9 +6,9 @@ using System.Web.UI.WebControls; using LeafWeb.Core.Charter; using LeafWeb.Core.Utility; -namespace LeafWeb.Web.Charter +namespace LeafWeb.Web.Services { - public static class LeafWebCharter + public static class LeafGasCharter { private static readonly Font TitleFont = new Font(new FontFamily("Times New Roman"), 10, FontStyle.Bold); private static readonly Font AxisFont = new Font(new FontFamily("Times New Roman"), 10, FontStyle.Bold); diff --git a/Web/Services/FinishComplete.cs b/Web/Services/PiscalQueue/FinishComplete.cs similarity index 96% rename from Web/Services/FinishComplete.cs rename to Web/Services/PiscalQueue/FinishComplete.cs index 3a0db66..ebe9dcf 100644 --- a/Web/Services/FinishComplete.cs +++ b/Web/Services/PiscalQueue/FinishComplete.cs @@ -1,7 +1,7 @@ using System.Linq; using LeafWeb.Core.Entities; -namespace LeafWeb.Web.Services +namespace LeafWeb.Web.Services.PiscalQueue { public class FinishComplete : PiscalQueueWorker { diff --git a/Web/Services/PiscalQueueBase.cs b/Web/Services/PiscalQueue/PiscalQueueBase.cs similarity index 97% rename from Web/Services/PiscalQueueBase.cs rename to Web/Services/PiscalQueue/PiscalQueueBase.cs index 857dd17..06caef2 100644 --- a/Web/Services/PiscalQueueBase.cs +++ b/Web/Services/PiscalQueue/PiscalQueueBase.cs @@ -7,7 +7,7 @@ using LeafWeb.Core.Remote; using NLog; using Polly; -namespace LeafWeb.Web.Services +namespace LeafWeb.Web.Services.PiscalQueue { public abstract class PiscalQueueBase : IDisposable { diff --git a/Web/Services/PiscalQueueManager.cs b/Web/Services/PiscalQueue/PiscalQueueManager.cs similarity index 98% rename from Web/Services/PiscalQueueManager.cs rename to Web/Services/PiscalQueue/PiscalQueueManager.cs index ccc888d..52f705b 100644 --- a/Web/Services/PiscalQueueManager.cs +++ b/Web/Services/PiscalQueue/PiscalQueueManager.cs @@ -4,7 +4,7 @@ using System.Threading; using LeafWeb.Core.Entities; using LeafWeb.Core.Remote; -namespace LeafWeb.Web.Services +namespace LeafWeb.Web.Services.PiscalQueue { public class PiscalQueueManager : PiscalQueueBase { diff --git a/Web/Services/PiscalQueueWorker.cs b/Web/Services/PiscalQueue/PiscalQueueWorker.cs similarity index 95% rename from Web/Services/PiscalQueueWorker.cs rename to Web/Services/PiscalQueue/PiscalQueueWorker.cs index 989bd3c..2145b5b 100644 --- a/Web/Services/PiscalQueueWorker.cs +++ b/Web/Services/PiscalQueue/PiscalQueueWorker.cs @@ -2,7 +2,7 @@ using System; using LeafWeb.Core.Entities; using LeafWeb.Core.Remote; -namespace LeafWeb.Web.Services +namespace LeafWeb.Web.Services.PiscalQueue { public abstract class PiscalQueueWorker : PiscalQueueBase { diff --git a/Web/Services/PiscalService.cs b/Web/Services/PiscalQueue/PiscalService.cs similarity index 96% rename from Web/Services/PiscalService.cs rename to Web/Services/PiscalQueue/PiscalService.cs index 8b6d74b..ef77720 100644 --- a/Web/Services/PiscalService.cs +++ b/Web/Services/PiscalQueue/PiscalService.cs @@ -3,7 +3,7 @@ using System.Configuration; using LeafWeb.Core.Entities; using LeafWeb.Core.Remote; -namespace LeafWeb.Web.Services +namespace LeafWeb.Web.Services.PiscalQueue { /// /// Thin layer over PiscalClient to translate Core entities to Piscal objects diff --git a/Web/Services/StartPending.cs b/Web/Services/PiscalQueue/StartPending.cs similarity index 88% rename from Web/Services/StartPending.cs rename to Web/Services/PiscalQueue/StartPending.cs index 9e98f97..4cc4db0 100644 --- a/Web/Services/StartPending.cs +++ b/Web/Services/PiscalQueue/StartPending.cs @@ -1,6 +1,6 @@ using LeafWeb.Core.Entities; -namespace LeafWeb.Web.Services +namespace LeafWeb.Web.Services.PiscalQueue { public class StartPending : PiscalQueueWorker { diff --git a/Web/Web.csproj b/Web/Web.csproj index 5108094..f0000fd 100644 --- a/Web/Web.csproj +++ b/Web/Web.csproj @@ -960,7 +960,7 @@ - + @@ -973,13 +973,13 @@ - - - - + + + + - - + +