/// <summary>
        /// Initializes all chain components that implement the <see cref="T:IInitializeByMidiPort"/>.
        /// </summary>
        public virtual void Initialize()
        {
            ThrowIfDisposed();

            // initialize all receivers that implement IInitializeByMidiPort
            foreach (var receiverComponent in this.Receivers)
            {
                IInitializeByMidiPort init = receiverComponent as IInitializeByMidiPort;

                if (init != null)
                {
                    init.Initialize(this.MidiPort);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes the sender chain components that implement the <see cref="IInitializeByMidiPort"/>.
        /// </summary>
        public virtual void Initialize()
        {
            if (this.MidiPort == null)
            {
                throw new InvalidOperationException("The Midi Port property was not initialized.");
            }

            foreach (var senderComponent in this.Senders)
            {
                IInitializeByMidiPort init = senderComponent as IInitializeByMidiPort;

                if (init != null)
                {
                    init.Initialize(this.MidiPort);
                }
            }
        }