FastQuant.BarFactory.Add C# (CSharp) Method

Add() public method

public Add ( BarFactoryItem item ) : void
item BarFactoryItem
return void
        public void Add(BarFactoryItem item)
        {
            if (item.factory != null)
                throw new InvalidOperationException("BarFactoryItem is already added to another BarFactory instance.");

            item.factory = this;
            int id = item.Instrument.Id;
            var items = ItemLists[id] = ItemLists[id] ?? new List<BarFactoryItem>();
            if (
                items.Exists(
                    match =>
                        item.barType == match.barType && item.barSize == match.barSize &&
                        item.barInput == match.barInput && item.providerId == match.providerId))
                Console.WriteLine($"{DateTime.Now} BarFactory::Add Item '{item}' is already added");
            else
                items.Add(item);
        }

Same methods

BarFactory::Add ( Instrument instrument, BarType barType, long barSize, BarInput barInput, ClockType type, System.TimeSpan session1, System.TimeSpan session2, int providerId = -1 ) : void
BarFactory::Add ( Instrument instrument, BarType barType, long barSize, BarInput barInput = BarInput.Trade, ClockType type = ClockType.Local, int providerId = -1 ) : void
BarFactory::Add ( Instrument instrument, BarType barType, long barSize, System.TimeSpan session1, System.TimeSpan session2, int providerId = -1 ) : void
BarFactory::Add ( Instrument instrument, System.TimeSpan session1, System.TimeSpan session2, int providerId = -1 ) : void
BarFactory::Add ( InstrumentList instruments, BarType barType, long barSize, BarInput barInput = BarInput.Trade, ClockType type = ClockType.Local, int providerId = -1 ) : void
BarFactory::Add ( InstrumentList instruments, BarType barType, long barSize, BarInput barInput = BarInput.Trade, int providerId = -1 ) : void
BarFactory::Add ( string symbol, BarInput barInput, ClockType type, System.TimeSpan session1, System.TimeSpan session2, int providerId = -1 ) : void
BarFactory::Add ( string symbol, BarType barType, long barSize, BarInput barInput, ClockType type, System.TimeSpan session1, System.TimeSpan session2, int providerId = -1 ) : void
BarFactory::Add ( string symbol, BarType barType, long barSize, BarInput barInput = BarInput.Trade, ClockType type = ClockType.Local, int providerId = -1 ) : void
BarFactory::Add ( string symbol, BarType barType, long barSize, BarInput barInput = BarInput.Trade, int providerId = -1 ) : void
BarFactory::Add ( string symbol, BarType barType, long barSize, System.TimeSpan session1, System.TimeSpan session2, int providerId = -1 ) : void
BarFactory::Add ( string symbol, System.TimeSpan session1, System.TimeSpan session2, int providerId = -1 ) : void