12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.IO;
- using Vinno.vCloud.Protocol.Infrastructures;
- namespace vCloud.Server
- {
- public static class ServerModeInfo
- {
- public static ServerMode ServerMode {get;set;}
- public static bool IsPersonalFlyinsonoServer => ServerMode== ServerMode.PersonalFlyinsonoServer;
- public static bool IsCloudFlyinsonoServer=> ServerMode == ServerMode.FlyinsonoServer;
- public static bool HasAgentManagement { get; set; }
- public static string StorageAddress { get; set; }
- public static StorageType StorageType { get; internal set; }
- public static void WriteLicenseInfo(string licenseInfo) {
- if (IsPersonalFlyinsonoServer)
- {
- var licenseInfoFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"LicenseStatus.txt");
- File.WriteAllText(licenseInfoFilePath, licenseInfo);
- }
- }
- }
- public enum ServerMode {
- FlyinsonoServer,
- PersonalFlyinsonoServer
- }
- }
|