Added View, Recipe Paramaters and Export
This commit is contained in:
@ -2,7 +2,8 @@ using System.Text.Json;
|
||||
|
||||
namespace OI.Metrology.Server.Models;
|
||||
|
||||
public record AppSettings(string ApiLoggingContentTypes,
|
||||
public record AppSettings(string ApiExportPath,
|
||||
string ApiLoggingContentTypes,
|
||||
string ApiLoggingPathPrefixes,
|
||||
string ApiLogPath,
|
||||
string ApiUrl,
|
||||
|
@ -8,6 +8,7 @@ public class AppSettings
|
||||
|
||||
#nullable disable
|
||||
|
||||
[Display(Name = "Api Export Path"), Required] public string ApiExportPath { get; set; }
|
||||
[Display(Name = "Api Logging Content Types"), Required] public string ApiLoggingContentTypes { get; set; }
|
||||
[Display(Name = "Api Logging Path Prefixes"), Required] public string ApiLoggingPathPrefixes { get; set; }
|
||||
[Display(Name = "Api Log Path"), Required] public string ApiLogPath { get; set; }
|
||||
@ -41,6 +42,8 @@ public class AppSettings
|
||||
Models.AppSettings result;
|
||||
if (appSettings is null)
|
||||
throw new NullReferenceException(nameof(appSettings));
|
||||
if (appSettings.ApiExportPath is null)
|
||||
throw new NullReferenceException(nameof(ApiExportPath));
|
||||
if (appSettings.ApiLoggingContentTypes is null)
|
||||
throw new NullReferenceException(nameof(ApiLoggingContentTypes));
|
||||
if (appSettings.ApiLoggingPathPrefixes is null)
|
||||
@ -80,6 +83,7 @@ public class AppSettings
|
||||
if (appSettings.WorkingDirectoryName is null)
|
||||
throw new NullReferenceException(nameof(WorkingDirectoryName));
|
||||
result = new(
|
||||
appSettings.ApiExportPath,
|
||||
appSettings.ApiLoggingContentTypes,
|
||||
appSettings.ApiLoggingPathPrefixes,
|
||||
appSettings.ApiLogPath,
|
||||
|
Reference in New Issue
Block a user