FISLinux.cs 964 B

123456789101112131415161718192021222324252627282930
  1. using Vinno.vCloud.FIS.CrossPlatform.Common;
  2. using Vinno.vCloud.FIS.CrossPlatform.Common.Enum;
  3. using Vinno.vCloud.FIS.CrossPlatform.Common.Helper;
  4. using Vinno.vCloud.FIS.CrossPlatform.Linux.Hardware;
  5. namespace Vinno.vCloud.FIS.CrossPlatform.Linux
  6. {
  7. public class FISLinux
  8. {
  9. public static string? FISLogPath { get; private set; }
  10. /// <summary>
  11. /// Initilize for windows platform.
  12. /// </summary>
  13. public static void Initialize(string fisLogPath)
  14. {
  15. CrossPlatformHelper.Instance.Platform = EnumPlatform.Linux;
  16. if (string.IsNullOrEmpty(fisLogPath))
  17. {
  18. FISLogPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "FISLogs");
  19. }
  20. else
  21. {
  22. FISLogPath = fisLogPath;
  23. }
  24. DirectoryHelper.CreateDirectory(FISLogPath);
  25. CpuInfo.Initialize();// initialize cpu info
  26. }
  27. }
  28. }