Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CandleManager"/>.
        /// </summary>
        /// <param name="source">The data source for <see cref="IBuilderCandleSource"/>.</param>
        public CandleManager(ICandleBuilderSource source)
            : this()
        {
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }

            Sources.OfType <IBuilderCandleSource>().ForEach(b => b.Sources.Add(source));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Создать <see cref="CandleManager"/>.
        /// </summary>
        /// <param name="builderSource">Источник данных для <see cref="ICandleBuilder"/>.</param>
        public CandleManager(ICandleBuilderSource builderSource)
            : this()
        {
            if (builderSource == null)
            {
                throw new ArgumentNullException("builderSource");
            }

            Sources.OfType <ICandleBuilder>().ForEach(b => b.Sources.Add(builderSource));
        }