65 lines
2.3 KiB
C#
65 lines
2.3 KiB
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace OI.Metrology.Viewer.Models;
|
|
|
|
public class AppSettings
|
|
{
|
|
|
|
public string ApiLoggingContentTypes { init; get; }
|
|
public string ApiLoggingPathPrefixes { init; get; }
|
|
public string ApiLogPath { init; get; }
|
|
public string AttachmentPath { init; get; }
|
|
public string BuildNumber { init; get; }
|
|
public string Company { init; get; }
|
|
public string ConnectionString { init; get; }
|
|
public string GitCommitSeven { init; get; }
|
|
public string InboundApiAllowedIPList { init; get; }
|
|
public string MonAResource { init; get; }
|
|
public string MonASite { init; get; }
|
|
public string Oi2SqlConnectionString { init; get; }
|
|
public string OIExportPath { init; get; }
|
|
public string URLs { init; get; }
|
|
public string WorkingDirectoryName { init; get; }
|
|
|
|
[JsonConstructor]
|
|
public AppSettings(string apiLoggingContentTypes,
|
|
string apiLoggingPathPrefixes,
|
|
string apiLogPath,
|
|
string attachmentPath,
|
|
string buildNumber,
|
|
string company,
|
|
string connectionString,
|
|
string gitCommitSeven,
|
|
string inboundApiAllowedIPList,
|
|
string monAResource,
|
|
string monASite,
|
|
string oi2SqlConnectionString,
|
|
string oiExportPath,
|
|
string urls,
|
|
string workingDirectoryName)
|
|
{
|
|
ApiLoggingContentTypes = apiLoggingContentTypes;
|
|
ApiLoggingPathPrefixes = apiLoggingPathPrefixes;
|
|
ApiLogPath = apiLogPath;
|
|
AttachmentPath = attachmentPath;
|
|
BuildNumber = buildNumber;
|
|
Company = company;
|
|
ConnectionString = connectionString;
|
|
GitCommitSeven = gitCommitSeven;
|
|
InboundApiAllowedIPList = inboundApiAllowedIPList;
|
|
MonAResource = monAResource;
|
|
MonASite = monASite;
|
|
Oi2SqlConnectionString = oi2SqlConnectionString;
|
|
OIExportPath = oiExportPath;
|
|
URLs = urls;
|
|
WorkingDirectoryName = workingDirectoryName;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
|
return result;
|
|
}
|
|
|
|
} |