예제 #1
0
        public static IContainer UseDatenMeisterDotNet(this ContainerBuilder kernel, IntegrationSettings settings)
        {
            settings.Hooks = new DotNetIntegrationHooks();

            var integration = new Integration(settings);
            return integration.UseDatenMeister(kernel);
        }
예제 #2
0
        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));
 }
예제 #4
0
 protected virtual void Start()
 {
     // Verify application. You can handle result in OnComplete callback
     Integration.IsApplicationEntitled().OnComplete(EntitlementCheckCallback);
 }
예제 #5
0
 public LinkViewModel(Integration selectedIntegration)
 {
     SelectedIntegration = selectedIntegration;
 }
예제 #6
0
 public HttpRepository(IHttpClientFactory clientFactory, Integration integration)
 {
     _clientFactory = clientFactory;
     _client        = _clientFactory.CreateClient(integration.Description());
 }
예제 #7
0
        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));
        }
예제 #8
0
 public void Stop()
 {
     Integration.Unpublish(new Guid("C0C052A5-5F5B-41F7-9390-D091F66D9B75"));
 }
예제 #9
0
        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));
        }
예제 #10
0
 public async Task HandleAsync <TException>(TException ex, Integration sourceIntegration) where TException : Exception
 {
     await AttemptToHandleException(ex, sourceIntegration);
 }
예제 #11
0
        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));
        }
예제 #12
0
        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));
        }
예제 #13
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;
            }
        }
예제 #14
0
 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)
 {
 }
예제 #15
0
 /// <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));
 }
예제 #16
0
        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);
                        }
                    }
                }
            }
        }
예제 #17
0
 //Constructors
 public Game_Engine()
 {
     this.plst = new List<Particle>();
     this.collisionEngine = new Wall_Collision();
     this.integrationEngine = new Integration();
 }
예제 #18
0
 public void CardisOpenedfromTableTest()
 {
     Integration.VerifySingleCardOpening();
 }
예제 #19
0
 public void DeleteIntegration()
 {
     Integration.Delete(new Guid("C0C052A5-5F5B-41F7-9390-D091F66D9B75"));
 }
예제 #20
0
 //bug LN-77
 public void DataonDharmaCardformTableCorrespondingTest()
 {
     Integration.VerifyDataonDharmaCardcorrespondsDataFromTable();
 }
예제 #21
0
        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)));
        }
예제 #22
0
 public void LoanAmountDisplayDharmaTest()
 {
     Integration.VerifyLoanAmountisTheSameinTableandOnCard();
 }
예제 #23
0
        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();
        }
예제 #24
0
 public void CollateralAmountDisplayeDharmaTest()
 {
     Integration.VerifyCollateralistheSameThroughTableandCard();
 }
예제 #25
0
        public async Task <Integration> UpdateIntegration(Integration integration)
        {
            var updatedIntegration = await _repository.Update(integration);

            return(updatedIntegration);
        }
예제 #26
0
 public void DataonMakerDaoCardthroughTableandCardTest()
 {
     Integration.VerifyDataonMakerDaoCardcorrespondsDataFromTable();
 }
예제 #27
0
 public void SetUp()
 {
     Db.Recreate();
     _tdsClient = new TdsClient(Integration.GetTdsHttpClient(), Integration.CreateLogger <TdsClient>());
 }
예제 #28
0
 public void CollateralAmountDisplayeMakerDaoTest()
 {
     Integration.VerifyCollateralistheSameThroughTableandCardMakerDao();
 }
 public Task <InvokeResult> AddInstanceAsync([FromBody] Integration integration)
 {
     return(_integrationManager.AddIntegrationAsync(integration, OrgEntityHeader, UserEntityHeader));
 }
예제 #30
0
 public void DharmaDataAvailabilityonCardTest()
 {
     Integration.VerifyAllDataloadedDharma();
 }
예제 #31
0
        public void Integration_Has_Roles()
        {
            var integration = new Integration();

            Assert.IsAssignableFrom <List <Role> >(integration.Roles);
        }
예제 #32
0
 public void MakerDaoDataAvailabilityonCardTest()
 {
     Integration.VerifyAllDataloadedMakerDao();
 }
예제 #33
0
 /// <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);
 }
예제 #34
0
 //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();
 }