ReSharper: -CLR types introduced on GTB

This commit is contained in:
Thomas Wiedebusch
2022-10-19 12:58:08 +02:00
parent 561b46a580
commit b4d5330d1d
120 changed files with 1908 additions and 1897 deletions
@@ -27,7 +27,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
}
[Route("SetPassword"), HttpGet]
public async Task<HttpResponseMessage> SetPassword(String PcbId, String password, bool keepOldPw = false)
public async Task<HttpResponseMessage> SetPassword(String PcbId, String password, Boolean keepOldPw = false)
{
try
{
@@ -73,7 +73,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
foreach (var item in dt.Select())
{
returnPw = item["password"].ToString();
if (!(bool)item["isLocked"])
if (!(Boolean)item["isLocked"])
{
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() => { return returnPw; }));
}
@@ -118,15 +118,15 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
{
public Int64? orderNumber = null;
public Int64? radioAdress = null;
public string Skeleton = "";
public List<byte[]> listOfHashes = new List<byte[]>();
public List<byte[]> listOfPasswords = new List<byte[]>();
public String Skeleton = "";
public List<Byte[]> listOfHashes = new List<Byte[]>();
public List<Byte[]> listOfPasswords = new List<Byte[]>();
public string KeySetId { get; internal set; }
public String KeySetId { get; internal set; }
}
private MeterPw getKeys(string Token, string orderNumber, string radioAdress)
private MeterPw getKeys(String Token, String orderNumber, String radioAdress)
{
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) =>
@@ -177,7 +177,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
{
try
{
var listOfHashes = new List<byte[]>();
var listOfHashes = new List<Byte[]>();
var sbOutPut = new StringBuilder();
var sbQuery = new StringBuilder();
@@ -221,10 +221,10 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
{
result.orderNumber = (Int32)item["FertigungsauftragNr"];
result.radioAdress = (Int64)item["Adresse"];
result.Skeleton = (string)item["Skeleton"];
result.Skeleton = (String)item["Skeleton"];
if (item["KeySetId"].GetType() != typeof(System.DBNull))
{
result.KeySetId = (string)item["KeySetId"];
result.KeySetId = (String)item["KeySetId"];
}
@@ -315,7 +315,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
}
}
private string MapKeySet(string KeySetID, Int64 orderNumber, Int64 radioAdress)
private String MapKeySet(String KeySetID, Int64 orderNumber, Int64 radioAdress)
{
@@ -333,9 +333,9 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
string postData = $"[{{\"setId\":\"{KeySetID}\", \"orderNumber\":\"{orderNumber}\", \"radioAdress\":\"{radioAdress}\"}}]";
String postData = $"[{{\"setId\":\"{KeySetID}\", \"orderNumber\":\"{orderNumber}\", \"radioAdress\":\"{radioAdress}\"}}]";
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] byte1 = encoding.GetBytes(postData);
Byte[] byte1 = encoding.GetBytes(postData);
// Set the content type of the data being posted.
http.ContentType = "application/json; charset=utf-8";
@@ -369,7 +369,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
}
private string CreateKeySet(int CountKeys)
private String CreateKeySet(Int32 CountKeys)
{
@@ -387,9 +387,9 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
string postData = $"{{\"setCount\": 1,\"keysPerSet\": {CountKeys} }}";
String postData = $"{{\"setCount\": 1,\"keysPerSet\": {CountKeys} }}";
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] byte1 = encoding.GetBytes(postData);
Byte[] byte1 = encoding.GetBytes(postData);
// Set the content type of the data being posted.
http.ContentType = "application/json; charset=utf-8";
@@ -437,17 +437,17 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
public partial class Key
{
[JsonProperty("Index")]
public long Index { get; set; }
public Int64 Index { get; set; }
[JsonProperty("Key")]
public string KeyKey { get; set; }
public String KeyKey { get; set; }
}
public partial class MeterPw
{
public static MeterPw Empty() => new MeterPw() { SetId = Guid.Empty, Keys = new List<Key>() };
public static MeterPw FromJson(string json) => JsonConvert.DeserializeObject<MeterPw>(json, Converter.Settings);
public static MeterPw[] ArrayFromJson(string json) => JsonConvert.DeserializeObject<MeterPw[]>(json, Converter.Settings);
public static MeterPw FromJson(String json) => JsonConvert.DeserializeObject<MeterPw>(json, Converter.Settings);
public static MeterPw[] ArrayFromJson(String json) => JsonConvert.DeserializeObject<MeterPw[]>(json, Converter.Settings);
}