Esempio n. 1
0
 /// <summary>
 /// Adds a new <see cref="MasterBarTickLookup"/> to the lookup table.
 /// </summary>
 /// <param name="masterBar">The item to add. </param>
 public void AddMasterBar(MasterBarTickLookup masterBar)
 {
     MasterBars.Add(masterBar);
     _currentMasterBar = masterBar;
     if (!MasterBarLookup.ContainsKey(masterBar.MasterBar.Index))
     {
         MasterBarLookup[masterBar.MasterBar.Index] = masterBar;
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Performs the neccessary finalization steps after all information was written.
        /// </summary>
        public void Finish()
        {
            MasterBarTickLookup previous = null;

            foreach (var bar in MasterBars)
            {
                bar.Finish();
                if (previous != null)
                {
                    previous.NextMasterBar = bar;
                }
                previous = bar;
            }
        }