Ejemplo n.º 1
0
 protected override void BeforeBlockWrite(Block block, PipelineInfo pipelineInfo)
 {
     if (_writeFail)
     {
         throw new ExpectedException();
     }
 }
Ejemplo n.º 2
0
        /*internal Vector MakeModelCleanRotation(PipelineInfo info)
         * {
         *  Vector rotated = info.GetModelMatrix().CleanRotation().MultipliedBy(this);
         *  return rotated;
         * }*/

        internal Vector Render(IDisplayer displayer, PipelineInfo info)
        {
            Vector viewVector = info.GetViewMatrix().MultipliedBy(this);
            Vector clipVector = info.GetProjectionMatrix().MultipliedBy(viewVector);

            if (!IsInView(clipVector))
            {
                return(null);
            }
            Vector ndcVector    = clipVector.Clone().DivideByW();
            Matrix screenMatrix = Matrix.Screen(info.GetScreenWidth(), info.GetScreenHeight());
            Vector screenVector = screenMatrix.MultipliedBy(ndcVector);

            screenVector.y = info.GetScreenHeight() - screenVector.y; // TODO: Beware of exception

            /*if (x == 4 && y == 10 && z == 3)
             * {
             *  Console.WriteLine("world = " + ToString());
             *  Console.WriteLine("VIEW MATRIX: \n" + info.GetViewMatrix());
             *  Console.WriteLine("view = " + viewVector);
             *  Console.WriteLine("PROJECTION MATRIX: \n" + info.GetProjectionMatrix());
             *  Console.WriteLine("clip = " + clipVector);
             *  Console.WriteLine("ndc = " + ndcVector);
             *  Console.WriteLine("screen = " + screenVector);
             *  Console.WriteLine();
             * }*/
            /*if (info.ShouldRenderLines())
             * {
             *  displayer.Display((int)screenVector.x, (int)screenVector.y, screenVector.z, Color.Black);
             * }*/
            return(screenVector);
        }
Ejemplo n.º 3
0
 internal void RenderFilling(IDisplayer displayer, PipelineInfo info, Color color)
 {
     if (shouldBeDisplayed)
     {
         RenderFillingScanLine(displayer, color, info.GetLights(), info.GetCameraPosition());
     }
 }
Ejemplo n.º 4
0
        public PipelineExecutionResult RunPipeline(OrderGroup og, bool transacted, bool loggingEnabled, String pipelineName, String pipelinePath)
        {
            PipelineBase            pipeline;
            PipelineExecutionResult res;
            PipelineInfo            pipeInfo = CreatePipelineInfo(pipelineName);

            // we attribute the pipeline's run with a log name and it needs to be the absolute path
            // also, it will overwrite the log if that file exists, so we add the orderform's name to provide some
            // sort of scheme that won't overwrite every log
            string pipelineLog = string.Format("{0}\\log\\{1}_{2}.log",
                                               pipelinePath.Substring(0, pipelinePath.LastIndexOf("\\")),
                                               og.OrderForms[0].ParentOrderGroup.Name,
                                               pipelineName);

            pipeline =
                new CommerceServer.Core.Runtime.Pipelines.OrderPipeline(name: pipelineName,
                                                                        pipelineConfigPath: pipelinePath,
                                                                        loggingEnabled: loggingEnabled,
                                                                        logPath: pipelineLog,
                                                                        transactional: transacted);
            res = og.RunPipeline(pipeInfo, pipeline);

            CheckPipelineResultAndPrintWarnings(og, res);

            //Calling dispose on PipelineInfo to release any unmanaged resources
            pipeInfo.Dispose();

            return(res);
        }
Ejemplo n.º 5
0
        private void ContextMenuStrip_Opened(object sender, EventArgs e)
        {
            if (Pipeline == null)
            {
                Pipeline = FormWrapper.GetPipeline();
            }
            if (Pipeline.SelectedItems.Count < 1)
            {
                return;
            }

            Tag = Pipeline.SelectedItems[0].Tag as PipelineInfo;
            if (!string.IsNullOrEmpty(Tag.LockInfo.LockedBy))
            {
                if (!Pipeline.ContextMenuStrip.Items.Contains(DoorBellItem))
                {
                    Pipeline.ContextMenuStrip.Items.Insert(0, DoorBellItem);

                    DoorBellItem.Click -= DoorBellItem_Click;
                    DoorBellItem.Click += DoorBellItem_Click;
                }
            }
            else
            {
                if (Pipeline.ContextMenuStrip.Items.Contains(DoorBellItem))
                {
                    Pipeline.ContextMenuStrip.Items.Remove(DoorBellItem);
                }
            }
        }
Ejemplo n.º 6
0
 internal void MakeModel(PipelineInfo info)
 {
     worldPosition = startPosition.Rotate(info).Translate(info);
     if (smooth)
     {
         normalVector = startPosition.Rotate(info).Normalize();
     }
 }
Ejemplo n.º 7
0
            protected override Block ReadBlock(int index, PipelineInfo pipelineInfo)
            {
                if (_readFail)
                {
                    throw new ExpectedException();
                }

                return(new Block(index, new MemoryStream()));
            }
Ejemplo n.º 8
0
        void ConfigureMarketingSystem(PipelineInfo pipeInfo, CacheManager cacheManager)
        {
            CommerceResource marketingResource = resources["Marketing"];

            string marketingConnStr = marketingResource["connstr_db_marketing"].ToString();

            string cleanedMarketingConnStr;

            CleanSqlClientConnectionString(marketingConnStr, out cleanedMarketingConnStr);

            CommerceServer.Core.Runtime.IDictionary marketingCacheDict = new Dictionary();
            marketingCacheDict["ConnectionString"] = marketingConnStr;
            marketingCacheDict["DefaultLanguage"]  = marketingResource["s_DefaultMarketingSystemLanguage"].ToString();

            ExpressionEvaluator exprEval = null;

            try
            {
                //Create the expression evaluator
                IExpressionStoreAdapter evaluatorStoreAdapter = new MarketingExpressionStoreAdapter(cleanedMarketingConnStr);
                exprEval = new ExpressionEvaluator();
                exprEval.Connect(evaluatorStoreAdapter);

                //Set Discounts cache.
                cacheManager.set_RefreshInterval("Discounts", 0);
                cacheManager.set_RetryInterval("Discounts", 60);
                cacheManager.set_CacheObjectProgId("Discounts", "Commerce.Dictionary");
                cacheManager.set_LoaderProgId("Discounts", "Commerce.CSFLoadDiscounts");
                marketingCacheDict["Evaluator"] = exprEval;
                cacheManager.set_LoaderConfig("Discounts", marketingCacheDict);
                cacheManager.set_WriterConfig("Discounts", marketingCacheDict);
                cacheManager.set_WriterProgId("Discounts", "Commerce.CSFWriteEvents");

                //Set Advertising cache.
                cacheManager.set_RefreshInterval("Advertising", 300);
                cacheManager.set_RetryInterval("Advertising", 60);
                cacheManager.set_CacheObjectProgId("Advertising", "Commerce.Dictionary");
                cacheManager.set_LoaderProgId("Advertising", "Commerce.CSFLoadAdvertisements");
                cacheManager.set_WriterConfig("Advertising", marketingCacheDict);
                cacheManager.set_WriterProgId("Advertising", "Commerce.CSFWriteEvents");

                pipeInfo["Evaluator"] = exprEval;
            }
            finally
            {
                if (exprEval != null)
                {
                    Marshal.ReleaseComObject(exprEval);
                }
                if (marketingCacheDict != null)
                {
                    Marshal.ReleaseComObject(marketingCacheDict);
                }
            }
        }
Ejemplo n.º 9
0
        public Task Execute(PipelineInfo context)
        {
            var serviceProvider = CreateServices();

            using (var scope = serviceProvider.CreateScope())
            {
                UpdateDatabase(scope.ServiceProvider);
            }

            return(_mazeTaskManager.Initialize());
        }
Ejemplo n.º 10
0
        internal bool Render(IDisplayer displayer, PipelineInfo info)
        {
            Vector isInCameraView = worldPosition.Render(displayer, info);

            if (isInCameraView == null)
            {
                return(false);
            }
            screenPosition = isInCameraView;
            return(true);
        }
Ejemplo n.º 11
0
        private void CheckRules(GVItemCollection Items = null)
        {
            foreach (GVItem item in Items)
            {
                PipelineInfo info = item.Tag as PipelineInfo;

                if (info.Info.ContainsKey("Loan.LoanAmount") && info.Info["Loan.LoanAmount"] != null && (((decimal)info.Info["Loan.LoanAmount"]) > 500000))
                {
                    item.BackColor = Color.Green;
                }
            }
        }
Ejemplo n.º 12
0
 internal bool CheckRenderFilling(IDisplayer displayer, PipelineInfo info, Color color)
 {
     if (!upperTriangle.CheckRenderFilling(displayer, info, color))
     {
         return(false);
     }
     if (!lowerTriangle.CheckRenderFilling(displayer, info, color))
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 13
0
        private void AddDataToPipelineInfo(ref PipelineInfo pipeInfo)
        {
            CacheManager   cacheManager = null;
            MessageManager msgManager   = null;

            //Need to add Payment Processor Pipeline collection
            PipelineBase creditCardPipelineProcessor = new CommerceServer.Core.Runtime.Pipelines.OrderPipeline("CreditCardProcessor", Constants.creditCardPaymentProcessortPcfFilePath, false, Constants.LogFilePath + "\\CreditCard.log", true);

            PipelineCollection pipeCollection = new PipelineCollection();

            pipeCollection.Add("CreditCardProcessor", creditCardPipelineProcessor);

            pipeInfo["pipelines"] = pipeCollection;

            try
            {
                //Create the Cachemanager object
                cacheManager = new CacheManager();

                //Create the Messagemanager object
                msgManager = new MessageManager();

                AddMessagesToMessageManager(msgManager, CultureInfo.CurrentUICulture.ToString(), 1033);
                AddMessagesToMessageManager(msgManager, "en-US", 1033);

                //Set the components in the dictionary
                ConfigureMarketingSystem(pipeInfo, cacheManager);
                ConfigureOrderSystem(pipeInfo, cacheManager);
                ConfigureCatalogSystem(pipeInfo);

                pipeInfo["MessageManager"]    = msgManager;
                pipeInfo["CommerceResources"] = resources;

                pipeInfo["cachemanager"] = cacheManager;

                //Need to explicitly specify the Discount cache name when running in non-ASP.Net environment
                pipeInfo.DiscountsCacheName = "Discounts";
            }
            finally
            {
                if (cacheManager != null)
                {
                    Marshal.ReleaseComObject(cacheManager);
                }
                if (msgManager != null)
                {
                    Marshal.ReleaseComObject(msgManager);
                }
            }
        }
        /// <summary>
        /// Run a step
        /// </summary>
        /// <param name="currentPipelineInfo"></param>
        /// <param name="workflowStep"></param>
        /// <param name="currentStepNumber"></param>
        /// <returns>The PipelineInfo to be passed to the next step</returns>
        private PipelineInfo RunParalleledPipelinedStep(PipelineInfo currentPipelineInfo)
        {
            if (!currentPipelineInfo.IsInProcess) // This job has been canceled.
                return currentPipelineInfo;

            ProcessorStep workflowStep = currentPipelineInfo.CurrentJob.WorkFlowSteps[currentPipelineInfo.CurrentStepNumber];
            try
            {
                workflowStep.RunStatus = FrameworkStepRunStatus.Waiting;
                if (workflowStep.RunMode == FrameworkStepRunMode.STA)
                    stepExecutor.RunFrameworkStep(currentPipelineInfo.WorkflowMessage, currentPipelineInfo.RetryStepTimes, workflowStep, currentPipelineInfo.CurrentJob, currentPipelineInfo.IsCheckDepends);
                else if (workflowStep.RunMode == FrameworkStepRunMode.MTA)
                    Task.Factory.StartNew(() => stepExecutor.RunFrameworkStep(currentPipelineInfo.WorkflowMessage, currentPipelineInfo.RetryStepTimes, workflowStep, currentPipelineInfo.CurrentJob, currentPipelineInfo.IsCheckDepends));
             
                currentPipelineInfo.CurrentStepNumber++;
                return currentPipelineInfo;
            }
            catch (Exception e)
            {
                WorkflowException exception = new WorkflowException("Error in framework step " + workflowStep.StepName, e);
                workflowStep.ExitMessage = e.Message;
                switch (workflowStep.OnError)
                {
                    case OnFrameworkStepError.RetryJob:
                        if (workflowStep.WaitBetweenRetriesMilliseconds > 0)
                            Thread.Sleep(workflowStep.WaitBetweenRetriesMilliseconds);
                        currentPipelineInfo.RetryJobTimes++;
                        Processor.ReportJobError(e, workflowStep, currentPipelineInfo.WorkflowMessage, currentPipelineInfo.CurrentJob);
                        // Try the job again
                        if (currentPipelineInfo.RetryJobTimes <= workflowStep.RetryTimes)
                            RunFrameworkJob(currentPipelineInfo.WorkflowMessage, currentPipelineInfo.RetryJobTimes, currentPipelineInfo.IsCheckDepends);
                        currentPipelineInfo.IsInProcess = false;
                        return currentPipelineInfo;
                    case OnFrameworkStepError.Skip:
                        // Skip this step. Doing nothing here will skip it
                        Processor.ReportJobError(e, workflowStep, currentPipelineInfo.WorkflowMessage, currentPipelineInfo.CurrentJob);
                        currentPipelineInfo.CurrentStepNumber++;
                        return currentPipelineInfo;
                    case OnFrameworkStepError.Exit:
                        // Push to to error queue with the error and do not continue to the next pipe
                        Processor.ReportJobError(e, workflowStep, currentPipelineInfo.WorkflowMessage, currentPipelineInfo.CurrentJob);
                        currentPipelineInfo.IsInProcess = false;
                        return currentPipelineInfo;
                    default:
                        return currentPipelineInfo;
                }
            }
        }
Ejemplo n.º 15
0
            public IReadOnlyList <Measurement> Perform(int count, [NotNull] Func <Stream, Stream, Settings, Pipeline> pipelineFactory)
            {
                var blockCount = new PipelineInfo(_source.Length, _settings.BlockSize).BlockCount;

                var measurements = new List <Measurement>(count);

                for (int i = 0; i < count; i++)
                {
                    _source.Seek(0, SeekOrigin.Begin);
                    _destination.SetLength(0);

                    var pipeline = pipelineFactory(_source, _destination, _settings);
                    measurements.Add(Measurement.Measure("", () => pipeline.Process(), blockCount));
                }

                return(measurements);
            }
Ejemplo n.º 16
0
        void ConfigureOrderSystem(PipelineInfo pipeInfo, CacheManager cacheManager)
        {
            CommerceResource transactionConfigResource = resources["Transaction Config"];
            string           transactionConfigConnStr  = transactionConfigResource["connstr_db_TransactionConfig"].ToString();
            string           cleanedTxConfigConnstr    = null;

            CleanSqlClientConnectionString(transactionConfigConnStr, out cleanedTxConfigConnstr);

            CommerceServer.Core.Runtime.IDictionary shippingMethodCacheDict = new Dictionary();
            shippingMethodCacheDict["ConnectionString"] = cleanedTxConfigConnstr;
            shippingMethodCacheDict["TableName"]        = "txVirtual_Directory";

            CommerceServer.Core.Runtime.IDictionary paymentMethodCacheDict = new Dictionary();
            paymentMethodCacheDict["ConnectionString"] = cleanedTxConfigConnstr;
            paymentMethodCacheDict["TableName"]        = "txVirtual_Directory";

            pipeInfo["TransactionConfigConnectionString"] = transactionConfigConnStr;
            try
            {
                //Set shipping method cache.
                cacheManager.set_RefreshInterval("ShippingManagerCache", 0);
                cacheManager.set_RetryInterval("ShippingManagerCache", 30);
                cacheManager.set_CacheObjectProgId("ShippingManagerCache", "Commerce.Dictionary");
                cacheManager.set_LoaderProgId("ShippingManagerCache", "Commerce.ShippingMethodCache");
                cacheManager.set_LoaderConfig("ShippingManagerCache", shippingMethodCacheDict);
                cacheManager.set_WriterConfig("ShippingManagerCache", shippingMethodCacheDict);

                //Set payment method cache.
                cacheManager.set_RefreshInterval("PaymentMethodCache", 0);
                cacheManager.set_RetryInterval("PaymentMethodCache", 30);
                cacheManager.set_CacheObjectProgId("PaymentMethodCache", "Commerce.Dictionary");
                cacheManager.set_LoaderProgId("PaymentMethodCache", "Commerce.PaymentMethodCache");
                cacheManager.set_LoaderConfig("PaymentMethodCache", paymentMethodCacheDict);
                cacheManager.set_WriterConfig("PaymentMethodCache", paymentMethodCacheDict);
            }
            finally
            {
                if (shippingMethodCacheDict != null)
                {
                    Marshal.ReleaseComObject(shippingMethodCacheDict);
                }
            }
        }
Ejemplo n.º 17
0
            public async Task <IPipelineStatus> StartBuild(PipelineInfo pipeline)
            {
                using (await projectLock.LockAsync()) {
                    var buildsDir       = Path.Combine(ProjectDir, "builds");
                    int lastBuildNumber = BuildNumbers().DefaultIfEmpty(0).Max();

                    int buildNum = lastBuildNumber + 1;

                    var buildDir = Path.Combine(buildsDir, "build" + buildNum);
                    Directory.CreateDirectory(buildDir);

                    var runManager = new PipelineRunManager(buildDir);

                    var status = await jobQueue.AddJobs(runManager, pipeline.BuildJobs, buildNum, CancellationToken.None);

                    statuses[buildNum] = status;
                    return(status);
                }
            }
Ejemplo n.º 18
0
 internal void Render(IDisplayer displayer, PipelineInfo info)
 {
     if (!visible)
     {
         return;
     }
     info.SetRotationMatrix(rotationMatrix);
     info.SetTranslationMatrix(translationMatrix);
     foreach (CuboidWall wall in walls)
     {
         if (!wall.CheckRenderFilling(displayer, info, color))
         {
             return;
         }
     }
     foreach (Triangle top in tops)
     {
         if (!top.CheckRenderFilling(displayer, info, color))
         {
             return;
         }
     }
     foreach (CuboidWall wall in walls)
     {
         wall.RenderFilling(displayer, info, color);
     }
     foreach (Triangle top in tops)
     {
         top.RenderFilling(displayer, info, color);
     }
     if (info.ShouldRenderLines())
     {
         foreach (CuboidWall wall in walls)
         {
             wall.RenderLines(displayer, info);
         }
         foreach (Triangle top in tops)
         {
             top.RenderLines(displayer, info);
         }
     }
 }
Ejemplo n.º 19
0
        void ConfigureCatalogSystem(PipelineInfo pipeInfo)
        {
            if (!catContextCreated)
            {
                CatalogSiteAgent siteAgent = new CatalogSiteAgent();
                siteAgent.SiteName = SiteName;

                //Create the catalog cache options
                CacheConfiguration catCacheConfiguration = new CacheConfiguration();
                catCacheConfiguration.SchemaCacheTimeout                   = catCacheConfiguration.ItemInformationCacheTimeout =
                    catCacheConfiguration.ItemHierarchyCacheTimeout        = catCacheConfiguration.ItemRelationshipsCacheTimeout =
                        catCacheConfiguration.ItemAssociationsCacheTimeout = catCacheConfiguration.CatalogCollectionCacheTimeout =
                            TimeSpan.FromMinutes(5);

                //Now create the CatalogContext with the cache configurations specified to setup the caching
                catContext        = CommerceServer.Core.Catalog.CatalogContext.Create(siteAgent, catCacheConfiguration);
                catContextCreated = true;
            }
            pipeInfo["CatalogContext"] = catContext;
        }
Ejemplo n.º 20
0
 internal void RenderLines(IDisplayer displayer, PipelineInfo info)
 {
     if (ShouldBeDisplayed(v1, info))
     {
         if (displayer.IsFog())
         {
             lineColor = ComputeFog(Color.Black, v1.GetWorldPosition(), info.GetCameraPosition());
         }
         else
         {
             lineColor = Color.Black;
         }
         RenderLineBresenham(displayer, (int)v1.GetScreenPosition().x, (int)v1.GetScreenPosition().y,
                             (int)v2.GetScreenPosition().x, (int)v2.GetScreenPosition().y, v1.GetScreenPosition().z, v2.GetScreenPosition().z);
         RenderLineBresenham(displayer, (int)v1.GetScreenPosition().x, (int)v1.GetScreenPosition().y,
                             (int)v3.GetScreenPosition().x, (int)v3.GetScreenPosition().y, v1.GetScreenPosition().z, v3.GetScreenPosition().z);
         RenderLineBresenham(displayer, (int)v2.GetScreenPosition().x, (int)v2.GetScreenPosition().y,
                             (int)v3.GetScreenPosition().x, (int)v3.GetScreenPosition().y, v2.GetScreenPosition().z, v3.GetScreenPosition().z);
     }
 }
Ejemplo n.º 21
0
        private void CompressDecompressCompare([NotNull] Stream source, [NotNull] Stream compressed, [NotNull] Stream decompressed, int blockSize)
        {
            var settings   = new Settings(blockSize, Environment.ProcessorCount, 10);
            var blockCount = new PipelineInfo(source.Length, blockSize).BlockCount;

            source.Seek(0, SeekOrigin.Begin);

            var compress = new CompressPipeline(source, compressed, settings);

            Measurement.Measure("Compressing", () => compress.Process(), blockCount).Display(_output);

            compressed.Seek(0, SeekOrigin.Begin);

            var decompress = new DecompressPipeline(compressed, decompressed, settings);

            Measurement.Measure("Decompressing", () => decompress.Process(), blockCount).Display(_output);

            decompressed.Seek(0, SeekOrigin.Begin);
            source.Seek(0, SeekOrigin.Begin);

            Compare.StreamContent(decompressed, source).Should().BeTrue();
        }
Ejemplo n.º 22
0
        internal bool CheckRenderFilling(IDisplayer displayer, PipelineInfo info, Color color)
        {
            v1.MakeModel(info);
            v2.MakeModel(info);
            v3.MakeModel(info);
            UpdateNormalVector();
            if (!v1.IsSmooth())
            {
                UpdateSharpEdges();
            }
            if (ShouldBeDisplayed(v1, info))
            {
                this.shouldBeDisplayed = true;
                if (!v1.Render(displayer, info))
                {
                    return(false);
                }
                if (!v2.Render(displayer, info))
                {
                    return(false);
                }
                if (!v3.Render(displayer, info))
                {
                    return(false);
                }

                /*if (displayer.GetShading() == Shading.Flat)
                 * {
                 *  color = ComputeColorFlatShading();
                 * }
                 * else */
            }
            else
            {
                this.shouldBeDisplayed = false;
            }
            return(true);
        }
Ejemplo n.º 23
0
        public PipelineInfo CreatePipelineInfo(String pipelineName)
        {
            PipelineInfo pipeInfo;

            switch (pipelineName.ToLower())
            {
            case "basket":
                if (null == basketPipe)
                {
                    basketPipe = new PipelineInfo(pipelineName);
                    AddDataToPipelineInfo(ref basketPipe);
                }
                return(basketPipe);

            case "total":
                if (null == totalPipe)
                {
                    totalPipe = new PipelineInfo(pipelineName);
                    AddDataToPipelineInfo(ref totalPipe);
                }
                return(totalPipe);

            case "checkout":
                if (null == checkoutPipe)
                {
                    checkoutPipe = new PipelineInfo(pipelineName);
                    AddDataToPipelineInfo(ref checkoutPipe);
                }
                return(checkoutPipe);

            default:
                pipeInfo = new PipelineInfo(pipelineName);
                AddDataToPipelineInfo(ref pipeInfo);
                return(pipeInfo);
            }
        }
Ejemplo n.º 24
0
 public LoginAccountWorker(string Name, Scheduler Scheduler)
 {
     _Info      = new PipelineInfo(Name);
     _Scheduler = Scheduler;
 }
Ejemplo n.º 25
0
 public CBDWorker(string Name, Scheduler Scheduler)
 {
     _Info      = new PipelineInfo(Name);
     _Scheduler = Scheduler;
 }
        /// <summary>
        /// Run a new framework job
        /// </summary>
        /// <param name="workflowMessage"></param>
        /// <param name="retryJobTimes"></param>
        /// <param name="isCheckDepends"></param>
        public void RunFrameworkJob(IWorkflowMessage workflowMessage, int retryJobTimes, bool isCheckDepends)
        {
            // For each job, open a new ProcessorJob to keep track of logging
            ProcessorJob currentJob = (ProcessorJob)processorJob.Clone();
            // Add the job for the first pipeline
            PipelineInfo pipelineInfo = new PipelineInfo()
            {
                CurrentJob = currentJob,
                IsCheckDepends = isCheckDepends,
                RetryJobTimes = retryJobTimes,
                RetryStepTimes = 0,
                WorkflowMessage = workflowMessage,
                IsInProcess = true, 
                CurrentStepNumber = 0
            };
            int currentJobsCount =  workerBlocks[0].InputCount;
            workerBlocks[0].Post(pipelineInfo);

            // Block untill a job is finished
            // This is done to regulate execution rate
            workerBlocks[workerBlocks.Count - 1].OutputAvailableAsync(cts.Token).Wait();
        }
Ejemplo n.º 27
0
 public RelationshipWorker(string Name, Scheduler Scheduler)
 {
     _Info      = new PipelineInfo(Name);
     _Scheduler = Scheduler;
 }
Ejemplo n.º 28
0
        internal Vector Rotate(PipelineInfo info)
        {
            Vector rotated = info.GetRotationMatrix().MultipliedBy(this);

            return(rotated);
        }
Ejemplo n.º 29
0
        internal Vector Translate(PipelineInfo info)
        {
            Vector translated = info.GetTranslationMatrix().MultipliedBy(this);

            return(translated);
        }
Ejemplo n.º 30
0
        private void LoadAppTreeView()
        {
            string applicationName = comboBoxAppList.Text;

            Microsoft.BizTalk.ExplorerOM.Application application = appCollection[applicationName];
            ClearView();
            if (application != null)
            {
                TreeNode parentNode = treeView1.Nodes.Add("Application");
                parentNode.Tag                = application;
                parentNode.ImageIndex         = 0;
                parentNode.SelectedImageIndex = 0;
                if (application.Assemblies.Count > 0)
                {
                    TreeNode assembliesNode = parentNode.Nodes.Add("Assemblies");
                    assembliesNode.ImageIndex         = 1;
                    assembliesNode.SelectedImageIndex = 1;

                    var qassembly = from assembly in application.Assemblies.Cast <Microsoft.BizTalk.ExplorerOM.BtsAssembly>()
                                    orderby assembly.DisplayName
                                    select assembly;

                    foreach (Microsoft.BizTalk.ExplorerOM.BtsAssembly assembly in qassembly.ToList())
                    {
                        TreeNode assemblyNode = assembliesNode.Nodes.Add(assembly.DisplayName);
                        assemblyNode.Tag                = assembly;
                        assemblyNode.ImageIndex         = 1;
                        assemblyNode.SelectedImageIndex = 1;
                        // Load Orchestrations
                        if (assembly.Orchestrations.Count > 0)
                        {
                            TreeNode orchestrationsNode = assemblyNode.Nodes.Add("Orchestrations");
                            orchestrationsNode.ImageIndex         = 2;
                            orchestrationsNode.SelectedImageIndex = 2;
                            var q = from orchestration in assembly.Orchestrations.Cast <Microsoft.BizTalk.ExplorerOM.BtsOrchestration>()
                                    orderby orchestration.FullName
                                    select orchestration;


                            foreach (Microsoft.BizTalk.ExplorerOM.BtsOrchestration orchestration in q.ToList())
                            {
                                TreeNode node = orchestrationsNode.Nodes.Add(orchestration.FullName);

                                node.ImageIndex         = 2;
                                node.SelectedImageIndex = 2;
                                //BtsOrchestrationHelper orch = new BtsOrchestrationHelper(orchestration);
                                node.Tag = orchestration;
                            }
                        }

                        // Load Schemas
                        if (assembly.Schemas.Count > 0)
                        {
                            TreeNode schemasNode = assemblyNode.Nodes.Add("Schemas");
                            schemasNode.ImageIndex         = 6;
                            schemasNode.SelectedImageIndex = 6;
                            var q = from schema in assembly.Schemas.Cast <Microsoft.BizTalk.ExplorerOM.Schema>()
                                    orderby schema.FullName
                                    select schema;

                            foreach (Microsoft.BizTalk.ExplorerOM.Schema schema in q.ToList())
                            {
                                string   nodeName = string.IsNullOrEmpty(schema.RootName) ? schema.FullName : string.Format("{0}+{1}", schema.FullName, schema.RootName);
                                TreeNode node     = schemasNode.Nodes.Add(nodeName);
                                node.Tag                = schema;
                                node.ImageIndex         = 6;
                                node.SelectedImageIndex = 6;
                            }
                        }

                        // Load Pipelines
                        if (assembly.Pipelines.Count > 0)
                        {
                            TreeNode pipelinesNode = assemblyNode.Nodes.Add("Pipelines");
                            pipelinesNode.ImageIndex         = 5;
                            pipelinesNode.SelectedImageIndex = 5;
                            var q = from pipeline in assembly.Pipelines.Cast <Microsoft.BizTalk.ExplorerOM.Pipeline>()
                                    orderby pipeline.FullName
                                    select pipeline;

                            foreach (Microsoft.BizTalk.ExplorerOM.Pipeline pipeline in q.ToList())
                            {
                                TreeNode     node        = pipelinesNode.Nodes.Add(pipeline.FullName);
                                PipelineInfo pipelineTag = new PipelineInfo(pipeline);
                                node.Tag                = pipelineTag;
                                node.ImageIndex         = 5;
                                node.SelectedImageIndex = 5;
                            }
                        }


                        // Load transforms
                        if (assembly.Transforms.Count > 0)
                        {
                            TreeNode transformsNode = assemblyNode.Nodes.Add("Maps");
                            transformsNode.ImageIndex         = 3;
                            transformsNode.SelectedImageIndex = 3;
                            var q = from transform in assembly.Transforms.Cast <Microsoft.BizTalk.ExplorerOM.Transform>()
                                    orderby transform.FullName
                                    select transform;

                            foreach (Microsoft.BizTalk.ExplorerOM.Transform transform in q.ToList())
                            {
                                TreeNode node = transformsNode.Nodes.Add(transform.FullName);
                                node.Tag                = transform;
                                node.ImageIndex         = 3;
                                node.SelectedImageIndex = 3;
                            }
                        }
                    }
                }
                if (listPolicy.Count > 0)
                {
                    TreeNode policyNode = parentNode.Nodes.Add("Policies");
                    policyNode.Tag                = listPolicy;
                    policyNode.ImageIndex         = 4;
                    policyNode.SelectedImageIndex = 4;
                    foreach (BreRuleSetInfo item in listPolicy)
                    {
                        TreeNode ruleNode = policyNode.Nodes.Add(string.Format("{0} - Version {1}.{2}", item.Name, item.MajorRevision.ToString(), item.MinorRevision.ToString()));

                        ruleNode.Tag                = item;
                        ruleNode.ImageIndex         = 4;
                        ruleNode.SelectedImageIndex = 4;
                    }
                }
            }
            ExpandToLevel(this.treeView1.Nodes, 2);
        }
Ejemplo n.º 31
0
 protected override void PrepareForWrite(PipelineInfo pipelineInfo)
 {
 }
Ejemplo n.º 32
0
        private void LoadApplicationArtifactsProperties(Microsoft.BizTalk.ExplorerOM.Application application, TreeNode parentNode)
        {
            listPolicy.Clear();
            parentNode.Nodes.Clear();
            treeViewBizTalkApplications.BeginUpdate();
            this.FormState = FormStateEnum.Processing;
            if (application != null)
            {
                if (application.Assemblies.Count > 0)
                {
                    TreeNode assembliesNode = parentNode.Nodes.Add("Assemblies");
                    assembliesNode.ImageIndex         = 1;
                    assembliesNode.SelectedImageIndex = 1;

                    var qassembly = from assembly in application.Assemblies.Cast <Microsoft.BizTalk.ExplorerOM.BtsAssembly>()
                                    orderby assembly.DisplayName
                                    select assembly;

                    foreach (Microsoft.BizTalk.ExplorerOM.BtsAssembly assembly in qassembly.ToList())
                    {
                        TreeNode assemblyNode = assembliesNode.Nodes.Add(assembly.DisplayName);
                        assemblyNode.Tag                = assembly;
                        assemblyNode.ImageIndex         = 1;
                        assemblyNode.SelectedImageIndex = 1;
                        // Load Orchestrations
                        if (assembly.Orchestrations.Count > 0)
                        {
                            TreeNode orchestrationsNode = assemblyNode.Nodes.Add("Orchestrations");
                            orchestrationsNode.ImageIndex         = 23; // 2;
                            orchestrationsNode.SelectedImageIndex = 23; //2;
                            var q = from orchestration in assembly.Orchestrations.Cast <Microsoft.BizTalk.ExplorerOM.BtsOrchestration>()
                                    orderby orchestration.FullName
                                    select orchestration;


                            foreach (Microsoft.BizTalk.ExplorerOM.BtsOrchestration orchestration in q.ToList())
                            {
                                try
                                {
                                    TreeNode node = orchestrationsNode.Nodes.Add(orchestration.FullName);
                                    node.ImageIndex         = 2;
                                    node.SelectedImageIndex = 2;
                                    // BtsOrchestrationHelper orch = new BtsOrchestrationHelper(orchestration);
                                    node.Tag = orchestration;
                                }
                                catch (Exception ex)
                                {
                                    MessageBox.Show(ex.Message);
                                }
                            }
                        }

                        // Load Schemas
                        if (assembly.Schemas.Count > 0)
                        {
                            TreeNode schemasNode = assemblyNode.Nodes.Add("Schemas");
                            schemasNode.ImageIndex         = 23; // 6;
                            schemasNode.SelectedImageIndex = 23; // 6;
                            var q = from schema in assembly.Schemas.Cast <Microsoft.BizTalk.ExplorerOM.Schema>()
                                    orderby schema.FullName
                                    select schema;

                            foreach (Microsoft.BizTalk.ExplorerOM.Schema schema in q.ToList())
                            {
                                string   nodeName = string.IsNullOrEmpty(schema.RootName) ? schema.FullName : string.Format("{0}+{1}", schema.FullName, schema.RootName);
                                TreeNode node     = schemasNode.Nodes.Add(nodeName);
                                node.Tag                = schema;
                                node.ImageIndex         = 6;
                                node.SelectedImageIndex = 6;
                            }
                        }

                        // Load Pipelines
                        if (assembly.Pipelines.Count > 0)
                        {
                            TreeNode pipelinesNode = assemblyNode.Nodes.Add("Pipelines");
                            pipelinesNode.ImageIndex         = 23; //5;
                            pipelinesNode.SelectedImageIndex = 23; // 5;
                            var q = from pipeline in assembly.Pipelines.Cast <Microsoft.BizTalk.ExplorerOM.Pipeline>()
                                    orderby pipeline.FullName
                                    select pipeline;

                            foreach (Microsoft.BizTalk.ExplorerOM.Pipeline pipeline in q.ToList())
                            {
                                TreeNode     node        = pipelinesNode.Nodes.Add(pipeline.FullName);
                                PipelineInfo pipelineTag = new PipelineInfo(pipeline);
                                node.Tag = pipelineTag;
                                //node.ContextMenuStrip = contextMenuStrip2;
                                node.ImageIndex         = 5;
                                node.SelectedImageIndex = 5;
                            }
                        }


                        // Load transforms
                        if (assembly.Transforms.Count > 0)
                        {
                            TreeNode transformsNode = assemblyNode.Nodes.Add("Maps");
                            transformsNode.ImageIndex         = 23; // 3;
                            transformsNode.SelectedImageIndex = 23; // 3;
                            var q = from transform in assembly.Transforms.Cast <Microsoft.BizTalk.ExplorerOM.Transform>()
                                    orderby transform.FullName
                                    select transform;

                            foreach (Microsoft.BizTalk.ExplorerOM.Transform transform in q.ToList())
                            {
                                TreeNode node = transformsNode.Nodes.Add(transform.FullName);
                                node.Tag                = transform;
                                node.ImageIndex         = 3;
                                node.SelectedImageIndex = 3;
                            }
                        }
                    }
                }
                if (listPolicy.Count > 0)
                {
                    TreeNode policyNode = parentNode.Nodes.Add("Policies");
                    policyNode.Tag                = listPolicy;
                    policyNode.ImageIndex         = 4;
                    policyNode.SelectedImageIndex = 4;
                    foreach (BreRuleSetInfo item in listPolicy)
                    {
                        TreeNode ruleNode = policyNode.Nodes.Add(string.Format("{0} - Version {1}.{2}", item.Name, item.MajorRevision.ToString(), item.MinorRevision.ToString()));
                        ruleNode.Tag                = item;
                        ruleNode.ImageIndex         = 4;
                        ruleNode.SelectedImageIndex = 4;
                    }
                }
            }
            this.FormState = FormStateEnum.NotProcessing;
            treeViewBizTalkApplications.EndUpdate();
        }