Esempio n. 1
0
        /// <summary>
        /// One of the connected nodes sent all of its data.
        /// </summary>
        public override void OnParentNodeFinished(IProcessingNode sender, ResultsArguments eventArgs)
        {
            ArgumentHelper.AssertNotNull(eventArgs, "eventArgs");

            try
            {
                SendAndLogTemporaryMessage("⇒ {0} started...", DisplayName);
                var timer = Stopwatch.StartNew();

                // generate expected lipids
                var lipids = GenerateLipids();

                // send lipids to child nodes
                SendResults(lipids);

                timer.Stop();
                SendAndLogMessage("✓ {0} finished after {1}.", DisplayName, StringHelper.GetDisplayString(timer.Elapsed));
            }
            catch (Exception ex)
            {
                SendAndLogErrorMessage("Error: " + ex.Message);
                throw;
            }

            // inform child nodes that processing has finished
            FireProcessingFinishedEvent(new ResultsArguments(LipidSearchDataTypes.LipidCompounds));
        }
Esempio n. 2
0
        public void RegisterInputOutputNode <TIn, TOut>(IProcessingNode <TIn, TOut> node)
            where TIn : class, INodeOutput <TIn>, new()
            where TOut : class, INodeOutput <TOut>, new()
        {
            node.SetId(Guid.NewGuid());

            Log.Debug($"'{Name}' registered new continue {node}");

            AttachNodeToOutput(node);
            RegisterOutputNode(node);
        }
Esempio n. 3
0
 /// <summary>
 /// Portion of mass spectra received. (Just to trigger this node to start working.)
 /// </summary>
 public void OnResultsSent(IProcessingNode sender, IList <SpectrumFile> result)
 {
 }