public static IContainer UseDatenMeisterDotNet(this ContainerBuilder kernel, IntegrationSettings settings) { settings.Hooks = new DotNetIntegrationHooks(); var integration = new Integration(settings); return integration.UseDatenMeister(kernel); }
public void Register_roll(int[] rolls, int nFrames, int totalScore) { var sut = new Integration(new Frames(), new Scorer()); var results = new List<Game>(); sut.Result += results.Add; rolls.ToList() .ForEach(sut.Register_roll); Assert.AreEqual(nFrames, results.Last().Frames.Count()); Assert.AreEqual(totalScore, results.Last().Score); Assert.IsTrue(results[rolls.Length-1].Finished); Assert.IsFalse(results[rolls.Length-2].Finished); }
public Task <InvokeResult> UpdateInstanceAsync([FromBody] Integration integration) { SetUpdatedProperties(integration); return(_integrationManager.UpdateIntegrationAsync(integration, OrgEntityHeader, UserEntityHeader)); }
protected virtual void Start() { // Verify application. You can handle result in OnComplete callback Integration.IsApplicationEntitled().OnComplete(EntitlementCheckCallback); }
public LinkViewModel(Integration selectedIntegration) { SelectedIntegration = selectedIntegration; }
public HttpRepository(IHttpClientFactory clientFactory, Integration integration) { _clientFactory = clientFactory; _client = _clientFactory.CreateClient(integration.Description()); }
internal override double BerechneAuftriebsdrehmoment(Punkte punkte, double v, double alpha, double beta, Integration integrator) { Func <double, double> integrand1 = l => Parameter.rhoL / 2 * cA(l, alpha, beta) * Math.Pow(vW(l, v), 2) * profil(l); Func <double, double> integrand2 = l => Parameter.rhoL / 2 * Math.Cos(Punkte.Phi1(beta)) * l * cA(l, alpha, beta) * Math.Pow(vW(l, v), 2) * profil(l); return(punkte.P4.x * integrator.Integriere(integrand1, 0.0, Parameter.l5b) + integrator.Integriere(integrand2, 0.0, Parameter.l5b)); }
public void Stop() { Integration.Unpublish(new Guid("C0C052A5-5F5B-41F7-9390-D091F66D9B75")); }
internal override double BerechneAuftriebsdrehmoment(Punkte punkte, double v, double alpha, double beta, Integration integrator) { Func <double, double> integrand = l => Parameter.rhoL / 2 * Math.Cos(alpha) * l * cA(l, alpha, beta) * Math.Pow(vW(l, v), 2) * profil(l); return(-integrator.Integriere(integrand, 0.0, Parameter.l1b)); }
public async Task HandleAsync <TException>(TException ex, Integration sourceIntegration) where TException : Exception { await AttemptToHandleException(ex, sourceIntegration); }
internal override double BerechneWiderstandsdrehmoment(Punkte punkte, double v, double alpha, double beta, Integration integrator) { Func <double, double> integrand1 = l => Parameter.rhoL / 2 * cW(l, alpha, beta) * Math.Pow(vW(l, v), 2) * profil(l); Func <double, double> integrand2 = l => Parameter.rhoL / 2 * Math.Sin(Punkte.Phi3(beta)) * l * cW(l, alpha, beta) * Math.Pow(vW(l, v), 2) * profil(l); return(-punkte.P12.y * integrator.Integriere(integrand1, -Parameter.l4, Parameter.l6b) - integrator.Integriere(integrand2, -Parameter.l4, Parameter.l6b)); }
internal override Vektor2 BerechneWiderstandskraft(double v, double alpha, double beta, Integration integrator) { Func <double, double> integrand = l => Parameter.rhoL / 2 * cW(l, alpha, beta) * Math.Pow(vW(l, v), 2) * profil(l); return(new Vektor2(integrator.Integriere(integrand, -Parameter.l4, Parameter.l6b), 0.0)); }
public JobInstance(JobQueueRequest queueRequest, Guid jobInstanceGuid, Integration integration, Job jobToRun, DataSource sourceDataSource, DataSource targetDataSource, List <JobStepInstance> jobStepInstances, DateTime scheduledStartTime, string invocationSource, JobInvocationSourceType invocationSourceType, List <JobFilter> filters = null) { if (integration == null) { throw new Exception("Integration can not be null."); } if (jobToRun == null) { throw new Exception("Job to run can not be null."); } if (sourceDataSource == null) { throw new Exception("Source-side data source can not be null."); } if (jobToRun.SourceDataSources.Where(d => d.Value.Id == sourceDataSource.Id).Count() == 0) { throw new Exception(string.Format("'{0}' ({1}) is not associated with job '{2}' ({3}) as a source-side data source.", sourceDataSource.Name, sourceDataSource.Id, jobToRun.Name, jobToRun.Id)); } if (targetDataSource == null) { throw new Exception("Target-side data source can not be null."); } if (jobToRun.TargetDataSource.Id != targetDataSource.Id) { throw new Exception(string.Format("'{0}' ({1}) is not associated with job '{2}' ({3}) as the target-side data source.", targetDataSource.Name, targetDataSource.Id, jobToRun.Name, jobToRun.Id)); } if (jobStepInstances == null || jobStepInstances.Count == 0) { throw new Exception(string.Format("At least one job step is required for queued job '{0}'. The job will not be executed.", jobToRun.Name)); } QueueRequest = queueRequest; if (jobInstanceGuid == Guid.Empty) { Id = Guid.NewGuid(); } else { Id = jobInstanceGuid; } Integration = integration; Job = jobToRun; if (JobQueueManager.Configurator == null) { SourceDataSource = new JobDataSource(SyncSide.Source, sourceDataSource); TargetDataSource = new JobDataSource(SyncSide.Target, targetDataSource); SyncEngineLogger.WriteToLog(LogEntryType.Warning, integration, "Update history could not be set for source and target data sources. No configurator has been set for the JobQueueManager."); } else { var runHistory = JobQueueManager.Configurator.GetJobDataSourceRunHistory(jobToRun.Id, sourceDataSource.Id, targetDataSource.Id); SourceDataSource = new JobDataSource(SyncSide.Source, sourceDataSource, runHistory); TargetDataSource = new JobDataSource(SyncSide.Target, targetDataSource, runHistory); } if (filters != null) { _filters = filters; } _jobStepInstances = jobStepInstances.OrderBy(d => d.OrderIndex).ToList(); ScheduledStartTime = scheduledStartTime; InvocationSource = invocationSource; InvocationSourceType = invocationSourceType; Id = Guid.NewGuid(); foreach (var jobStepInstance in _jobStepInstances) { jobStepInstance.AssociatedJobInstance = this; } }
public JobInstance(JobQueueRequest queueRequest, Integration integration, Job jobToRun, DataSource sourceDataSource, DataSource targetDataSource, List <JobStepInstance> jobStepInstances, DateTime scheduledStartTime, string invocationSource, JobInvocationSourceType invocationSourceType, List <JobFilter> filters = null) : this(queueRequest, Guid.Empty, integration, jobToRun, sourceDataSource, targetDataSource, jobStepInstances, scheduledStartTime, invocationSource, invocationSourceType, filters) { }
/// <summary> /// This method is used to figure out whether an integration was filtered out /// </summary> /// <param name="sourceIntegration"></param> /// <returns></returns> public static bool WasFilteredOut(this Integration sourceIntegration) { return(sourceIntegration.Headers.ContainsKey(FilteredOut)); }
public void WriteToLog(LogEntryType logEntryType, Integration integration, DataSource dataSource, JobInstance jobInstance, JobStepInstance jobStepInstance, string message) { string path = null; for (int i = 0; i <= NUMBER_OF_FILEACCESS_RETRIES; i++) { try { if (integration == null) { path = GetServiceLogPathAndFileName(); } else { path = GetIntegrationLogPathAndFileName(integration); } break; } catch (IOException) { if (i == NUMBER_OF_FILEACCESS_RETRIES) { throw; } else { Thread.Sleep(DELAY_ON_FILEACCES_RETRY); } } } lock (_lock) { for (int i = 0; i <= NUMBER_OF_FILEACCESS_RETRIES; i++) { try { using (TextWriter log = File.AppendText(path)) { StringBuilder logLine = new StringBuilder(); logLine.Append(DateTime.Now); logLine.Append("\t"); logLine.Append(logEntryType); logLine.Append("\t"); if (integration == null) { logLine.Append("N/A"); } else { logLine.Append(string.Format("{0} ({1})", integration.Name, integration.Id)); } logLine.Append("\t"); if (dataSource == null) { logLine.Append("N/A"); } else { logLine.Append(string.Format("{0} ({1})", dataSource.Name, dataSource.Id)); } logLine.Append("\t"); if (jobInstance == null) { logLine.Append("N/A\tN/A\tN/A\tN/A\t"); } else { logLine.Append(string.Format("{0} ({1})", jobInstance.Job.Name, jobInstance.Job.Id)); logLine.Append("\t"); logLine.Append(string.Format("{0} ({1})", jobInstance.QueueRequest.InvocationSourceType, jobInstance.QueueRequest.Id)); logLine.Append("\t"); logLine.Append(jobInstance.Id); logLine.Append("\t"); logLine.Append(JobFilterHelper.GetTextForDatabase(jobInstance.Filters)); logLine.Append("\t"); } if (jobStepInstance == null) { logLine.Append("N/A\tN/A\t"); } else { logLine.Append(string.Format("{0} ({1})", jobStepInstance.JobStep.Name, jobStepInstance.JobStep.Id)); logLine.Append("\t"); logLine.Append(jobStepInstance.Id); logLine.Append("\t"); } logLine.Append(message); log.WriteLine(logLine); log.Flush(); log.Close(); if (integration == null) { serviceLogFileInfo.CurrentFileSizeInBytes += logLine.Length; } else { logFileInfoByIntegrationId[integration.Id].CurrentFileSizeInBytes += logLine.Length; } } break; } catch (IOException) { if (i == NUMBER_OF_FILEACCESS_RETRIES) { throw; } else { Thread.Sleep(DELAY_ON_FILEACCES_RETRY); } } } } }
//Constructors public Game_Engine() { this.plst = new List<Particle>(); this.collisionEngine = new Wall_Collision(); this.integrationEngine = new Integration(); }
public void CardisOpenedfromTableTest() { Integration.VerifySingleCardOpening(); }
public void DeleteIntegration() { Integration.Delete(new Guid("C0C052A5-5F5B-41F7-9390-D091F66D9B75")); }
//bug LN-77 public void DataonDharmaCardformTableCorrespondingTest() { Integration.VerifyDataonDharmaCardcorrespondsDataFromTable(); }
internal override Vektor2 BerechneAuftriebskraft(double v, double alpha, double beta, Integration integrator) { Func <double, double> integrand = l => Parameter.rhoL / 2 * cA(l, alpha, beta) * Math.Pow(vW(l, v), 2) * profil(l); return(new Vektor2(0.0, integrator.Integriere(integrand, 0.0, Parameter.l5b))); }
public void LoanAmountDisplayDharmaTest() { Integration.VerifyLoanAmountisTheSameinTableandOnCard(); }
public static void StartListen(Setting settings, string targetHost, string hostName, Integration integration, RichTextBox log) { //Port = port; TargetHost = targetHost; HostName = hostName; Log = log; //Listener = new TcpListener(IPAddress.Any, Port); ProxySettings = settings; IntegrationService = integration; Listener.Start(); new Task(() => { while (true) { var client = Listener.AcceptTcpClient(); new Task(() => AcceptConnection(client)).Start(); } }).Start(); }
public void CollateralAmountDisplayeDharmaTest() { Integration.VerifyCollateralistheSameThroughTableandCard(); }
public async Task <Integration> UpdateIntegration(Integration integration) { var updatedIntegration = await _repository.Update(integration); return(updatedIntegration); }
public void DataonMakerDaoCardthroughTableandCardTest() { Integration.VerifyDataonMakerDaoCardcorrespondsDataFromTable(); }
public void SetUp() { Db.Recreate(); _tdsClient = new TdsClient(Integration.GetTdsHttpClient(), Integration.CreateLogger <TdsClient>()); }
public void CollateralAmountDisplayeMakerDaoTest() { Integration.VerifyCollateralistheSameThroughTableandCardMakerDao(); }
public Task <InvokeResult> AddInstanceAsync([FromBody] Integration integration) { return(_integrationManager.AddIntegrationAsync(integration, OrgEntityHeader, UserEntityHeader)); }
public void DharmaDataAvailabilityonCardTest() { Integration.VerifyAllDataloadedDharma(); }
public void Integration_Has_Roles() { var integration = new Integration(); Assert.IsAssignableFrom <List <Role> >(integration.Roles); }
public void MakerDaoDataAvailabilityonCardTest() { Integration.VerifyAllDataloadedMakerDao(); }
/// <summary> /// This method is ued to flag the integration as having been filtered out /// </summary> /// <param name="integration"></param> /// <param name="filteredOutReason"></param> public static void SetFilteredOut(this Integration integration, string filteredOutReason) { integration.AddHeader(FilteredOut, null); integration.AddHeader(FilteredOutReason, filteredOutReason); }
//Methods //public public void Initialise(float fluid_width, float fluid_height, Vector3[,] Config) { adjustment = 0.2f; integrationEngine = new Integration(); fluidmaxwidth = fluid_width; fluidmaxheight = fluid_height; InitialiseParticles(Config); this.fluidEngine = new SPH_Engine(plst.Count); fluidEngine.CreateSpringArray(); }