48 lines
1.8 KiB
C#
48 lines
1.8 KiB
C#
|
using System;
|
|||
|
|
|||
|
namespace Alkami.Ops.Certificates.Data
|
|||
|
{
|
|||
|
internal class ServerInfo
|
|||
|
{
|
|||
|
public readonly string EnvironmentName = null;
|
|||
|
public readonly string EnvironmentType = null;
|
|||
|
public readonly string HostingProvider = null;
|
|||
|
public readonly string ServerType = null;
|
|||
|
public readonly string DatabaseUser = null;
|
|||
|
public readonly string MicroUser = null;
|
|||
|
|
|||
|
public readonly EnvironmentInfo Environment = null;
|
|||
|
|
|||
|
public ServerInfo(ServerInfo existingServer, EnvironmentInfo environment)
|
|||
|
{
|
|||
|
this.EnvironmentName = existingServer.EnvironmentName;
|
|||
|
this.EnvironmentType = existingServer.EnvironmentType;
|
|||
|
this.HostingProvider = existingServer.HostingProvider;
|
|||
|
this.ServerType = existingServer.ServerType;
|
|||
|
this.MicroUser = existingServer.MicroUser;
|
|||
|
this.DatabaseUser = existingServer.DatabaseUser;
|
|||
|
this.Environment = environment;
|
|||
|
}
|
|||
|
|
|||
|
public ServerInfo(string environmentName, string environmentType, string hostingProvider, string serverType, string microUser, string databaseUser, EnvironmentInfo environment)
|
|||
|
{
|
|||
|
this.EnvironmentName = environmentName;
|
|||
|
this.EnvironmentType = environmentType;
|
|||
|
this.HostingProvider = hostingProvider;
|
|||
|
this.ServerType = serverType;
|
|||
|
this.Environment = environment;
|
|||
|
this.MicroUser = microUser;
|
|||
|
this.DatabaseUser = databaseUser;
|
|||
|
}
|
|||
|
|
|||
|
public bool IsApp()
|
|||
|
{
|
|||
|
return string.Equals(this.ServerType, "App", StringComparison.OrdinalIgnoreCase);
|
|||
|
}
|
|||
|
|
|||
|
public bool IsWeb()
|
|||
|
{
|
|||
|
return string.Equals(this.ServerType, "Web", StringComparison.OrdinalIgnoreCase);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|