Files
shd-desktop-app/Windows/SHD.Windows/ShdEnvironment.cs
T
bulava92 29a8b935fb
Windows desktop build / publish (push) Canceled after 0s
Add Windows desktop app
2026-10-28 16:04:52 +03:00

33 lines
956 B
C#

namespace SHD.Windows;
internal enum ShdEnvironment
{
Production,
Dev
}
internal static class ShdEnvironmentExtensions
{
public static string BaseUrl(this ShdEnvironment environment) => environment switch
{
ShdEnvironment.Dev => "https://dev-shd.xyz.su",
_ => "https://shd.xyz.su"
};
public static string DisplayName(this ShdEnvironment environment) => environment switch
{
ShdEnvironment.Dev => "SHD Dev",
_ => "SHD Production"
};
public static bool IsDevelopmentHost(string host) =>
host.Equals("dev-shd.xyz.su", StringComparison.OrdinalIgnoreCase);
public static bool IsProductionHost(string host) =>
host.Equals("shd.xyz.su", StringComparison.OrdinalIgnoreCase);
public static bool IsInternalHost(string host) =>
host.Equals("xyz.su", StringComparison.OrdinalIgnoreCase) ||
host.EndsWith(".xyz.su", StringComparison.OrdinalIgnoreCase);
}