Moved all of the file paths to appsettings file.
This commit is contained in:
@ -18,6 +18,7 @@ public class AppSettings
|
||||
[Display(Name = "Is Staging"), Required] public bool? IsStaging { get; set; }
|
||||
[Display(Name = "MonA Resource"), Required] public string MonAResource { get; set; }
|
||||
[Display(Name = "MonA Site"), Required] public string MonASite { get; set; }
|
||||
[Display(Name = "SLL File Path"), Required] public string SLLFilePath { get; set; }
|
||||
[Display(Name = "Tool State Owner File Path"), Required] public string ToolStateOwnerFilePath { get; set; }
|
||||
|
||||
#nullable enable
|
||||
@ -53,6 +54,8 @@ public class AppSettings
|
||||
throw new NullReferenceException(nameof(MonAResource));
|
||||
if (appSettings.MonASite is null)
|
||||
throw new NullReferenceException(nameof(MonASite));
|
||||
if (appSettings.SLLFilePath is null)
|
||||
throw new NullReferenceException(nameof(SLLFilePath));
|
||||
if (appSettings.ToolStateOwnerFilePath is null)
|
||||
throw new NullReferenceException(nameof(ToolStateOwnerFilePath));
|
||||
result = new(
|
||||
@ -66,6 +69,7 @@ public class AppSettings
|
||||
appSettings.IsStaging.Value,
|
||||
appSettings.MonAResource,
|
||||
appSettings.MonASite,
|
||||
appSettings.SLLFilePath,
|
||||
appSettings.ToolStateOwnerFilePath);
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user