PostService

This commit is contained in:
2023-06-23 15:40:59 -07:00
parent 9452454b8a
commit 98c6262a4d
19 changed files with 338 additions and 6 deletions

View File

@ -12,8 +12,10 @@ public class AppSettings
[Display(Name = "Company"), Required] public string Company { get; set; }
[Display(Name = "Last Scan Service Clear After"), Required] public int? ClearLastScanServiceAfter { get; set; }
[Display(Name = "Device Name Ends With"), Required] public string DeviceNameEndsWith { get; set; }
[Display(Name = "Equipment Name"), Required] public string EquipmentName { get; set; }
[Display(Name = "ExpectedScanLengthA"), Required] public int? ExpectedScanLengthA { get; set; }
[Display(Name = "ExpectedScanLengthB"), Required] public int? ExpectedScanLengthB { get; set; }
[Display(Name = "File Share"), Required] public string FileShare { get; set; }
[Display(Name = "Git Commit Seven"), Required] public string GitCommitSeven { get; set; }
[Display(Name = "Linux Device Path"), Required] public string LinuxDevicePath { get; set; }
[Display(Name = "Is Development"), Required] public bool? IsDevelopment { get; set; }
@ -22,6 +24,7 @@ public class AppSettings
[Display(Name = "Mock Root"), Required] public string MockRoot { get; set; }
[Display(Name = "MonA Resource"), Required] public string MonAResource { get; set; }
[Display(Name = "MonA Site"), Required] public string MonASite { get; set; }
[Display(Name = "PostTo"), Required] public string PostTo { get; set; }
[Display(Name = "RootPassword"), Required] public string RootPassword { get; set; }
[Display(Name = "Serial Port Name"), Required] public string SerialPortName { get; set; }
[Display(Name = "URLs"), Required] public string URLs { get; set; }
@ -49,10 +52,14 @@ public class AppSettings
throw new NullReferenceException(nameof(ClearLastScanServiceAfter));
if (appSettings.DeviceNameEndsWith is null)
throw new NullReferenceException(nameof(DeviceNameEndsWith));
if (appSettings.EquipmentName is null)
throw new NullReferenceException(nameof(EquipmentName));
if (appSettings.ExpectedScanLengthA is null)
throw new NullReferenceException(nameof(ExpectedScanLengthA));
if (appSettings.ExpectedScanLengthB is null)
throw new NullReferenceException(nameof(ExpectedScanLengthB));
if (appSettings.FileShare is null)
throw new NullReferenceException(nameof(FileShare));
if (appSettings.GitCommitSeven is null)
throw new NullReferenceException(nameof(GitCommitSeven));
if (appSettings.LinuxDevicePath is null)
@ -69,6 +76,8 @@ public class AppSettings
throw new NullReferenceException(nameof(MonAResource));
if (appSettings.MonASite is null)
throw new NullReferenceException(nameof(MonASite));
if (appSettings.PostTo is null)
throw new NullReferenceException(nameof(PostTo));
if (appSettings.RootPassword is null)
throw new NullReferenceException(nameof(RootPassword));
if (appSettings.SerialPortName is null)
@ -84,8 +93,10 @@ public class AppSettings
appSettings.Company,
appSettings.ClearLastScanServiceAfter.Value,
appSettings.DeviceNameEndsWith,
appSettings.EquipmentName,
appSettings.ExpectedScanLengthA.Value,
appSettings.ExpectedScanLengthB.Value,
appSettings.FileShare,
appSettings.GitCommitSeven,
appSettings.LinuxDevicePath,
appSettings.IsDevelopment.Value,
@ -94,6 +105,7 @@ public class AppSettings
appSettings.MockRoot,
appSettings.MonAResource,
appSettings.MonASite,
appSettings.PostTo,
appSettings.RootPassword,
appSettings.SerialPortName,
appSettings.URLs,