-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
233 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
src/Shared/Engine/Sucrose.Shared.Engine/Helper/System.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
using SSEMM = Sucrose.Shared.Engine.Manage.Manager; | ||
using SSEMI = Sucrose.Shared.Engine.Manage.Internal; | ||
using SGSGSS = Sucrose.Grpc.Services.GeneralServerService; | ||
using SGCSBCS = Sucrose.Grpc.Client.Services.BackgroundogClientService; | ||
using SMR = Sucrose.Memory.Readonly; | ||
using SSSHP = Sucrose.Shared.Space.Helper.Processor; | ||
using Sucrose.Grpc.Common; | ||
|
||
namespace Sucrose.Shared.Engine.Helper | ||
{ | ||
internal static class System | ||
{ | ||
public static string GetSystemCpu() | ||
{ | ||
if (SSSHP.Work(SMR.Backgroundog)) | ||
{ | ||
SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port); | ||
SSEMI.Client = new(SGSGSS.ChannelInstance); | ||
|
||
BackgroundogCpuResponse Response = SGCSBCS.GetCpu(SSEMI.Client); | ||
|
||
return Response.Info; | ||
} | ||
|
||
return string.Empty; | ||
} | ||
|
||
public static string GetSystemDate() | ||
{ | ||
if (SSSHP.Work(SMR.Backgroundog)) | ||
{ | ||
SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port); | ||
SSEMI.Client = new(SGSGSS.ChannelInstance); | ||
|
||
BackgroundogDateResponse Response = SGCSBCS.GetDate(SSEMI.Client); | ||
|
||
return Response.Info; | ||
} | ||
|
||
return string.Empty; | ||
} | ||
|
||
public static string GetSystemMemory() | ||
{ | ||
if (SSSHP.Work(SMR.Backgroundog)) | ||
{ | ||
SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port); | ||
SSEMI.Client = new(SGSGSS.ChannelInstance); | ||
|
||
BackgroundogMemoryResponse Response = SGCSBCS.GetMemory(SSEMI.Client); | ||
|
||
return Response.Info; | ||
} | ||
|
||
return string.Empty; | ||
} | ||
|
||
public static string GetSystemBattery() | ||
{ | ||
if (SSSHP.Work(SMR.Backgroundog)) | ||
{ | ||
SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port); | ||
SSEMI.Client = new(SGSGSS.ChannelInstance); | ||
|
||
BackgroundogBatteryResponse Response = SGCSBCS.GetBattery(SSEMI.Client); | ||
|
||
return Response.Info; | ||
} | ||
|
||
return string.Empty; | ||
} | ||
|
||
public static string GetSystemNetwork() | ||
{ | ||
if (SSSHP.Work(SMR.Backgroundog)) | ||
{ | ||
SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port); | ||
SSEMI.Client = new(SGSGSS.ChannelInstance); | ||
|
||
BackgroundogNetworkResponse Response = SGCSBCS.GetNetwork(SSEMI.Client); | ||
|
||
return Response.Info; | ||
} | ||
|
||
return string.Empty; | ||
} | ||
|
||
public static string GetSystemMotherboard() | ||
{ | ||
if (SSSHP.Work(SMR.Backgroundog)) | ||
{ | ||
SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port); | ||
SSEMI.Client = new(SGSGSS.ChannelInstance); | ||
|
||
BackgroundogMotherboardResponse Response = SGCSBCS.GetMotherboard(SSEMI.Client); | ||
|
||
return Response.Info; | ||
} | ||
|
||
return string.Empty; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.