public void SetConfiguration(ConfigurationBase newConfiguration) { if (timer != null) { timer.Change(Timeout.Infinite, Timeout.Infinite); } configuration = newConfiguration as TeamFoundationConfiguration; if (configuration == null) { throw new ApplicationException("Configuration can not be null."); } var credentialProvider = new PlainCredentialsProvider(configuration.Username, configuration.Password); var teamProjectCollection = new TfsTeamProjectCollection(new Uri(configuration.CollectionUri), credentialProvider); buildServer = teamProjectCollection.GetService<IBuildServer>(); if (timer == null) { timer = new Timer(Tick, null, 0, configuration.PollInterval); } else { timer.Change(0, configuration.PollInterval); } }
public RouteBuilder(ConfigurationBase configuration) { if (configuration == null) throw new ArgumentNullException("configuration"); _configuration = configuration; _routeFactory = configuration.AttributeRouteFactory; _routeConstraintFactory = configuration.RouteConstraintFactory; _parameterFactory = configuration.ParameterFactory; }
public IConfigirationControl GetConfigControl(ConfigurationBase config) { var soundSettingsModel = new SoundSettingsModel(); soundSettingsModel.Initialize((SoundPluginConfiguration)config); return new SoundSettingsView { DataContext = soundSettingsModel }; }
public void Write(ConfigurationBase configurationBase, List <ITransferObject> transferObjects, IOutput output) { ReflectionWriteConfiguration configuration = (ReflectionWriteConfiguration)configurationBase; if (configuration.Language == null) { throw new InvalidOperationException($"Can not generate Reflection.Type for language {configuration.Language?.Name ?? "Empty"}"); } List <FileTemplate> files = this.modelWriter.Write(configuration, transferObjects); files.ForEach(file => configuration.Language.Write(file, output)); }
public void Name_BasedOnType_SetsTheNameBasedOnType() { //ARRANGE Mock <ConfigurationBase> mock = new Mock <ConfigurationBase>(); ConfigurationBase config = mock.Object; //ACT string result = config.Name; //ASSERT StringAssert.Contains("Configuration", result); }
/// <summary> /// Checks whether two <see cref="ConfigurationBase"/>s are compatible for one to be used in a continued run /// based on a run using the other. /// </summary> /// <param name="other">Configuration used for the start of tuning.</param> /// <returns>True iff this configuration can be used for continued run.</returns> public override bool IsCompatible(ConfigurationBase other) { if (!(other is DifferentialEvolutionConfiguration otherConfig)) { return(false); } // Initial rates do not have to be used in a continued run, so they don't have to be checked. return (Math.Abs(this.BestPercentage - otherConfig.BestPercentage) < ConfigurationBase.CompatibilityTolerance && Math.Abs(this.LearningRate - otherConfig.LearningRate) < ConfigurationBase.CompatibilityTolerance); }
public RouteBuilder(ConfigurationBase configuration) { if (configuration == null) { throw new ArgumentNullException("configuration"); } _configuration = configuration; _routeFactory = configuration.AttributeRouteFactory; _routeConstraintFactory = configuration.RouteConstraintFactory; _parameterFactory = configuration.ParameterFactory; }
internal async Task <SortedList <byte, HttpRequestMessage> > Fetch( ConfigurationBase fetchConfig, Dictionary <string, SettingsWithPreferences> responsesRegistry, byte fetchInvokeCount = 1) { // Arrange byte requestCount = 1; var requests = new SortedList <byte, HttpRequestMessage>(); var handlerMock = new Mock <HttpClientHandler>(MockBehavior.Strict); handlerMock .Protected() .Setup <Task <HttpResponseMessage> >( "SendAsync", ItExpr.IsAny <HttpRequestMessage>(), ItExpr.IsAny <CancellationToken>() ) .Callback <HttpRequestMessage, CancellationToken>((message, _) => { requests.Add(requestCount++, message); }) .Returns <HttpRequestMessage, CancellationToken>((message, _) => Task.FromResult(new HttpResponseMessage() { StatusCode = HttpStatusCode.OK, Content = new StringContent(JsonConvert.SerializeObject(responsesRegistry[message.RequestUri.Host])) })) .Verifiable(); IConfigFetcher fetcher = new HttpConfigFetcher( fetchConfig.CreateUri(), "DEMO", Mock.Of <ILogger>(), handlerMock.Object, new ConfigDeserializer(Mock.Of <ILogger>(), JsonSerializer.Create()), fetchConfig.IsCustomBaseUrl); // Act byte i = 0; do { await fetcher.Fetch(ProjectConfig.Empty); i++; } while (fetchInvokeCount > i); // Assert return(requests); }
private void AddAllTauReachableSteps(ConfigurationBase step, List <EventStepSim> listResutlt) { NormalizedState NState = NormalizedState.TauReachable(new List <ConfigurationBase>() { step }); foreach (ConfigurationBase state in NState.States) { //for each step in this IEnumerable <ConfigurationBase> templist = state.MakeOneMove(); bool hasNonTauEvent = false; foreach (ConfigurationBase step1 in templist) { if (step1.Event != Common.Classes.Ultility.Constants.TAU) { hasNonTauEvent = true; break; } } //if the step has non-tau transition, this should be a boundary step, and we need to keep it if (hasNonTauEvent || state.IsDeadLock) { if (state.Event == Common.Classes.Ultility.Constants.TAU) { //do we need to add the * state.Event = step.Event; //+ "*" state.DisplayName = null; } EventStepSim step1Sim = new EventStepSim(state); bool contains = false; foreach (EventStepSim sim in listResutlt) { if (sim.Event == step1Sim.Event && sim.StepID == step1Sim.StepID) { contains = true; break; } } //duplicated steps should not be added in. if (!contains) { listResutlt.Add(step1Sim); } } } }
public static void Main(string[] args) { // Error handling AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(OnUnhandledException); // Fix working directory string path = Assembly.GetExecutingAssembly().Location; if (path.LastIndexOf(Path.DirectorySeparatorChar) > 0) { path = path.Substring(0, path.LastIndexOf(Path.DirectorySeparatorChar)); Environment.CurrentDirectory = path; } Console.WriteLine("Path set to: " + Environment.CurrentDirectory); // Read configuration file string configurationFile = "config.xml"; if (args.Length > 0) { configurationFile = string.Join(" ", args); } Console.WriteLine("Loading configuration file: " + configurationFile); ConfigurationBase configuration = ConfigurationReader.Read(configurationFile); if (configuration == null || configuration.Core == null || configuration.Bots.Length < 1) { Environment.Exit(1); return; } ConfigurationBot configurationBot = configuration.Bots[0]; // Start bot try { Console.Title = "VhaBot " + BotShell.VERSION + " " + BotShell.EDITION + " Edition [" + configurationBot.GetID() + "]"; } catch { } Console.WriteLine("Starting " + configurationBot.GetID()); BotShell bot = new BotShell(configurationBot, configuration.Core, null); // Main loop, just keep it alive int collectTimeout = 1; while (true) { collectTimeout--; if (collectTimeout < 1) { bot.Clean(); collectTimeout = 600; } System.Threading.Thread.Sleep(100); } }
public static void SetValue <T>(this IAppConfiguration config, Type section, Type type, string key, T value) { var configItem = $"{section.Name}.{type.FullName}.{key}"; if (ConfigurationBase.CanSupportType(typeof(T)) == true) { config[configItem] = value; } else { throw new NotSupportedException($"{typeof(T).Name} does not supported."); } }
public FormOptionsBase(ConfigurationBase currentConfig, List <string> fieldsForSearch = null) { InitializeComponent(); if (LicenseManager.UsageMode == LicenseUsageMode.Runtime) { if (fieldsForSearch != null) { FieldsToSearch = fieldsForSearch; } _currentConfig = currentConfig; } }
public virtual void Read(ConfigurationBase configurationBase, List <ITransferObject> transferObjects) { CookieConfiguration configuration = (CookieConfiguration)configurationBase; if (!string.IsNullOrEmpty(configuration.Url)) { this.ReadFromUrl(configuration, transferObjects); } else if (!string.IsNullOrEmpty(configuration.Name)) { transferObjects.Add(new TransferObject <Cookie>(new Cookie(configuration.Name, configuration.Value, configuration.Path, configuration.Domain))); } }
public static void SetValue <T>(this IRepositoryConfiguration config, Type section, string key, T value) { var configItem = new ConfigurationItem(section.Name, key); if (ConfigurationBase.CanSupportType(typeof(T)) == true) { config[configItem] = value; } else { config[configItem] = XmlSerializerUtility.GetString(value).Encrypt(); } }
public IConfigirationControl GetConfigControl(ConfigurationBase config) { var model = new LightSettingsModel(); model.Initialize((LightPluginConfiguration)config); var view = new LightSettingsView { DataContext = model }; return view; }
public static void SetValue <T>(this IUserConfiguration config, Type section, string key, T value) { #pragma warning disable CS0612 // 'ConfigurationItem'은(는) 사용되지 않습니다. var configItem = new ConfigurationItem(section.Name, key); #pragma warning restore CS0612 // 'ConfigurationItem'은(는) 사용되지 않습니다. if (ConfigurationBase.CanSupportType(typeof(T)) == true) { config[configItem] = value; } else { config[configItem] = XmlSerializerUtility.GetString(value).Encrypt(); } }
/// <summary> /// Creates a new visitor extending implementations of IAttributeRoute with common logic. /// </summary> /// <param name="route">The route</param> /// <param name="configuration">The route's configuration</param> public AttributeRouteVisitor(IAttributeRoute route, ConfigurationBase configuration) { if (route == null) { throw new ArgumentNullException("route"); } if (configuration == null) { throw new ArgumentNullException("configuration"); } _route = route; _configuration = configuration; }
public static void Test() { IConfigurationScopeRegistry registry = new ConfigurationScopeRegistry(); registry.MapScope("Static", new StaticConfigurationScope()); ConfigurationBase configuration = new ConfigurationBase(registry, new EmptyConfigurationScope()); configuration.MapProperty <IsDebugProperty>(); ModuleConfiguration module = new ModuleConfiguration(configuration); Console.WriteLine(module.IsDebug); }
private void DataConfigurationForm_FormClosing(object sender, FormClosingEventArgs e) { var allConfigs = ConfigurationsManager.GetAllConfigurations; for (int i = 0; i < allConfigs.Count; i++) { bool isSaved = ConfigurationBase.Save(allConfigs[i], out Exception ex); if (!isSaved) { Messages.SaveFileException(ex); } } }
public void Write(ConfigurationBase configurationBase, List <ITransferObject> transferObjects, IOutput output) { AngularWriteConfiguration configuration = (AngularWriteConfiguration)configurationBase; List <FileTemplate> files = new List <FileTemplate>(); if (configuration.Service != null) { this.resolver.Create <AngularServiceWriter>().Write(configuration, transferObjects, files); } if (configuration.WriteModels) { this.resolver.Create <AngularModelWriter>().Write(configuration, transferObjects, files); } files.ForEach(file => configuration.Language.Write(file, output)); }
/// <summary> /// /// </summary> /// <param name="navigationManager"></param> /// <param name="httpClientFactory"></param> /// <param name="config"></param> public AppState(NavigationManager navigationManager, IHttpClientFactory httpClientFactory, ConfigurationBase config) : base(navigationManager, httpClientFactory) { //RWM: We don't do this here because this is Singleton scoped and the AuthProvider is not //this.AuthenticationStateProvider = authStateProvider; this.config = config; var nav = new List <NavigationItem> { new NavigationItem("Dashboard", "fad fa-fw fa-desktop", "/", "Main", true, "Dashboard", "fad fa-fw fa-2x fa-desktop", null, true), new NavigationItem("LoadingContainer Demo", "fad fa-fw fa-desktop", "LoadingContainer", "Controls", true, "LoadingContainer Demo", "fad fa-fw fa-2x fa-desktop", null, true) }; LoadNavItems(nav); this.PropertyChanged += AppState_PropertyChanged; }
public virtual void Write(ConfigurationBase configurationBase, List <ITransferObject> transferObjects, IOutput output) { AspDotNetWriteConfiguration configuration = (AspDotNetWriteConfiguration)configurationBase; List <FileTemplate> files = new List <FileTemplate>(); if (configuration.GeneratorController != null) { this.resolver.Create <AspDotNetGeneratorControllerWriter>().Write(configuration, files); } if (configuration.Controllers.Count > 0) { this.resolver.Create <AspDotNetEntityControllerWriter>().Write(configuration, transferObjects, files); } files.ForEach(file => configuration.Language.Write(file, output)); }
public void Read(ConfigurationBase configurationBase, List <ITransferObject> transferObjects) { Logger.Trace("Read OpenApi..."); OpenApiReadConfiguration configuration = (OpenApiReadConfiguration)configurationBase; if (configuration.File != null) { this.fileReader.Read(configuration.File, transferObjects); } if (configuration.Url != null) { this.urlReader.Read(configuration.File, transferObjects); } this.documentReader.Read(configuration, transferObjects); }
public void Read(ConfigurationBase configurationBase, List <ITransferObject> transferObjects) { ReflectionReadConfiguration configuration = (ReflectionReadConfiguration)configurationBase; Type type = GeneratorTypeLoader.Get(configuration, configuration.Assembly, configuration.Namespace, configuration.Name); if (type != null) { ModelTransferObject selfModel = this.modelReader.Read(type, transferObjects); if (configuration.SkipSelf) { transferObjects.Remove(selfModel); Logger.Trace($"{selfModel.Name} ({selfModel.Namespace}) skipped through configuration"); } } }
public void BlazorEssentialsAuthorizationMessageHandler_LoadsCorrectUrls() { var config = new ConfigurationBase { ApiRoot = "https://test1", AppRoot = "https://test2" }; var state = new BlazorEssentialsAuthorizationMessageHandler <ConfigurationBase>(config, null, null); state.Should().NotBeNull(); var privateObject = new PrivateObject(state, new PrivateType(typeof(AuthorizationMessageHandler))); var uris = privateObject.GetField("_authorizedUris") as Uri[]; uris.Should().NotBeNull().And.HaveCount(2); }
public static Bitmap MapConfigurationToImage(ConfigurationBase <P, V> config, SpecificationBase <P, V> Spec, int imageSize) { string ExampleName = Spec.SpecificationName; try { ExpressionValue value; switch (ExampleName) { case "Sliding Game": value = config.GlobalEnv.Variables["board"]; return(DrawSlidingBoard(EvaluatorDenotational.GetValueFromExpression(value) as int[], imageSize)); case "Shunting Game": value = config.GlobalEnv.Variables["board"]; int c = (config.GlobalEnv.Variables["c"] as IntConstant).Value; int r = (config.GlobalEnv.Variables["r"] as IntConstant).Value; //row int N = (Spec.GlobalConstantDatabase["N"] as IntConstant).Value; //col int M = (Spec.GlobalConstantDatabase["M"] as IntConstant).Value; Point shunter = new Point(c, r); //DrawShunterBoard //return DrawShunterBoard(EvaluatorDenotational.GetValueFromExpression(value) as int[], imageSize); Point[] crossPos = { new Point(2, 2), new Point(2, 3), new Point(3, 2), new Point(3, 3) }; return(DrawShunterBoard(EvaluatorDenotational.GetValueFromExpression(value) as int[], shunter, crossPos, M, N, imageSize, imageSize)); //case "Dining Philosopher": // int numberOfPhilosophers = 5; // PhilosopherStatus[] philosopherStatuses = new PhilosopherStatus[numberOfPhilosophers]; // philosopherStatuses[0] = PhilosopherStatus.Thinking; // philosopherStatuses[1] = PhilosopherStatus.Eating; // philosopherStatuses[2] = PhilosopherStatus.Thinking; // philosopherStatuses[3] = PhilosopherStatus.Thinking; // philosopherStatuses[4] = PhilosopherStatus.HaveLeftFork; // return DrawDiningPhilosopher(imageSize, philosopherStatuses); } } catch (Exception) { } return(null); }
/// <summary> /// Checks whether two <see cref="DifferentialEvolutionStrategyConfiguration"/>s are compatible in a technical /// sense for one to be used in a continued tuning based on a tuning using the other. /// <para>The difference to <see cref="IsCompatible"/> is that this function only checks for technical /// compatibility and does not consider whether the combination of configurations is compatible in the sense /// that the continued tuning looks like a longer single tuning.</para> /// </summary> /// <param name="other">Configuration used for the start of tuning.</param> /// <returns>True iff this configuration can be used for continued tuning.</returns> public override bool IsTechnicallyCompatible(ConfigurationBase other) { if (!base.IsTechnicallyCompatible(other)) { return(false); } if (!(other is DifferentialEvolutionStrategyConfiguration otherConfig)) { return(false); } // If we are in the middle of a JADE phase running on (quasi-)continuous parameters only, // a change in definition is a problem. return(this.MinimumDomainSize == otherConfig.MinimumDomainSize && this.DifferentialEvolutionConfiguration.IsTechnicallyCompatible(otherConfig.DifferentialEvolutionConfiguration)); }
public void DoesNotThrowExceptionsIfLoggerNotCreatable() { var configuration = new ConfigurationBase { Logger = new TypeConfiguration { TypeName = "Sem.Authentication.MvcHelper.A598D4BDB7244B62A4A158201C118882, Sem.Authentication.MvcHelper", } }; var target = new SampleAuthenticator(configuration); target.LogException(new Exception("Sample")); var result = target.InternalLogger; Assert.IsNull(result); }
public void CreatesCallsAuditForSuccessByDefault() { var configuration = new ConfigurationBase { Audit = new TypeConfiguration { TypeName = "Sem.Authentication.AppInfrastructure.DebugAudit, Sem.Authentication", } }; var target = new SampleAuthenticator(configuration); target.AuditEvent(MvcTestBase.CreateRequestContext()); var result = target.InternalAudit; Assert.IsNotNull(result); }
public void CreatesStandardLogger() { var configuration = new ConfigurationBase { Logger = new TypeConfiguration { TypeName = "Sem.Authentication.AppInfrastructure.DebugLogger, Sem.Authentication", } }; var target = new SampleAuthenticator(configuration); target.LogException(new Exception("Sample")); var result = target.InternalLogger; Assert.IsNotNull(result); }
protected virtual void Dispose(bool disposing) { if (!disposed) { if (disposing) { _config = null; _model = null; if (_view != null) { _view.CloseForm(); } _view = null; } disposed = true; } }
/// <summary> /// Checks whether two <see cref="ConfigurationBase"/>s are compatible in a technical sense for one /// to be used in a continued run based on a run using the other. /// <para>In this case, this is the same as <see cref="IsCompatible"/>, /// because the random forest is not re-initialized on continue.</para> /// </summary> /// <param name="other">Configuration used for the start of run.</param> /// <returns>True iff this configuration can be used for continued run.</returns> public override bool IsTechnicallyCompatible(ConfigurationBase other) { if (!(other is GenomePredictionRandomForestConfig cast)) { return(false); } return(this.TreeCount == cast.TreeCount && this.MinimumSplitSize == cast.MinimumSplitSize && this.MaximumTreeDepth == cast.MaximumTreeDepth // ReSharper disable once CompareOfFloatsByEqualityOperator && this.FeaturesPerSplitRatio == cast.FeaturesPerSplitRatio // ReSharper disable once CompareOfFloatsByEqualityOperator && this.MinimumInformationGain == cast.MinimumInformationGain // ReSharper disable once CompareOfFloatsByEqualityOperator && this.SubSampleRatio == cast.SubSampleRatio && this.RunParallel == cast.RunParallel); }
public virtual void Write(ConfigurationBase configurationBase, List <ITransferObject> transferObjects, IOutput output) { EntityFrameworkWriteConfiguration configuration = (EntityFrameworkWriteConfiguration)configurationBase; if (!configuration.Language.IsCsharp()) { throw new InvalidOperationException("EntityFramework support only Csharp"); } configuration.Namespace.AssertIsNotNull(nameof(configuration.Namespace), "ef and ef-core writer requires a namespace"); List <FileTemplate> files = new List <FileTemplate>(); if (configuration.Repositories.Count > 0) { this.resolver.Create <EntityFrameworkRepositoryWriter>().Write(configuration, transferObjects, files); } this.resolver.Create <EntityFrameworkDataContextWriter>().Write(configuration, transferObjects, files); files.ForEach(file => configuration.Language.Write(file, output)); }
public ItemCollectorMod() { Log.Info($"Initalizing {nameof(ItemCollectorMod)}"); _config = ConfigurationBase.LoadConfiguration <ItemCollectorConfiguration>(); ItemFinder.ConnectorItems = new List <string>(_config.ItemsToConsiderConnectors.Split(',').Select(v => v.Trim())); ItemFinder.ConnectorFloorings = _config.FlooringsToConsiderConnectors; var machinesToCollectFrom = _config.MachinesToCollectFrom.Split(',').Select(v => v.Trim()).ToList(); var locationsToSearch = _config.LocationsToSearch.Split(',').Select(v => v.Trim()).ToList(); _machinesProcessor = new MachinesProcessor(machinesToCollectFrom, locationsToSearch, _config.AddBuildingsToLocations, _config.AllowDiagonalConnectionsForAllItems) { MuteWhileCollectingFromMachines = Math.Max(0, Math.Min(5000, _config.MuteWhileCollectingFromMachines)) }; _animalHouseProcessor = new AnimalHouseProcessor(_config.PetAnimals, _config.AdditionalFriendshipFromCollecting, _config.MuteAnimalsWhenCollecting); }
public IConfigirationControl GetConfigControl(ConfigurationBase config) { var textToSpeechConfig = (TextToSpeechConfiguration)config; return new SettingsControl(textToSpeechConfig); }
public void SetConfiguration(ConfigurationBase configuration) { this.configuration = (LightPluginConfiguration) configuration; this.DeviceName = this.configuration.Device; this.ExecutablePath = this.configuration.Path; this.SocketName = this.configuration.Socket; this.Miliseconds = this.configuration.Miliseconds; }
/// <summary> /// Sets plugin configuration. /// </summary> /// <param name="instance">The configuration.</param> public void SetConfiguration(ConfigurationBase instance) { configuration = instance as HudsonPollerConfiguration; if (configuration == null) { throw new ApplicationException("Configuration can not be null."); } RestartTimer(); }
public IConfigirationControl GetConfigControl(ConfigurationBase config) { var control = new HudsonPollerConfigurationControl(); var hudsonConfig = (HudsonPollerConfiguration)config; control.DataContext = new HudsonPollerConfigurationControl.ViewModel { Address = hudsonConfig.Address, Username = hudsonConfig.Username, Password = hudsonConfig.Password, PollInterval = hudsonConfig.PollInterval, Project = hudsonConfig.Project }; return control; }
/// <summary> /// Helper for configuring areas when initializing AttributeRouting framework. /// </summary> public AreaConfiguration(string name, ConfigurationBase configuration) { _name = name; _configuration = configuration; }
public IConfigirationControl GetConfigControl(ConfigurationBase config) { return new TeamFoundationSettingsControl((TeamFoundationConfiguration)config); }
/// <summary> /// Install a Daemon /// </summary> /// <param name="machineID">Machine ID</param> /// <param name="mapPath">An Aneka Daemon Binaries path for future uses</param> public void InstallDaemon(int machineID, string mapPath) { try { CloudWebPortal.Areas.Aneka.Models.Machine machine = db.Machines.Find(machineID); global::Aneka.PAL.Management.Model.Machine AnekaMachine = machineManagment.ToAnekaPALMachine(machine); Daemon daemon = machine.Daemon; Configuration rootWebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/"); String RepoAccessURL = rootWebConfig.AppSettings.Settings["RepoAccessURL"].Value; String RepoAccessUser = rootWebConfig.AppSettings.Settings["RepoAccessUser"].Value; String RepoAccessPassword = rootWebConfig.AppSettings.Settings["RepoAccessPassword"].Value; //Repository Group Property Method = new Property("Method", "File"); Property Location = new Property("Location", RepoAccessURL); Property Username = new Property("Username", RepoAccessUser); Property Password = new Property("Password", RepoAccessPassword); Property Platform = new Property("Platform", "Windows"); PropertyGroup RepositoryGroup = new PropertyGroup("Repository"); RepositoryGroup.Add(Method); RepositoryGroup.Add(Location); RepositoryGroup.Add(Username); RepositoryGroup.Add(Password); RepositoryGroup.Add(Platform); //Send Loader Binaries //string anekaDaemonBinaries = mapPath + "Repository\\Daemon\\"; string RepoLocalLocation = rootWebConfig.AppSettings.Settings["RepoLocalLocation"].Value; Property DaemonPort = new Property("Port", daemon.Port); Property FreshInstall = new Property("FreshInstall", "True"); Property EnableAutoUpdate = new Property("EnableAutoUpdate", "False"); Property DaemonHomeDirectory = new Property("HomeDirectory", daemon.Directory + "\\Runtime\\Daemon\\"); PropertyGroup DaemonGroup = new PropertyGroup("Daemon"); DaemonGroup.Add(DaemonPort); DaemonGroup.Add(FreshInstall); DaemonGroup.Add(EnableAutoUpdate); DaemonGroup.Add(DaemonHomeDirectory); ConfigurationBase daemonInstallerConfig = new ConfigurationBase(); daemonInstallerConfig.Add(DaemonGroup); daemonInstallerConfig.Add(RepositoryGroup); machine.isInProgress = true; machine.ProgressMesage = "Installing Binaries"; db.SaveChanges(); daemonManager.Install(AnekaMachine, daemonInstallerConfig, RepoLocalLocation + "\\Loader\\" ); finishedActivity(machineID); } catch (Exception ex) { CloudWebPortal.Areas.Aneka.Models.Machine machine = db.Machines.Find(machineID); machine.StatusEnum = DaemonProbeStatus.Unknown; machine.ProgressMesage = "Error while stopping daemon: " + ex.Message; machine.isInProgress = false; db.SaveChanges(); } }
public void SetConfiguration(ConfigurationBase configuration) { this.configuration = configuration as TextToSpeechConfiguration; InitConfiguration(); }
public AttributeReflector(ConfigurationBase configuration) { if (configuration == null) throw new ArgumentNullException("configuration"); _configuration = configuration; }
public void SetConfiguration(ConfigurationBase configuration) { this.configuration = (SoundPluginConfiguration) configuration; }