ReSharper on CommonCore project

This commit is contained in:
Thomas Wiedebusch
2022-08-24 11:42:44 +02:00
parent a16ce66dbe
commit fbfb914268
7 changed files with 53 additions and 58 deletions
+1 -1
View File
@@ -155,7 +155,7 @@
</site> </site>
<site name="MeterProcessState" id="2"> <site name="MeterProcessState" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool"> <application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\drabesch_ro\Repo\lab\la_operations\laa_production\Common\Service\MeterProcessState" /> <virtualDirectory path="/" physicalPath="D:\Projekte\SENSUS_GitLab\laa_production\Common\Service\MeterProcessState" />
</application> </application>
<bindings> <bindings>
<binding protocol="http" bindingInformation="*:56011:localhost" /> <binding protocol="http" bindingInformation="*:56011:localhost" />
@@ -1,39 +1,38 @@
using System; using System;
using System.Collections.Generic;
using System.Text; using System.Text;
namespace Xylem.Common.CommonCore.Exceptions.Db namespace Xylem.Common.CommonCore.Exceptions.Db
{ {
public class NoKeyStoredException : Exception, ICommonException public class NoKeyStoredException : Exception, ICommonException
{ {
Guid? LCode = null; Guid? _lCode;
public NoKeyStoredException(Guid? Location = null) 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) : 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) : base(message, inner)
{ {
LCode = Location; _lCode = location;
} }
public string GetHelpText() public String GetHelpText()
{ {
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.AppendLine($"Report this to a developer or database admin."); sb.AppendLine("Report this to a developer or database admin.");
sb.AppendLine($"Something went wrong while store the keyset on BSI."); 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(); return sb.ToString();
} }
@@ -1,39 +1,38 @@
using System; using System;
using System.Collections.Generic;
using System.Text; using System.Text;
namespace Xylem.Common.CommonCore.Exceptions.Db namespace Xylem.Common.CommonCore.Exceptions.Db
{ {
public class PcbIdNotException : Exception, ICommonException public class PcbIdNotException : Exception, ICommonException
{ {
Guid? LCode = null; Guid? _lCode;
public PcbIdNotException(Guid? Location = null) 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) : 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) : base(message, inner)
{ {
LCode = Location; _lCode = location;
} }
public string GetHelpText() public String GetHelpText()
{ {
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.AppendLine($"1. Retry your request."); sb.AppendLine("1. Retry your request.");
sb.AppendLine($"2. Check if you Pcb was produced by LAA Operations."); sb.AppendLine("2. Check if your 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("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(); return sb.ToString();
} }
@@ -1,12 +1,10 @@
using System; using System;
using System.Collections.Generic;
using System.Text;
namespace Xylem.Common.CommonCore.Exceptions namespace Xylem.Common.CommonCore.Exceptions
{ {
interface ICommonException interface ICommonException
{ {
string GetHelpText(); String GetHelpText();
} }
} }
@@ -1,37 +1,36 @@
using System; using System;
using System.Collections.Generic;
using System.Text; using System.Text;
namespace Xylem.Common.CommonCore.Exceptions.WaterMeter namespace Xylem.Common.CommonCore.Exceptions.WaterMeter
{ {
public class LvlNotSupportedException : Exception, ICommonException public class LvlNotSupportedException : Exception, ICommonException
{ {
Guid? LCode = null; Guid? _lCode;
public LvlNotSupportedException(Guid? Location = null) 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) : 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) : base(message, inner)
{ {
LCode = Location; _lCode = location;
} }
public string GetHelpText() public String GetHelpText()
{ {
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.AppendLine($"You can not login at this lvl if the meter is locked."); 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."); sb.AppendLine("Try to use an other level or unlock the meter.");
if (LCode.HasValue) if (_lCode.HasValue)
{ {
sb.AppendLine($"LCode:{LCode.Value}"); sb.AppendLine($"LCode:{_lCode.Value}");
} }
return sb.ToString(); return sb.ToString();
} }
@@ -1,38 +1,37 @@
using System; using System;
using System.Collections.Generic;
using System.Text; using System.Text;
namespace Xylem.Common.CommonCore.Exceptions namespace Xylem.Common.CommonCore.Exceptions.Web
{ {
public class TokenRequiredException : Exception, ICommonException public class TokenRequiredException : Exception, ICommonException
{ {
Guid? LCode = null; Guid? _lCode;
public TokenRequiredException(Guid? Location = null) 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) : 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) : base(message, inner)
{ {
LCode = Location; _lCode = location;
} }
public string GetHelpText() public String GetHelpText()
{ {
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.AppendLine($"Token is required for locked meter."); sb.AppendLine("Token is required for locked meter.");
sb.AppendLine($"Add token too your local key store."); 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(); return sb.ToString();
} }
@@ -16,6 +16,7 @@ using Xylem.Common.CommonCore.Configuration;
using Xylem.Common.CommonCore.Exceptions; using Xylem.Common.CommonCore.Exceptions;
using Xylem.Common.CommonCore.Exceptions.Db; using Xylem.Common.CommonCore.Exceptions.Db;
using Xylem.Common.CommonCore.Exceptions.WaterMeter; 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.GenesisCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile; using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
using Xylem.Common.Logic.SoftwareAccessHelper; using Xylem.Common.Logic.SoftwareAccessHelper;