Example #1
0
        /// <summary>
        /// Add this chain as branch to OnFinish of driver at index of specified chain.
        /// </summary>
        /// <param name="_index">Index of driver to add this chain as branch</param>
        /// <param name="_chain">Chain to index and add to</param>
        public void AddChainTo(int _index, DChain _chain)
        {
            var selDriver = m_Chain[_index];

            if (!m_Branches.ContainsKey(selDriver))
            {
                m_Branches.Add(selDriver, new List <DChain>());
            }
            m_Branches[selDriver].Add(_chain);
        }
Example #2
0
 /// <summary>
 /// Add this chain as branch to OnFinish of specified driver in specified chain.
 /// </summary>
 /// <param name="_driver">Driver to add to</param>
 /// <param name="_chain">Chain to add to</param>
 public void AddChainTo(ioDriver.DBase _driver, DChain _chain)
 {
     for (int idx = 0; idx < m_Chain.Count; ++idx)
     {
         if (m_Chain[idx] != _driver)
         {
             continue;
         }
         AddChainTo(idx, _chain);
         return;
     }
     Log.Err("ioDriver:Chain:AddChainTo - Driver does not exist in chain!  Driver '" + _driver.Name + "' requested.");
 }