Normalize II
This commit is contained in:
@ -5,6 +5,7 @@ namespace Normalize.ClientHub.Models;
|
||||
public record AppSettings(string ApiUrl,
|
||||
string BuildNumber,
|
||||
string Company,
|
||||
int ExpectedMileage,
|
||||
string GitCommitSeven,
|
||||
bool IsDevelopment,
|
||||
bool IsStaging,
|
||||
|
||||
@ -11,6 +11,7 @@ public class AppSettings
|
||||
[Display(Name = "Api Url"), Required] public string ApiUrl { get; set; }
|
||||
[Display(Name = "Build Number"), Required] public string BuildNumber { get; set; }
|
||||
[Display(Name = "Company"), Required] public string Company { get; set; }
|
||||
[Display(Name = "Expected Mileage"), Required] public int? ExpectedMileage { get; set; }
|
||||
[Display(Name = "Git Commit Seven"), Required] public string GitCommitSeven { get; set; }
|
||||
[Display(Name = "Is Development"), Required] public bool? IsDevelopment { get; set; }
|
||||
[Display(Name = "Is Staging"), Required] public bool? IsStaging { get; set; }
|
||||
@ -36,6 +37,8 @@ public class AppSettings
|
||||
throw new NullReferenceException(nameof(BuildNumber));
|
||||
if (appSettings.Company is null)
|
||||
throw new NullReferenceException(nameof(Company));
|
||||
if (appSettings.ExpectedMileage is null)
|
||||
throw new NullReferenceException(nameof(ExpectedMileage));
|
||||
if (appSettings.GitCommitSeven is null)
|
||||
throw new NullReferenceException(nameof(GitCommitSeven));
|
||||
if (appSettings.IsDevelopment is null)
|
||||
@ -50,6 +53,7 @@ public class AppSettings
|
||||
appSettings.ApiUrl,
|
||||
appSettings.BuildNumber,
|
||||
appSettings.Company,
|
||||
appSettings.ExpectedMileage.Value,
|
||||
appSettings.GitCommitSeven,
|
||||
appSettings.IsDevelopment.Value,
|
||||
appSettings.IsStaging.Value,
|
||||
|
||||
Reference in New Issue
Block a user