コード例 #1
0
ファイル: GatewayConnector.cs プロジェクト: wenfeifei/JMS
 public GatewayConnector(MicroServiceHost microServiceHost,
                         ICpuInfo cpuInfo,
                         SSLConfiguration sSLConfiguration,
                         ILogger <GatewayConnector> logger, IKeyLocker keyLocker)
 {
     _microServiceHost = microServiceHost;
     _logger           = logger;
     _keyLocker        = keyLocker;
     _cpuInfo          = cpuInfo;
     _SSLConfiguration = sSLConfiguration;
 }
コード例 #2
0
        static SystemInfo()
        {
            switch (Platform)
            {
            case Platform.Windows:
                MemoryInfo = new MemoryInfoWindows();
                CpuInfo    = new CpuInfoWindows();
                break;

            case Platform.Linux:
                MemoryInfo = new MemoryInfoLinux();
                CpuInfo    = new CpuInfoLinux();
                break;

            default:
                throw new PlatformNotSupportedException("SystemInfo");
            }
        }