コード例 #1
0
        IsOSX(
            EPlatform platform)
        {
            var isOSX = (EPlatform.OSX32 == platform || EPlatform.OSX64 == platform);

            return(isOSX);
        }
コード例 #2
0
        IsLinux(
            EPlatform platform)
        {
            var isLinux = (EPlatform.Linux32 == platform || EPlatform.Linux64 == platform);

            return(isLinux);
        }
コード例 #3
0
        Is64Bit(
            EPlatform platform)
        {
            var is64Bit = (EPlatform.Win64 == platform || EPlatform.Linux64 == platform || EPlatform.OSX64 == platform);

            return(is64Bit);
        }
コード例 #4
0
ファイル: LP.cs プロジェクト: zeroweek/ProgramGroup
        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);
        }
コード例 #5
0
        IsCurrentPlatformSupported(
            EPlatform supportedPlatforms)
        {
            var isSupported = (CurrentPlatform == (supportedPlatforms & CurrentPlatform));

            return(isSupported);
        }
コード例 #6
0
 public ComponentPrice(Guid id, decimal price, string url, EPlatform platform)
 {
     Id       = id;
     Price    = price;
     Url      = url;
     Platform = platform;
 }
コード例 #7
0
        ToString(
            EPlatform platformFlags)
        {
            var value = ToString(platformFlags, '\0', null, false);

            return(value);
        }
コード例 #8
0
        IsWindows(
            EPlatform platform)
        {
            var isWindows = (EPlatform.Win32 == platform || EPlatform.Win64 == platform);

            return(isWindows);
        }
コード例 #9
0
        ToString(
            EPlatform platformFlags,
            char separator)
        {
            var value = ToString(platformFlags, separator, null, false);

            return(value);
        }
コード例 #10
0
        Contains(
            EPlatform flags,
            EPlatform specificPlatform)
        {
            var contains = (specificPlatform == (flags & specificPlatform));

            return(contains);
        }
コード例 #11
0
 public ComponentPrice(decimal price, string url, EPlatform platform, ComponentBase component)
     : base()
 {
     Url       = url;
     Price     = price;
     Platform  = platform;
     Component = component;
 }
コード例 #12
0
 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)
     });
コード例 #13
0
ファイル: SdkManager.cs プロジェクト: iwiniwin/LastBattle
 public void CreateSdkPrefab(EPlatform type)
 {
     PlatformType = type;
     if (type == EPlatform.None)
     {
         return;
     }
     CreateSdk(GameConfig.SdkPath);
 }
コード例 #14
0
ファイル: AsmHelper.cs プロジェクト: zhuyue1314/Xploit
        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);
        }
コード例 #15
0
 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;
 }
コード例 #16
0
ファイル: Case.cs プロジェクト: eduardosbcabral/HWParts
 public Case(
     string brand,
     string model,
     string platformId,
     string imageUrl,
     string url,
     EPlatform platform)
     : base(brand, model, platformId, imageUrl, url, platform)
 {
 }
コード例 #17
0
        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);
        }
コード例 #18
0
    public void CreateSdkPrefab(EPlatform type)
    {
        //测试
        Debugger.Log("CreateSdkPrefab " + type.ToString());

        sdkType = type;
        if (type == EPlatform.ePlatform_None)
        {
            return;
        }
        CreateSdk(sdkPath);
    }
コード例 #19
0
ファイル: AsmHelper.cs プロジェクト: zhuyue1314/Xploit
        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;
        }
コード例 #20
0
        private string GetPlatform(EPlatform platform)
        {
            string result = "pc";

            if (EPlatform.XBL == platform)
            {
                result = "xbl";
            }
            else if (EPlatform.PSN == platform)
            {
                result = "psn";
            }
            return(result);
        }
コード例 #21
0
 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;
 }
コード例 #22
0
ファイル: Target.cs プロジェクト: 0x0mar/Xploit
        /// <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;
            }
        }
コード例 #23
0
ファイル: Case.cs プロジェクト: eduardosbcabral/HWParts
        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;
        }
コード例 #24
0
 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;
 }
コード例 #25
0
 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;
 }
コード例 #26
0
 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));
     }
 }
コード例 #27
0
ファイル: LP.cs プロジェクト: zeroweek/ProgramGroup
        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);
        }
コード例 #28
0
        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>();
        }
コード例 #29
0
        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);
        }
コード例 #30
0
        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>());
            }
        }
コード例 #31
0
        /// <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;
                }
            }
        }
コード例 #32
0
        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);
        }
コード例 #33
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;
 }
コード例 #34
0
ファイル: OSUtilities.cs プロジェクト: knocte/BuildAMation
 IsCurrentPlatformSupported(
     EPlatform supportedPlatforms)
 {
     var isSupported = (CurrentPlatform == (supportedPlatforms & CurrentPlatform));
     return isSupported;
 }
コード例 #35
0
ファイル: OSUtilities.cs プロジェクト: knocte/BuildAMation
 Is64Bit(
     EPlatform platform)
 {
     var is64Bit = (EPlatform.Win64 == platform || EPlatform.Linux64 == platform || EPlatform.OSX64 == platform);
     return is64Bit;
 }
コード例 #36
0
ファイル: OSUtilities.cs プロジェクト: knocte/BuildAMation
 IsWindows(
     EPlatform platform)
 {
     var isWindows = (EPlatform.Win32 == platform || EPlatform.Win64 == platform);
     return isWindows;
 }
コード例 #37
0
ファイル: Platform.cs プロジェクト: knocte/BuildAMation
 Includes(
     this EPlatform platform,
     EPlatform choice)
 {
     return (0 != (platform & choice));
 }
コード例 #38
0
ファイル: Platform.cs プロジェクト: knocte/BuildAMation
        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;
        }
コード例 #39
0
ファイル: Platform.cs プロジェクト: knocte/BuildAMation
 Contains(
     EPlatform flags,
     EPlatform specificPlatform)
 {
     var contains = (specificPlatform == (flags & specificPlatform));
     return contains;
 }
コード例 #40
0
ファイル: Platform.cs プロジェクト: knocte/BuildAMation
 ToString(
     EPlatform platformFlags)
 {
     var value = ToString(platformFlags, '\0', null, false);
     return value;
 }
コード例 #41
0
 Includes(
     EPlatform other)
 {
     return (other == (this.Platform & other));
 }
コード例 #42
0
ファイル: OSUtilities.cs プロジェクト: knocte/BuildAMation
 IsOSX(
     EPlatform platform)
 {
     var isOSX = (EPlatform.OSX32 == platform || EPlatform.OSX64 == platform);
     return isOSX;
 }
コード例 #43
0
ファイル: Platform.cs プロジェクト: knocte/BuildAMation
 ToString(
     EPlatform platformFlags,
     char separator)
 {
     var value = ToString(platformFlags, separator, null, false);
     return value;
 }
コード例 #44
0
ファイル: OSUtilities.cs プロジェクト: knocte/BuildAMation
 IsLinux(
     EPlatform platform)
 {
     var isLinux = (EPlatform.Linux32 == platform || EPlatform.Linux64 == platform);
     return isLinux;
 }