Esempio n. 1
0
        /// <summary>
        /// Creates a Signal object from the supplied Thrust object.
        /// </summary>
        /// <param name="thrust"></param>
        /// <returns>The Signal object created.</returns>
        protected virtual MCE.Signal GetSignalFromThrust(Thrust thrust)
        {
            // find the productID
            var product = SubscriptionCaller.Instance().GetProductByName(thrust.GetProductName());

            if (product == null)
            {
                throw new NotFoundException(string.Format("Product ({0}) not found for thrust signal.", thrust.GetProductName()));
            }

            // save the signal
            var signal = new MCE.Signal()
            {
                ProductID = product.ProductID
            };

            signal.InjectWith(thrust);

            return(signal);
        }