public SupportedPlatformsAttribute(Platforms platforms) { if ((platforms & ~Platforms.All) != 0) throw new ArgumentException(Environment.GetResourceString("Argument_InvalidFlag"), "platforms"); Contract.EndContractBlock(); m_platforms = platforms; }
public Game() { Studio = string.Empty; Platform = Platforms.None; Publisher = string.Empty; Players = 1; }
/// <summary> /// Создать <see cref="TargetPlatformFeature"/>. /// </summary> /// <param name="localizationKey">Ключ для <see cref="LocalizedStrings"/>, по которому будет получено локализованное название.</param> /// <param name="preferLanguage">Целевая аудитория.</param> /// <param name="platform">Платформа.</param> public TargetPlatformFeature(string localizationKey, Languages preferLanguage = Languages.English, Platforms platform = Platforms.AnyCPU) { if (localizationKey.IsEmpty()) throw new ArgumentNullException("localizationKey"); LocalizationKey = localizationKey; PreferLanguage = preferLanguage; Platform = platform; }
public AnalyzerService(string assemblyPath, Platforms requestedPlatforms, bool excludeThirdPartyReferences) { _assemblyPath = assemblyPath; _requestedPlatforms = requestedPlatforms; _portabilityAnalyzer = new PortabilityAnalyzer(PortabilityDatabase.Collection); _assemblyParser = new AssemblyParser(_assemblyPath); _portabilityAnalyzer.SupportedPlatforms = _requestedPlatforms; _portabilityAnalyzer.ExcludeThirdPartyReferences = excludeThirdPartyReferences; _portabilityAnalyzer.CallCollection = _assemblyParser.GetAssemblyCalls(); }
public static void Main(string[] args) { Application.Init (); platform = Platform.Get (); // Initiate NSApplication for the Native Messagebox on Mac // Normaly you wouldn't need this if (platform == Platforms.Mac) { MonoMac.AppKit.NSApplication.Init(); } MainWindow win = new MainWindow (); win.Show (); Application.Run(); }
protected string transformPlatform(Platforms platform) { switch (platform) { case Platforms.iOS: return "1"; case Platforms.Android: return "2"; case Platforms.Windows: return "3"; case Platforms.WebDevices: return "4"; default: return "-1"; } }
// Builds the given project/sln for the given platforms and copies the output & package file to the output directory public static void BuildAndCopyToOutputFolder(string slnPath, VsVersions vsVersion, string outDir, Platforms plats) { if ((plats & Platforms.x64) != 0) BuildSln(slnPath, vsVersion, Platforms.x64); if ((plats & Platforms.Win32) != 0) BuildSln(slnPath, vsVersion, Platforms.Win32); if (!Directory.Exists(outDir)) Directory.CreateDirectory(outDir); string packageDir = Path.GetDirectoryName(slnPath); CopyFile("package.json", packageDir, outDir); CopyFile("README.md", packageDir, outDir); CopyFile(".npmignore", packageDir, outDir); CopyDir("bin", packageDir, outDir); CopyDir("lib", packageDir, outDir); }
public IList <Platforms> PullAllPlatforms() { //Pulls all platforms from SQL DB IList <Platforms> pulledPlatforms = new List <Platforms>(); using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); SqlCommand cmd = connection.CreateCommand(); cmd.CommandText = @"select * from Platforms"; SqlDataReader reader = cmd.ExecuteReader(); while (reader.Read()) { Platforms newPlatform = new Platforms { Platform_Id = (int)reader["platform_id"], Platform_Name = (string)reader["platform_name"] }; pulledPlatforms.Add(newPlatform); } } return(pulledPlatforms); }
public IList <Platforms> PullAllPlatforms() { //Creates IGDB client using our apiKey var igdb = IGDB.Client.Create(Environment.GetEnvironmentVariable(apiKey)); igdb.ApiKey = apiKey; IList <Platforms> pulledPlatforms = new List <Platforms>(); //Queries IGDB and pulls 50 platform Ids and names var getPlatforms = Task.Run(() => igdb.QueryAsync <Platform>(IGDB.Client.Endpoints.Platforms, query: "limit 50;fields *;")).Result; for (int i = 0; i < getPlatforms.Count(); i++) { Platforms newPlatform = new Platforms { Platform_Id = (int)getPlatforms[i].Id, Platform_Name = (string)getPlatforms[i].Name }; pulledPlatforms.Add(newPlatform); } return(pulledPlatforms); }
public T Find <T>(string name) where T : class { var typeName = typeof(T).Name; switch (typeName) { case nameof(MotionCardWrapper): return(MotionExs.FirstOrDefault(ex => ex.Value.Name == name).Value as T); case nameof(IDiEx): return(DiExs.FirstOrDefault(ex => ex.Value.Name == name).Value as T); case nameof(IDoEx): return(DoExs.FirstOrDefault(ex => ex.Value.Name == name).Value as T); case nameof(IVioEx): return(VioExs.FirstOrDefault(ex => ex.Value.Name == name).Value as T); case nameof(ICylinderEx): return(CylinderExs.FirstOrDefault(ex => ex.Value.Name == name).Value as T); case nameof(IAxisEx): return(AxisExs.FirstOrDefault(ex => ex.Value.Name == name).Value as T); case nameof(PlatformEx): return(Platforms.FirstOrDefault(ex => ex.Value.Name == name).Value as T); case nameof(Station): return(Stations.FirstOrDefault(ex => ex.Value.Name == name).Value as T); case nameof(StationTask): return(Tasks.FirstOrDefault(ex => ex.Value.Name == name).Value as T); default: return(null); } }
public static IEnumerable <object[]> GetProjectTemplates() { InitializeTemplates(new LocalTemplatesSource("TestGen")); List <object[]> result = new List <object[]>(); foreach (var language in ProgrammingLanguages.GetAllLanguages()) { SetCurrentLanguage(language); foreach (var platform in Platforms.GetAllPlatforms()) { SetCurrentPlatform(platform); var templateProjectTypes = GenComposer.GetSupportedProjectTypes(platform); var projectTypes = GenContext.ToolBox.Repo.GetProjectTypes(platform) .Where(m => templateProjectTypes.Contains(m.Name) && !string.IsNullOrEmpty(m.Description)) .Select(m => m.Name); foreach (var projectType in projectTypes) { var projectFrameworks = GenComposer.GetSupportedFx(projectType, platform); var targetFrameworks = GenContext.ToolBox.Repo.GetFrameworks(platform) .Where(m => projectFrameworks.Contains(m.Name)) .Select(m => m.Name).ToList(); foreach (var framework in targetFrameworks) { result.Add(new object[] { projectType, framework, platform, language }); } } } } return(result); }
public static void StartBrowser(Platforms platform = Platforms.Desktop, BrowserTypes browserType = BrowserTypes.Chrome, int defaultTimeOut = 30) { switch (platform) { case (Platforms.Desktop): switch (browserType) { case BrowserTypes.Firefox: Browser = new FirefoxDriver(); break; case BrowserTypes.InternetExplorer: Browser = new InternetExplorerDriver(); break; case BrowserTypes.Chrome: ChromeOptions options = new ChromeOptions(); options.AddUserProfilePreference("profile.default_content_setting_values.plugins", 1); options.AddUserProfilePreference("profile.content_settings.plugin_whitelist.adobe-flash-player", 1); options.AddUserProfilePreference("profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player", 1); options.AddUserProfilePreference("PluginsAllowedForUrls", "http:/ "); options.AddUserProfilePreference("PluginsAllowedForUrls", "https://slotoking.com"); Browser = new ChromeDriver(options); break; case BrowserTypes.Edge: Browser = new EdgeDriver(); break; default: Browser = new ChromeDriver(); break; } BrowserWait = new WebDriverWait(Driver.Browser, TimeSpan.FromSeconds(defaultTimeOut)); break; } }
protected override void ProcessRecord() { try { this.denServicesController = new DenServicesController(this.Path, this.DenConfigController); this.denServicesController.OnLog += this.OnLog; this.denServicesController.OnError += this.OnError; Task <bool> start = this.denServicesController.StartWaykDen(this.InstanceCount); this.started = true; while (!start.IsCompleted && !start.IsCanceled) { this.mre.WaitOne(); lock (this.mutex) { if (this.record != null) { this.WriteProgress(this.record); this.record = null; } if (this.error != null) { this.WriteError(new ErrorRecord(this.error, this.error.StackTrace, ErrorCategory.InvalidData, this.error.Data)); this.error = null; } } } Platforms p = string.Equals(this.denServicesController.DenConfig.DenDockerConfigObject.Platform, "Linux") ? Platforms.Linux : Platforms.Windows; this.CheckOverrideDockerImages(p, this.denServicesController.DenConfig.DenImageConfigObject); } catch (Exception e) { this.OnError(e); } }
public static CatalogData <T> operator -(dynamic t, CatalogData <T> ct) { Platforms p = ct.platform; Dictionary <Platforms, T> dic = new Dictionary <Platforms, T> (); ct.platform = Platforms.Default; T rtd = ct; dic.Add(Platforms.Default, rtd); int i; int d = 1; for (i = 0; i < 10; i++) { ct.platform = (Platforms)(d << i); T rt = ct; if (!(rt as object).Equals(rtd as object)) { dic.Add((Platforms)(d << i), rt); } } if (ct.obj.ContainsKey(p)) { dic.Remove(p); dic.Add(p, t - ct.obj [p]); } else { dic.Remove(Platforms.Default); dic.Add(Platforms.Default, t - ct.obj [Platforms.Default]); } CatalogData <T> rct = new CatalogData <T> (dic); ct.platform = p; return(rct); }
public void TestCompiler() { //try { Platforms.AddPlatform(new UnixBashPlatform()); var compiler = new Compiler(); var result = compiler.CompileFromSource( Console.Out, Console.Out, Console.Out, "/home/amk/Temp/ShellScript/variables.shellscript", "/home/amk/Temp/ShellScript/variables.sh", "unix-bash", CompilerFlags.CreateDefault() ); GC.KeepAlive(result); } //catch (Exception ex) { Debugger.Break(); } }
protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oPlatform = new Platforms(intProfile, dsn); oType = new Types(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oServiceRequest = new ServiceRequests(intProfile, dsn); oForecast = new Forecast(intProfile, dsn); if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "") { intApplication = Int32.Parse(Request.QueryString["applicationid"]); } if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "") { intPage = Int32.Parse(Request.QueryString["pageid"]); } if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "") { intApplication = Int32.Parse(Request.Cookies["application"].Value); } int intPlatform = 0; if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { intPlatform = Int32.Parse(Request.QueryString["id"]); } if (intPlatform > 0) { intMax = Int32.Parse(oPlatform.Get(intPlatform, "max_inventory1")); if (!IsPostBack) { LoadFilters(); LoadGroups(intPlatform); } } }
public SyncValidator() { RuleFor(c => c.Path) .NotEmpty() .WithMessage(StringRes.BadReqInvalidPath); RuleFor(c => c.FullPath) .NotEmpty() .Must(f => IsValidPath(f)) .WithMessage(StringRes.BadReqInvalidPath); RuleFor(c => c.FullPath) .Must(f => !f.EndsWith("mstx") || IsPackageHashValid(f)) .WithMessage(StringRes.BadReqInvalidPackage); RuleFor(c => c.Platform) .NotEmpty() .Must(p => Platforms.IsValidPlatform(p)) .WithMessage(StringRes.BadReqInvalidPlatform); RuleFor(x => x) .Must(x => ProgrammingLanguages.IsValidLanguage(x.Language, x.Platform)) .WithMessage(StringRes.BadReqInvalidLanguage); }
public void _Finish() { // Sort widths Pillars.SortWidths(); Platforms.SortWidths(); Ceilings.SortWidths(); StartBlock.SortWidths(); EndBlock.SortWidths(); if (MyTileSetInfo.Pendulums.Group.Dict.Count == 0) { MyTileSetInfo.Pendulums.Group = PieceQuad.ElevatorGroup; } if (MyTileSetInfo.Elevators.Group.Dict.Count == 0) { MyTileSetInfo.Elevators.Group = PieceQuad.ElevatorGroup; } if (MyTileSetInfo.FallingBlocks.Group.Dict.Count == 0) { MyTileSetInfo.FallingBlocks.Group = PieceQuad.FallGroup; } if (MyTileSetInfo.BouncyBlocks.Group.Dict.Count == 0) { MyTileSetInfo.BouncyBlocks.Group = PieceQuad.BouncyGroup; } if (MyTileSetInfo.MovingBlocks.Group.Dict.Count == 0) { MyTileSetInfo.MovingBlocks.Group = PieceQuad.MovingGroup; } MyTileSetInfo.Pendulums.Group.SortWidths(); MyTileSetInfo.Elevators.Group.SortWidths(); MyTileSetInfo.FallingBlocks.Group.SortWidths(); MyTileSetInfo.MovingBlocks.Group.SortWidths(); MyTileSetInfo.BouncyBlocks.Group.SortWidths(); }
protected void Page_Load(object sender, EventArgs e) { Response.Cookies["loginreferrer"].Value = "/admin/platform_forms.aspx"; Response.Cookies["loginreferrer"].Expires = DateTime.Now.AddDays(30); if (Request.Cookies["adminid"] != null && Request.Cookies["adminid"].Value != "") { intProfile = Int32.Parse(Request.Cookies["adminid"].Value); } else { Response.Redirect("/admin/login.aspx"); } oPlatform = new Platforms(intProfile, dsn); if (!IsPostBack) { Load(); btnOrder.Attributes.Add("onclick", "return OpenWindow('SUPPORTORDER','" + hdnParent.ClientID + "','" + hdnOrder.ClientID + "&type=PLATFORM_FORM" + "',false,400,400);"); btnParent.Attributes.Add("onclick", "return OpenWindow('PLATFORMBROWSER','" + hdnParent.ClientID + "','&control=" + hdnParent.ClientID + "&controltext=" + lblParent.ClientID + "',false,400,600);"); btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this item?');"); btnImage.Attributes.Add("onclick", "return OpenWindow('IMAGEPATH','','" + txtImage.ClientID + "',false,500,550);"); btnPath.Attributes.Add("onclick", "return OpenWindow('FILEBROWSER','" + txtPath.ClientID + "','',false,400,600);"); btnCancel.Attributes.Add("onclick", "return Cancel();"); } }
static bool?IsAvailable(this Decl decl, Platforms platform_value) { var platform = platform_value.ToString().ToLowerInvariant(); bool?result = null; foreach (var attr in decl.Attrs) { // NS_UNAVAILABLE if (attr is UnavailableAttr) { return(false); } var avail = (attr as AvailabilityAttr); if (avail == null) { continue; } var availName = avail.Platform.Name.ToLowerInvariant(); // if the headers says it's not available then we won't report it as missing if (avail.Unavailable && (availName == platform)) { return(false); } // for iOS we won't report missing members that were deprecated before 5.0 if (!avail.Deprecated.IsEmpty && availName == "ios" && avail.Deprecated.Major < 5) { return(false); } // can't return true right away as it can be deprecated too if (!avail.Introduced.IsEmpty && (availName == platform)) { result = true; } } return(result); }
public static void PerformPCBuild() { Debug.Log("Starting PC build"); try { var buildManager = Init(); _platformBuild = Platforms.PC; buildManager.BuildPC(); var path = GetOutputPath(); if (string.IsNullOrEmpty(path)) { return; } path = Path.GetFullPath(path); var outputPath = Path.GetDirectoryName(_buildOutput); outputPath = Path.GetFullPath(Application.dataPath + "/../" + outputPath); Console.WriteLine("Copying PC build from '{0}' to '{1}'", outputPath, path); CopyFileAndFolders(path, outputPath); } catch (Exception e) { Debug.Log(string.Format("Build gave an error: {0}", e)); } }
public static int GetPlatformManagedValue(Platforms platform) { // None, MacOSX, iOS, WatchOS, TvOS, MacCatalyst switch (platform) { case Platforms.macOS: return(1); case Platforms.iOS: return(2); case Platforms.watchOS: return(3); case Platforms.tvOS: return(4); case Platforms.MacCatalyst: return(5); default: throw new InvalidOperationException($"Unexpected Platform {Platform} in GetPlatformManagedValue"); } }
protected override void Build() { Add(Platform.Concrete(new Point2(7, 3), width: 1, height: 0.3)); Platforms.Last().OnActorLanding += actor => LevelContext.DisplayMessage("Find your inner peace"); _checkpoint = Add(Platform.OneWay(new Point2(7, 7), width: 4.5)); Add(Platform.PassThrough(new Point2(16.9, 8), width: 0.3)); Add(Platform.OneWay(new Point2(18.3, 5), width: 1.5)); DeathTaunts.Add(Platforms.Last(), "Such lack of creativity"); Add(Platform.OneWay(new Point2(10, 9), width: 3.7)); Add(Platform.OneWay(new Point2(15.6, 9), width: 5.4)); Platforms.Last().OnActorLanding += actor => { if (actor.Size == 1) { LevelContext.DisplayMessage("Just do it"); } }; Add(Platform.PassThrough(new Point2(19, 8), width: 1.3)); Platforms.Last().OnActorLanding += actor => { if (actor.Size == 2) { LevelContext.DisplayMessage("Ah! I see you are a man of culture"); } }; Add(Platform.OneWay(new Point2(14.3, 7), width: 2)); Add(Platform.PassThrough(new Point2(9, 4), width: 1.5)); Add(Platform.PassThrough(new Point2(10.5, 8), width: 2.6)); Add(Platform.PassThrough(new Point2(20, 7), width: 1)); Add(Platform.PassThrough(new Point2(12.9, 4), width: 1.5)); Add(Platform.OneWay(new Point2(13.2, 5), width: 1.5)); DeathTaunts.Add(Platforms.Last(), "You should use your head for thinking"); Add(Platform.Concrete(new Point2(14.5, 3), width: 1.3, height: 0.3)); DeathTaunts.Add(Platforms.Last(), "Suicide is never the answer"); Add(Platform.Concrete(new Point2(16, 5.3), width: 0.3, height: 0.3)); Add(Platform.Concrete(new Point2(18, 5.3), width: 0.3, height: 0.3)); DeathTaunts.Add(Platforms.Last(), "Epic fail"); Add(Platform.Concrete(new Point2(14, 7), width: 0.3, height: 0.3)); Add(Platform.Concrete(new Point2(13.7, 9.3), width: 0.3, height: 0.3)); Add(Platform.Concrete(new Point2(17.8, 3), width: 1, height: 0.3)); Add(Platform.Concrete(new Point2(20.2, 3.8), width: 0.3)); DeathTaunts.Add(Platforms.Last(), "Wow, you really blew it this time!"); Add(Platform.Concrete(new Point2(21, 8), width: 0.3, height: 0.5)); Add(Platform.Concrete(new Point2(21, 16.5), width: 0.3, height: 4)); Add(Platform.Concrete(new Point2(21, 10.8), width: 0.3, height: 0.8)); Add(Platform.Concrete(new Point2(15.1, 11.2), width: 0.3, height: 0.3)); Add(Platform.Concrete(new Point2(17.5, 11.5), width: 0.3, height: 0.3)); Add(Platform.OneWay(new Point2(10, 12), width: 11)); Add(Platform.Concrete(new Point2(23.5, 4), width: 4, height: 0.3)); }
public PushUri GetPushUriByPlatformDeviceId(Platforms platform, string deviceId) { return(_pushUriRepository.GetPushUriByPlatformDeviceId((int)platform, deviceId)); }
public static IXIOTCoreFactory Create(Platforms platforms) { return(new XIOTCoreFactory(platforms)); }
void Start() { LoadCharacter(); platforms = GetComponent <Platforms>(); }
private static IntPtr[] GetContextProperties(Platforms platforms) { Int32 count = platforms.Count; IntPtr[] properties = new IntPtr[2 * platforms.Count + 1]; for (int i = 0; i < count; i++) { properties[2 * i] = new IntPtr((Int32)CLContextProperties.Platform); properties[2 * i + 1] = platforms[i].CLPlatformID.Value; } return properties; }
public IDictionary<AdviceBase, IList<StatisticsBase>> GetAdviceStatistics(Platforms platform, DateTime fromDate, DateTime untilDate) { throw new NotImplementedException(); }
static Platform() { if(Path.DirectorySeparatorChar == '/') { if(Directory.Exists("/System") && Directory.Exists("/Library")) { CurrentPlatform = Platforms.OSX; } else { CurrentPlatform = Platforms.Linux; } } else { CurrentPlatform = Platforms.Windows; } }
/// <summary> /// Handles building the platform components /// </summary> /// <param name="project"></param> /// <param name="service"></param> /// <param name="components"></param> /// <param name="guid"></param> /// <returns></returns> private string[] BuildPlatform(IProject project, Platforms service, Guid guid) { RegisteredPlatform platform; try { if (service.TryGetPlatform(guid, out platform)) { log.Info(Resources.log_build_interfaces); var status = new OperationStatus(); return platform.Generate(project, status, BuildType.BuildAll) ?? new string[0]; } } catch (InvalidOperationException ex) { // thrown by VFS when connection string is invalid // This occurs when deploying the dll to the database. if (ex.Source != "Sage.Platform.VirtualFileSystem" && ex.Source != "System.Data") throw; } return new string[0]; }
void Start() { if (Application.platform == RuntimePlatform.Android) platform = Platforms.Android; LoadScoreLocal(); }
private static void BuildSln(string slnPath, VsVersions vsVersion, Platforms platform) { string cmd = CreateBuildCmd(slnPath, vsVersion, platform); bool result = ExecuteCommand(cmd); if (!result) throw new Exception("Failed to build project"); }
private static string CreateBuildCmd(string slnPath, VsVersions vsVersion, Platforms platform) { if (vsVersion == VsVersions.Vs2012) { return String.Format(MSBUILD_CMD_TEMPLATE, VS_2012_CMD, slnPath, platform.ToString()); } else { return String.Format(MSBUILD_CMD_TEMPLATE, VS_2013_CMD, slnPath, platform.ToString()); } }
public static Context Create(Platforms platforms) { return Create(platforms, Devices.Create(Device.DefaultDeviceType, platforms)); }
public static RegionalEndPoint GetRegionalEndPointByPlatform(Platforms platform) { return RegionalEndPoints.FirstOrDefault(x => x.PlatformId == platform.ToString()); }
public static bool HasObsoleted(CustomAttribute attribute, Platforms platform) => HasMatchingPlatformAttribute("ObsoletedAttribute", attribute, platform);
protected override void ProcessRecord() { try { DenConfigController denConfigController = new DenConfigController(this.Path, this.Key); if (denConfigController.DbExists) { this.DenConfig = denConfigController.GetConfig(); this.UpdateConfig(); } else { if (string.IsNullOrEmpty(this.Platform)) { this.Platform = "Linux"; } Platforms platform = this.Platform.Equals("Linux") ? Platforms.Linux : Platforms.Windows; RsaKeyGenerator rsaKeyGenerator = new RsaKeyGenerator(); this.DenConfig = new DenConfig() { DenDockerConfigObject = new DenDockerConfigObject { DockerClientUri = string.IsNullOrEmpty(this.DockerClientUri) ? this.DockerDefaultEndpoint : this.DockerClientUri, Platform = platform.ToString(), SyslogServer = this.SyslogServer }, DenMongoConfigObject = new DenMongoConfigObject { Url = !string.IsNullOrEmpty(this.MongoUrl) ? this.MongoUrl : DEFAULT_MONGO_URL }, DenPickyConfigObject = new DenPickyConfigObject { ApiKey = DenServiceUtils.GenerateRandom(32), Backend = "mongodb", Realm = this.Realm }, DenLucidConfigObject = new DenLucidConfigObject { AdminSecret = DenServiceUtils.GenerateRandom(10), AdminUsername = DenServiceUtils.GenerateRandom(16), ApiKey = DenServiceUtils.GenerateRandom(32) }, DenServerConfigObject = new DenServerConfigObject { ApiKey = DenServiceUtils.GenerateRandom(32), AuditTrails = "true", ExternalUrl = this.ExternalUrl, LDAPPassword = this.LDAPPassword != null ? this.LDAPPassword : string.Empty, LDAPServerUrl = this.LDAPServerUrl != null ? this.LDAPServerUrl : string.Empty, LDAPUserGroup = this.LDAPUserGroup != null ? this.LDAPUserGroup : string.Empty, LDAPUsername = this.LDAPUsername != null ? this.LDAPUsername : string.Empty, LDAPServerType = this.LDAPServerType != null ? this.LDAPServerType : string.Empty, LDAPBaseDN = this.LDAPBaseDN != null ? this.LDAPBaseDN : string.Empty, PrivateKey = KeyCertUtils.PemToDer(rsaKeyGenerator.PrivateKey), JetServerUrl = this.JetServerUrl != null ? this.JetServerUrl : string.Empty, JetRelayUrl = this.JetRelayUrl != null ? this.JetRelayUrl : string.Empty, LoginRequired = this.LoginRequired ? "True": "False", PublicKey = KeyCertUtils.PemToDer(rsaKeyGenerator.PublicKey), NatsUsername = this.NatsUsername, NatsPassword = this.NatsPassword, RedisPassword = this.RedisPassword }, DenTraefikConfigObject = new DenTraefikConfigObject { WaykDenPort = this.WaykDenPort != null ? this.WaykDenPort : "4000", Certificate = this.CertificatePath != null ? this.CertificatePath : string.Empty, PrivateKey = this.PrivateKeyPath != null ? this.PrivateKeyPath : string.Empty }, DenImageConfigObject = new DenImageConfigObject(platform) }; } denConfigController.StoreConfig(this.DenConfig); Environment.SetEnvironmentVariable(WAYK_DEN_HOME, this.Path); } catch (Exception e) { this.OnError(e); } base.ProcessRecord(); }
protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oPage = new Pages(intProfile, dsn); oUser = new Users(intProfile, dsn); oPlatform = new Platforms(intProfile, dsn); oAsset = new Asset(intProfile, dsnAsset); oAssetOrder = new AssetOrder(intProfile, dsn, dsnAsset, intEnvironment); oLocation = new Locations(intProfile, dsn); oModel = new Models(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oType = new Types(intProfile, dsn); oClass = new Classes(intProfile, dsn); oRequest = new Requests(intProfile, dsn); oResourceRequest = new ResourceRequest(intProfile, dsn); oService = new Services(intProfile, dsn); oServiceRequest = new ServiceRequests(intProfile, dsn); oResiliency = new Resiliency(intProfile, dsn); oOperatingSystem = new OperatingSystems(intProfile, dsn); if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "") { intApplication = Int32.Parse(Request.QueryString["applicationid"]); } if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "") { intPage = Int32.Parse(Request.QueryString["pageid"]); } if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "") { intApplication = Int32.Parse(Request.Cookies["application"].Value); } if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { intPlatform = Int32.Parse(Request.QueryString["id"]); } //intPlatform = 1; if (intPlatform != 0) { pnlOrder.Visible = true; if (!IsPostBack) { AddControlsAttributes(); LoadLists(intPlatform); if (Request.QueryString["orderid"] != null && Request.QueryString["orderid"] != "") { if (Request.QueryString["submitted"] != null && Request.QueryString["submitted"] == "true") { lblInfo.Text = "Your information has been submitted successfully."; pnlInfo.Visible = true; pnlOrder.Style.Add("display", "none"); } else if (Request.QueryString["saved"] != null && Request.QueryString["saved"] == "true") { lblInfo.Text = "Your information has been saved successfully."; pnlInfo.Visible = true; btnNewRequest.Visible = false; hdnOrderId.Value = Request.QueryString["orderid"]; LoadOrderRequest(); } else { hdnOrderId.Value = Request.QueryString["orderid"]; LoadOrderRequest(); } } } else { Page.ClientScript.RegisterStartupScript(typeof(Page), "loadCurrentTab", "<script type=\"text/javascript\">window.top.LoadCurrentTab();<" + "/" + "script>"); } PopulateLocations(); } else { pnlDenied.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { intProfile = Int32.Parse(Request.Cookies["profileid"].Value); oFunction = new Functions(intProfile, dsn, intEnvironment); oPlatform = new Platforms(intProfile, dsn); oType = new Types(intProfile, dsn); oModelsProperties = new ModelsProperties(intProfile, dsn); oServiceRequest = new ServiceRequests(intProfile, dsn); oForecast = new Forecast(intProfile, dsn); oPage = new Pages(intProfile, dsn); oLocation = new Locations(intProfile, dsn); oClass = new Classes(intProfile, dsn); oIM = new InventoryManager(intProfile, dsn); if (Request.QueryString["applicationid"] != null && Request.QueryString["applicationid"] != "") { intApplication = Int32.Parse(Request.QueryString["applicationid"]); } if (Request.QueryString["pageid"] != null && Request.QueryString["pageid"] != "") { intPage = Int32.Parse(Request.QueryString["pageid"]); } if (Request.Cookies["application"] != null && Request.Cookies["application"].Value != "") { intApplication = Int32.Parse(Request.Cookies["application"].Value); } if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { intPlatform = Int32.Parse(Request.QueryString["id"]); } if (intPlatform > 0) { if (!IsPostBack) { LoadLists(); } else { Page.ClientScript.RegisterStartupScript(typeof(Page), "loadCurrentTab", "<script type=\"text/javascript\">window.top.LoadCurrentTab();<" + "/" + "script>"); } btnProjects.Attributes.Add("onclick", "return MakeWider(this, '" + lstProjects.ClientID + "');"); btnProjectsClear.Attributes.Add("onclick", "return ClearList('" + lstProjects.ClientID + "');"); btnClasses.Attributes.Add("onclick", "return MakeWider(this, '" + lstClasses.ClientID + "');"); btnClassesClear.Attributes.Add("onclick", "return ClearList('" + lstClasses.ClientID + "');"); btnConfidences.Attributes.Add("onclick", "return MakeWider(this, '" + lstConfidences.ClientID + "');"); btnConfidencesClear.Attributes.Add("onclick", "return ClearList('" + lstConfidences.ClientID + "');"); btnEnvironments.Attributes.Add("onclick", "return MakeWider(this, '" + lstEnvironments.ClientID + "');"); btnEnvironmentsClear.Attributes.Add("onclick", "return ClearList('" + lstEnvironments.ClientID + "');"); btnLocations.Attributes.Add("onclick", "return MakeWider(this, '" + lstLocations.ClientID + "');"); btnLocationsClear.Attributes.Add("onclick", "return ClearList('" + lstLocations.ClientID + "');"); lstClasses.Attributes.Add("onchange", "PopulateEnvironmentsList('" + lstClasses.ClientID + "','" + lstEnvironments.ClientID + "',0);"); lstEnvironments.Attributes.Add("onchange", "UpdateListHidden('" + lstEnvironments.ClientID + "','" + hdnEnvironment.ClientID + "');"); imgStart.Attributes.Add("onclick", "return ShowCalendar('" + txtStart.ClientID + "');"); imgEnd.Attributes.Add("onclick", "return ShowCalendar('" + txtEnd.ClientID + "');"); btnGo1.Attributes.Add("onclick", "return ProcessButtons(this) && LoadWait();"); btnGo2.Attributes.Add("onclick", "return ProcessButtons(this) && LoadWait();"); } }
private string GetSoundFileNameFromType(Platforms platform, string type, bool enableCustomSounds) { if (!enableCustomSounds) { if (platform == Platforms.iPhone) { return("beep.caf"); } return("beep.wav"); } if (type == ((int)PushSoundTypes.CallEmergency).ToString()) { if (platform == Platforms.iPhone) { return("callemergency.caf"); } return("callemergency.wav"); } else if (type == ((int)PushSoundTypes.CallHigh).ToString()) { if (platform == Platforms.iPhone) { return("callhigh.caf"); } return("callhigh.wav"); } else if (type == ((int)PushSoundTypes.CallMedium).ToString()) { if (platform == Platforms.iPhone) { return("callmedium.caf"); } return("callmedium.wav"); } else if (type == ((int)PushSoundTypes.CallLow).ToString()) { if (platform == Platforms.iPhone) { return("calllow.caf"); } return("calllow.wav"); } else if (type == ((int)PushSoundTypes.Notifiation).ToString()) { if (platform == Platforms.iPhone) { return("notification.caf"); } return("notification.wav"); } else if (type == ((int)PushSoundTypes.Message).ToString()) { if (platform == Platforms.iPhone) { return("message.caf"); } return("message.wav"); } else { if (platform == Platforms.iPhone) { //return "beep.caf"; return($"{type}.mp3"); } //return "beep.wav"; return($"{type}.mp3"); } }
public XIOTCoreFactory(Platforms platforms) { _platforms = platforms; Builder = new ContainerBuilder(); }
/// <summary> /// Initializes a new instance of the <see cref="TargetPlatformAttribute"/>. /// </summary> /// <param name="preferLanguage">The target audience.</param> /// <param name="platform">Platform.</param> public TargetPlatformAttribute(Languages preferLanguage = Languages.English, Platforms platform = Platforms.AnyCPU) { PreferLanguage = preferLanguage; Platform = platform; }
public void AddPlatform(Platform P) { Platforms.Add(P); }
private Context(CLContext openclContext, Platforms platforms, Devices devices) { this.Devices = devices; this.Platforms = platforms; this.CLContext = openclContext; }
public static bool HasDeprecated(CustomAttribute attribute, Platforms platform) => HasMatchingPlatformAttribute("DeprecatedAttribute", attribute, platform);
public static Context Create(Platforms platforms, Devices devices) { CLError error = CLError.None; // TODO: Add parameter pfn_notify (logging function) CLContext openclContext = OpenCLDriver.clCreateContext(GetContextProperties(platforms), devices.Count, devices.OpenCLDeviceArray, null, IntPtr.Zero, ref error); OpenCLError.Validate(error); return new Context(openclContext, platforms, devices); }
static bool HasMatchingPlatformAttribute(string expectedAttributeName, CustomAttribute attribute, Platforms platform) { if (attribute.Constructor.DeclaringType.Name == expectedAttributeName) { byte attrPlatform = (byte)attribute.ConstructorArguments[0].Value; if (attrPlatform == Helpers.GetPlatformManagedValue(platform)) { return(true); } } return(false); }
public XIOTCoreWindowsFactory(Platforms platforms) :base(platforms) { }
public void WithSafari_SpecificVersion_SetsCorrectBrowser(string safariVersion, Platforms expectedPlatform) { SauceOptions.WithSafari(safariVersion); SauceOptions.ConfiguredSafariOptions.PlatformName.Should().Be(expectedPlatform.Value); }
public static new IXIOTCoreFactory Create(Platforms platforms) { return new XIOTCoreWindowsFactory(platforms); }
/// <summary> /// Создать <see cref="TargetPlatformAttribute"/>. /// </summary> /// <param name="preferLanguage">Целевая аудитория.</param> /// <param name="platform">Платформа.</param> public TargetPlatformAttribute(Languages preferLanguage = Languages.English, Platforms platform = Platforms.AnyCPU) { PreferLanguage = preferLanguage; Platform = platform; }
static PlatformUtil() { PlatformPersonalFolder = new Dictionary<Platforms, string>() { { Platforms.Android, @"^\/data\/data\/[^\/]+\/files$" }, { Platforms.Angle, @"" }, { Platforms.iOS, @"" }, { Platforms.Linux, @"" }, { Platforms.MacOS, @"^\/Users\/[^\/]+$" }, { Platforms.Ouya, @"" }, { Platforms.PSMobile, @"" }, { Platforms.Web, @"" }, { Platforms.Windows, @"" }, { Platforms.Windows8, @"" }, { Platforms.WindowsGL, @"" }, { Platforms.WindowsPhone, @"" }, }; PlatformApplicationDataFolder = new Dictionary<Platforms, string>(){ { Platforms.Android, @"^\/data\/data\/[^\/]+\/files\/\.config$" }, { Platforms.Angle, @"" }, { Platforms.iOS, @"" }, { Platforms.Linux, @"" }, { Platforms.MacOS, @"^\/Users\/[^\/]+\/\.config+$" }, { Platforms.Ouya, @"" }, { Platforms.PSMobile, @"" }, { Platforms.Web, @"" }, { Platforms.Windows, @"" }, { Platforms.Windows8, @"" }, { Platforms.WindowsGL, @"" }, { Platforms.WindowsPhone, @"" }, }; PlatformLocalApplicationDataFolder = new Dictionary<Platforms, string>() { { Platforms.Android, @"^\/data\/data\/[^\/]+\/files\/\.local\/share$" }, { Platforms.Angle, @"" }, { Platforms.iOS, @"" }, { Platforms.Linux, @"" }, { Platforms.MacOS, @"^\/Users\/[^\/]+\/\.local\/share+$" }, { Platforms.Ouya, @"" }, { Platforms.PSMobile, @"" }, { Platforms.Web, @"" }, { Platforms.Windows, @"" }, { Platforms.Windows8, @"" }, { Platforms.WindowsGL, @"" }, { Platforms.WindowsPhone, @"" }, }; CurrentPlatform = InitCurrentPlatform (); }