diff --git a/Common/.vs/config/applicationhost.config b/Common/.vs/config/applicationhost.config index 40cde372..1b9332b4 100644 --- a/Common/.vs/config/applicationhost.config +++ b/Common/.vs/config/applicationhost.config @@ -155,7 +155,7 @@ - + diff --git a/Common/CommonCore/Exceptions/DB/NoKeyException.cs b/Common/CommonCore/Exceptions/DB/NoKeyException.cs index aa120a11..43b40c39 100644 --- a/Common/CommonCore/Exceptions/DB/NoKeyException.cs +++ b/Common/CommonCore/Exceptions/DB/NoKeyException.cs @@ -1,39 +1,38 @@ using System; -using System.Collections.Generic; using System.Text; namespace Xylem.Common.CommonCore.Exceptions.Db { public class NoKeyStoredException : Exception, ICommonException { - Guid? LCode = null; - public NoKeyStoredException(Guid? Location = null) + Guid? _lCode; + public NoKeyStoredException(Guid? location = null) { - LCode = Location; + _lCode = location; } - public NoKeyStoredException(string message, Guid? Location = null) + public NoKeyStoredException(String message, Guid? location = null) : base(message) { - LCode = Location; + _lCode = location; } - public NoKeyStoredException(string message, Exception inner, Guid? Location = null) + public NoKeyStoredException(String message, Exception inner, Guid? location = null) : base(message, inner) { - LCode = Location; + _lCode = location; } - public string GetHelpText() + public String GetHelpText() { var sb = new StringBuilder(); - sb.AppendLine($"Report this to a developer or database admin."); - sb.AppendLine($"Something went wrong while store the keyset on BSI."); + sb.AppendLine("Report this to a developer or database admin."); + sb.AppendLine("Something went wrong while store the keyset on BSI."); - if (LCode.HasValue) + if (_lCode.HasValue) { - sb.AppendLine($"LCode:{LCode.Value}"); + sb.AppendLine($"LCode:{_lCode.Value}"); } return sb.ToString(); } diff --git a/Common/CommonCore/Exceptions/DB/PcbIdNotException.cs b/Common/CommonCore/Exceptions/DB/PcbIdNotException.cs index 7ca1e3e8..87edfeee 100644 --- a/Common/CommonCore/Exceptions/DB/PcbIdNotException.cs +++ b/Common/CommonCore/Exceptions/DB/PcbIdNotException.cs @@ -1,39 +1,38 @@ using System; -using System.Collections.Generic; using System.Text; namespace Xylem.Common.CommonCore.Exceptions.Db { public class PcbIdNotException : Exception, ICommonException { - Guid? LCode = null; - public PcbIdNotException(Guid? Location = null) + Guid? _lCode; + public PcbIdNotException(Guid? location = null) { - LCode = Location; + _lCode = location; } - public PcbIdNotException(string message, Guid? Location = null) + public PcbIdNotException(String message, Guid? location = null) : base(message) { - LCode = Location; + _lCode = location; } - public PcbIdNotException(string message, Exception inner, Guid? Location = null) + public PcbIdNotException(String message, Exception inner, Guid? location = null) : base(message, inner) { - LCode = Location; + _lCode = location; } - public string GetHelpText() + public String GetHelpText() { var sb = new StringBuilder(); - sb.AppendLine($"1. Retry your request."); - sb.AppendLine($"2. Check if you Pcb was produced by LAA Operations."); - sb.AppendLine($"3. Ask the source of you pcb for the password and the pcbid and let it regiuster at LAA Operations."); + sb.AppendLine("1. Retry your request."); + sb.AppendLine("2. Check if your pcb was produced by LAA Operations."); + sb.AppendLine("3. Ask the source of your pcb for the password and the pcbid and let it regiuser at LAA Operations."); - if (LCode.HasValue) + if (_lCode.HasValue) { - sb.AppendLine($"LCode:{LCode.Value}"); + sb.AppendLine($"LCode:{_lCode.Value}"); } return sb.ToString(); } diff --git a/Common/CommonCore/Exceptions/ICommonException.cs b/Common/CommonCore/Exceptions/ICommonException.cs index 90b7a7c5..6b33333f 100644 --- a/Common/CommonCore/Exceptions/ICommonException.cs +++ b/Common/CommonCore/Exceptions/ICommonException.cs @@ -1,12 +1,10 @@ using System; -using System.Collections.Generic; -using System.Text; namespace Xylem.Common.CommonCore.Exceptions { interface ICommonException { - string GetHelpText(); + String GetHelpText(); } } diff --git a/Common/CommonCore/Exceptions/WaterMeter/LvlNotSupportedException.cs b/Common/CommonCore/Exceptions/WaterMeter/LvlNotSupportedException.cs index fa94a9b7..ad205678 100644 --- a/Common/CommonCore/Exceptions/WaterMeter/LvlNotSupportedException.cs +++ b/Common/CommonCore/Exceptions/WaterMeter/LvlNotSupportedException.cs @@ -1,37 +1,36 @@ using System; -using System.Collections.Generic; using System.Text; namespace Xylem.Common.CommonCore.Exceptions.WaterMeter { public class LvlNotSupportedException : Exception, ICommonException { - Guid? LCode = null; - public LvlNotSupportedException(Guid? Location = null) + Guid? _lCode; + public LvlNotSupportedException(Guid? location = null) { - LCode = Location; + _lCode = location; } - public LvlNotSupportedException(string message, Guid? Location = null) + public LvlNotSupportedException(String message, Guid? location = null) : base(message) { - LCode = Location; + _lCode = location; } - public LvlNotSupportedException(string message, Exception inner, Guid? Location = null) + public LvlNotSupportedException(String message, Exception inner, Guid? location = null) : base(message, inner) { - LCode = Location; + _lCode = location; } - public string GetHelpText() + public String GetHelpText() { var sb = new StringBuilder(); - sb.AppendLine($"You can not login at this lvl if the meter is locked."); - sb.AppendLine($"Try to use an other level or unlock the meter."); - if (LCode.HasValue) + sb.AppendLine("You can not login at this lvl if the meter is locked."); + sb.AppendLine("Try to use an other level or unlock the meter."); + if (_lCode.HasValue) { - sb.AppendLine($"LCode:{LCode.Value}"); + sb.AppendLine($"LCode:{_lCode.Value}"); } return sb.ToString(); } diff --git a/Common/CommonCore/Exceptions/Web/TokenRequiredException.cs b/Common/CommonCore/Exceptions/Web/TokenRequiredException.cs index b79a1c34..2b647312 100644 --- a/Common/CommonCore/Exceptions/Web/TokenRequiredException.cs +++ b/Common/CommonCore/Exceptions/Web/TokenRequiredException.cs @@ -1,38 +1,37 @@ using System; -using System.Collections.Generic; using System.Text; -namespace Xylem.Common.CommonCore.Exceptions +namespace Xylem.Common.CommonCore.Exceptions.Web { public class TokenRequiredException : Exception, ICommonException { - Guid? LCode = null; - public TokenRequiredException(Guid? Location = null) + Guid? _lCode; + public TokenRequiredException(Guid? location = null) { - LCode = Location; + _lCode = location; } - public TokenRequiredException(string message, Guid? Location = null) + public TokenRequiredException(String message, Guid? location = null) : base(message) { - LCode = Location; + _lCode = location; } - public TokenRequiredException(string message, Exception inner, Guid? Location = null) + public TokenRequiredException(String message, Exception inner, Guid? location = null) : base(message, inner) { - LCode = Location; + _lCode = location; } - public string GetHelpText() + public String GetHelpText() { var sb = new StringBuilder(); - sb.AppendLine($"Token is required for locked meter."); - sb.AppendLine($"Add token too your local key store."); + sb.AppendLine("Token is required for locked meter."); + sb.AppendLine("Add token too your local key store."); - if (LCode.HasValue) + if (_lCode.HasValue) { - sb.AppendLine($"LCode:{LCode.Value}"); + sb.AppendLine($"LCode:{_lCode.Value}"); } return sb.ToString(); } diff --git a/Common/Service/MeterProcessState/Controllers/PasswordController.cs b/Common/Service/MeterProcessState/Controllers/PasswordController.cs index 0d0a69ed..97ae655b 100644 --- a/Common/Service/MeterProcessState/Controllers/PasswordController.cs +++ b/Common/Service/MeterProcessState/Controllers/PasswordController.cs @@ -16,6 +16,7 @@ using Xylem.Common.CommonCore.Configuration; using Xylem.Common.CommonCore.Exceptions; using Xylem.Common.CommonCore.Exceptions.Db; using Xylem.Common.CommonCore.Exceptions.WaterMeter; +using Xylem.Common.CommonCore.Exceptions.Web; using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore; using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile; using Xylem.Common.Logic.SoftwareAccessHelper;