IsOSX( EPlatform platform) { var isOSX = (EPlatform.OSX32 == platform || EPlatform.OSX64 == platform); return(isOSX); }
IsLinux( EPlatform platform) { var isLinux = (EPlatform.Linux32 == platform || EPlatform.Linux64 == platform); return(isLinux); }
Is64Bit( EPlatform platform) { var is64Bit = (EPlatform.Win64 == platform || EPlatform.Linux64 == platform || EPlatform.OSX64 == platform); return(is64Bit); }
public static bool Init(EPlatform ePlatform, bool isUseNetModule, ILPNetMessageHandler netMessageHandler) { bool bResult = false; bResult = _InitConfig(ePlatform); if (LPError.PTF_ERROR(bResult)) { goto Exit0; } bResult = _InitLogger(); if (LPError.PTF_ERROR(bResult)) { goto Exit0; } if (isUseNetModule) { bResult = _InitNet(netMessageHandler); if (LPError.LOG_ERROR(bResult)) { goto Exit0; } } return(true); Exit0: return(false); }
IsCurrentPlatformSupported( EPlatform supportedPlatforms) { var isSupported = (CurrentPlatform == (supportedPlatforms & CurrentPlatform)); return(isSupported); }
public ComponentPrice(Guid id, decimal price, string url, EPlatform platform) { Id = id; Price = price; Url = url; Platform = platform; }
ToString( EPlatform platformFlags) { var value = ToString(platformFlags, '\0', null, false); return(value); }
IsWindows( EPlatform platform) { var isWindows = (EPlatform.Win32 == platform || EPlatform.Win64 == platform); return(isWindows); }
ToString( EPlatform platformFlags, char separator) { var value = ToString(platformFlags, separator, null, false); return(value); }
Contains( EPlatform flags, EPlatform specificPlatform) { var contains = (specificPlatform == (flags & specificPlatform)); return(contains); }
public ComponentPrice(decimal price, string url, EPlatform platform, ComponentBase component) : base() { Url = url; Price = price; Platform = platform; Component = component; }
public static string ToStringValue(this EPlatform platform) { return(platform switch { EPlatform.Uplay => ApiCommon.UplayString, EPlatform.Xbox => ApiCommon.XboxString, EPlatform.Playstation => ApiCommon.PlaystationString, _ => throw new ArgumentOutOfRangeException(nameof(platform), platform, null) });
public void CreateSdkPrefab(EPlatform type) { PlatformType = type; if (type == EPlatform.None) { return; } CreateSdk(GameConfig.SdkPath); }
public static byte[] GetExitMethod(EExitFunc method, EPlatform platform, EArquitecture arq) { switch (platform) { case EPlatform.Windows: { switch (arq) { case EArquitecture.x86: { string function = ""; switch (method) { case EExitFunc.Process: function = "ExitProcess"; break; case EExitFunc.Thread: function = "ExitThread"; break; default: return(null); } /* * ;; eax = GetProcAddress(ebx, "ExitProcess") * push edi * push 01737365h * dec byte ptr [esp + 3h] * push 'corP' * push 'tixE' * push esp * push ebx * call esi */ byte[] shell1 = AsmHelper.StringToAsmX86(function); //0x68,0x50,0x72,0x6f,0x63,0x68,0x45,0x78, 0x69,0x74, /* * ;; ExitProcess(NULL); * push edi * call eax */ byte[] shell2 = new byte[] { 0x54, 0x53, 0xff, 0xd6, 0x57, 0xff, 0xd0 }; return(shell1.Concat(shell2)); } } break; } } return(null); }
public VmLicensingInfo(Guid objectId, DateTime?firstOibCreationTime, DateTime?lastOibCreationTime, EPlatform platform, string hostName, string backupServerName, string vmName) { VmName = vmName; State = ComputeState(firstOibCreationTime, lastOibCreationTime); FirstOibCreationTime = firstOibCreationTime; Platform = platform; ObjectId = objectId; HostName = hostName; BackupServerName = backupServerName; }
public Case( string brand, string model, string platformId, string imageUrl, string url, EPlatform platform) : base(brand, model, platformId, imageUrl, url, platform) { }
public async Task <Player> GetPlayerFullStatsAsync(string username, EPlatform platform) { var player = await GetPlayerAsync(username, platform); var progressionTask = GetProgressionAsync(player.UserId, platform); await Task.WhenAll(progressionTask); player.Progression = progressionTask.Result; return(player); }
public void CreateSdkPrefab(EPlatform type) { //测试 Debugger.Log("CreateSdkPrefab " + type.ToString()); sdkType = type; if (type == EPlatform.ePlatform_None) { return; } CreateSdk(sdkPath); }
public static byte[] GetExitMethod(EExitFunc method, EPlatform platform, EArquitecture arq) { switch (platform) { case EPlatform.Windows: { switch (arq) { case EArquitecture.x86: { string function = ""; switch (method) { case EExitFunc.Process: function = "ExitProcess"; break; case EExitFunc.Thread: function = "ExitThread"; break; default: return null; } /* ;; eax = GetProcAddress(ebx, "ExitProcess") push edi push 01737365h dec byte ptr [esp + 3h] push 'corP' push 'tixE' push esp push ebx call esi */ byte[] shell1 = AsmHelper.StringToAsmX86(function); //0x68,0x50,0x72,0x6f,0x63,0x68,0x45,0x78, 0x69,0x74, /* ;; ExitProcess(NULL); push edi call eax */ byte[] shell2 = new byte[] { 0x54,0x53,0xff,0xd6,0x57,0xff,0xd0 }; return shell1.Concat(shell2); } } break; } } return null; }
private string GetPlatform(EPlatform platform) { string result = "pc"; if (EPlatform.XBL == platform) { result = "xbl"; } else if (EPlatform.PSN == platform) { result = "psn"; } return(result); }
public RegisterStorageCommand( string platformId, string imageUrl, string url, EPlatform platform, string brand, string model) { PlatformId = platformId; ImageUrl = imageUrl; Url = url; Platform = platform; Brand = brand; Model = model; }
/// <summary> /// Constructor /// </summary> /// <param name="name">Name</param> /// <param name="platform">Platform</param> /// <param name="variables">Variables</param> public Target(EPlatform platform, string name, params Variable[] variables) : this() { Name = name; Platform = platform; if (variables == null) return; foreach (Variable v in variables) { if (!_Variables.ContainsKey(v.Name)) _Variables.Add(v.Name, v.Value); else _Variables[v.Name] = v.Value; } }
public void Update( string platformId, string imageUrl, string url, EPlatform platform, string brand, string model) { PlatformId = platformId; ImageUrl = imageUrl; Url = url; Platform = platform; Brand = brand; Model = model; UpdatedAt = DateTime.Now; }
public UpdatePowerSupplyCommand( Guid id, string platformId, string imageUrl, string url, EPlatform platform, string brand, string model) { Id = id; PlatformId = platformId; ImageUrl = imageUrl; Url = url; Platform = platform; Brand = brand; Model = model; }
public ComponentBase( Guid id, string brand, string model, string platformId, string imageUrl, string url, EPlatform platform) : base(id) { Brand = brand; Model = model; PlatformId = platformId; ImageUrl = imageUrl; Url = url; Platform = platform; }
public VmsCounterInfo GetVmsCounters(PerformContext performContext, EPlatform platform, bool useTrialStrategy) { try { var localDbAccessor = new LocalDbAccessor(GetConnectionString()); using (DataTableReader dataReader = localDbAccessor.GetDataTable(GetMapping(useTrialStrategy).GetVmsNumbers, DbAccessor.MakeParam("@platform", (int)platform)).CreateDataReader()) { dataReader.Read(); return(new VmsCounterInfo(dataReader.GetValue <int>("vm_active"), dataReader.GetValue <int>("vm_trial"))); } } catch (Win32Exception ex) { Logger.Error(performContext, ex.Message); Logger.Debug(performContext, ex.Message, ex); return(new VmsCounterInfo(0, 0)); } }
private static bool _InitConfig(EPlatform ePlatform) { switch (ePlatform) { case EPlatform.Pc: { m_sLogDir = "log_pc"; m_sDumpDir = m_sLogDir + "/dump_pc"; m_sConfigDir = "config_pc"; m_sProgramName = LPG.GetExeProcessName() + "_pc"; } break; case EPlatform.Ios: { m_sLogDir = "log_ios"; m_sDumpDir = m_sLogDir + "/dump_ios"; m_sConfigDir = "config_ios"; m_sProgramName = LPG.GetExeProcessName() + "_ios"; } break; case EPlatform.Android: { m_sLogDir = "log_android"; m_sDumpDir = m_sLogDir + "/dump_android"; m_sConfigDir = "config_android"; m_sProgramName = LPG.GetExeProcessName() + "_android"; } break; default: if (LPError.PTF_ERROR(false)) { goto Exit0; } break; } return(true); Exit0: return(false); }
public ComponentBase( string brand, string model, string platformId, string imageUrl, string url, EPlatform platform) : base() { Brand = brand; Model = model; PlatformId = platformId; ImageUrl = imageUrl; Url = url; Platform = platform; Prices = new List <ComponentPrice>(); }
public static EPlatform GetPlatform() { if (hasPlatformValue) { return(platform); } string platformName = IniPlatformName(); if (!string.IsNullOrEmpty(platformName)) { switch (platformName.ToLower()) { case "windows": platform = EPlatform.Windows; break; // Engine\Source\Runtime\Core\Public\Windows\WindowsPlatformProperties.h case "ps4": platform = EPlatform.PS4; break; // Engine\Source\Runtime\Core\Public\PS4\PS4Properties.h case "xboxone": platform = EPlatform.XboxOne; break; // Engine\Source\Runtime\Core\Public\XboxOne\XboxOneProperties.h case "mac": platform = EPlatform.Mac; break; // Engine\Source\Runtime\Core\Public\Mac\MacPlatformProperties.h case "ios": platform = EPlatform.IOS; break; // Engine\Source\Runtime\Core\Public\iOS\IOSPlatformProperties.h case "android": platform = EPlatform.Android; break; // Engine\Source\Runtime\Core\Public\Android\AndroidProperties.h case "uwp": platform = EPlatform.UWP; break; // Engine\Source\Runtime\Core\Public\UWP\UWPProperties.h case "html5": platform = EPlatform.HTML5; break; // Engine\Source\Runtime\Core\Public\HTML5\HTML5PlatformProperties.h case "linux": platform = EPlatform.Linux; break; // Engine\Source\Runtime\Core\Public\Linux\LinuxPlatformProperties.h case "switch": platform = EPlatform.Switch; break; // Engine\Source\Runtime\Core\Public\Switch\SwitchPlatformProperties.h default: platform = EPlatform.Unknown; break; } } hasPlatformValue = true; return(platform); }
public List <VmLicensingInfo> GetAllVmInfos(PerformContext performContext, EPlatform platform) { try { var vmLicensingInfoList = new List <VmLicensingInfo>(); using (DataTableReader dataReader = new LocalDbAccessor(GetConnectionString()).GetDataTable("[dbo].[GetVmLicensing]", DbAccessor.MakeParam("@platform", (int)platform)).CreateDataReader()) { while (dataReader.Read()) { vmLicensingInfoList.Add(FromReader(dataReader)); } } return(vmLicensingInfoList); } catch (Win32Exception ex) { Logger.Error(performContext, ex.Message); Logger.Debug(performContext, "Exception", ex); return(new List <VmLicensingInfo>()); } }
/// <summary> /// Constructor /// </summary> /// <param name="name">Name</param> /// <param name="platform">Platform</param> /// <param name="variables">Variables</param> public Target(EPlatform platform, string name, params Variable[] variables) : this() { Name = name; Platform = platform; if (variables == null) { return; } foreach (Variable v in variables) { if (!_Variables.ContainsKey(v.Name)) { _Variables.Add(v.Name, v.Value); } else { _Variables[v.Name] = v.Value; } } }
public int GetProtectedVmsCount(PerformContext performContext, EPlatform platform) { try { var localDbAccessor = new LocalDbAccessor(GetConnectionString()); using (DataTableReader dataReader = localDbAccessor.GetDataTable("GetProtectedVmsCount", DbAccessor.MakeParam("@platform", (int)platform)).CreateDataReader()) { if (dataReader.Read()) { return((int)dataReader["protected_vms_count"]); } } } catch (Win32Exception ex) { Logger.Error(performContext, ex.Message); Logger.Debug(performContext, ex.Message, ex); return(0); } return(0); }
/// <summary> /// Initializes a new attribute. /// </summary> /// <param name="platform">The platform(s) for which the module can be built.</param> public PlatformFilterAttribute( EPlatform platform) { this.Platform = platform; }
IsCurrentPlatformSupported( EPlatform supportedPlatforms) { var isSupported = (CurrentPlatform == (supportedPlatforms & CurrentPlatform)); return isSupported; }
Is64Bit( EPlatform platform) { var is64Bit = (EPlatform.Win64 == platform || EPlatform.Linux64 == platform || EPlatform.OSX64 == platform); return is64Bit; }
IsWindows( EPlatform platform) { var isWindows = (EPlatform.Win32 == platform || EPlatform.Win64 == platform); return isWindows; }
Includes( this EPlatform platform, EPlatform choice) { return (0 != (platform & choice)); }
ToString( EPlatform platformFlags, char separator, string prefix, bool toUpper) { string platformString = null; // check windows and sub-derivatives if (Contains(platformFlags, EPlatform.Windows)) { AddPlatformName(ref platformString, "Windows", separator, prefix, toUpper); } else { if (Contains(platformFlags, EPlatform.Win32)) { AddPlatformName(ref platformString, "Win32", separator, prefix, toUpper); } else if (Contains(platformFlags, EPlatform.Win64)) { AddPlatformName(ref platformString, "Win64", separator, prefix, toUpper); } } // check linux and sub-derivatives if (Contains(platformFlags, EPlatform.Linux)) { AddPlatformName(ref platformString, "Linux", separator, prefix, toUpper); } else { if (Contains(platformFlags, EPlatform.Linux32)) { AddPlatformName(ref platformString, "Linux32", separator, prefix, toUpper); } else if (Contains(platformFlags, EPlatform.Linux64)) { AddPlatformName(ref platformString, "Linux64", separator, prefix, toUpper); } } // check OSX and sub-derivatives if (Contains(platformFlags, EPlatform.OSX)) { AddPlatformName(ref platformString, "OSX", separator, prefix, toUpper); } else { if (Contains(platformFlags, EPlatform.OSX32)) { AddPlatformName(ref platformString, "OSX32", separator, prefix, toUpper); } else if (Contains(platformFlags, EPlatform.OSX64)) { AddPlatformName(ref platformString, "OSX64", separator, prefix, toUpper); } } return platformString; }
Contains( EPlatform flags, EPlatform specificPlatform) { var contains = (specificPlatform == (flags & specificPlatform)); return contains; }
ToString( EPlatform platformFlags) { var value = ToString(platformFlags, '\0', null, false); return value; }
Includes( EPlatform other) { return (other == (this.Platform & other)); }
IsOSX( EPlatform platform) { var isOSX = (EPlatform.OSX32 == platform || EPlatform.OSX64 == platform); return isOSX; }
ToString( EPlatform platformFlags, char separator) { var value = ToString(platformFlags, separator, null, false); return value; }
IsLinux( EPlatform platform) { var isLinux = (EPlatform.Linux32 == platform || EPlatform.Linux64 == platform); return isLinux; }