Beispiel #1
0
        /// <summary>
        /// Subscribes (or re-subscribes) to a data publisher for a set of data points.
        /// </summary>
        /// <param name="info">Configuration object that defines the subscription.</param>
        /// <returns><c>true</c> if subscribe transmission was successful; otherwise <c>false</c>.</returns>
        public bool Subscribe(SubscriptionInfo info)
        {
            SynchronizedSubscriptionInfo synchronizedSubscriptionInfo = info as SynchronizedSubscriptionInfo;

            if ((object)synchronizedSubscriptionInfo != null)
                return SynchronizedSubscribe(synchronizedSubscriptionInfo);

            UnsynchronizedSubscriptionInfo unsynchronizedSubscriptionInfo = info as UnsynchronizedSubscriptionInfo;

            if ((object)unsynchronizedSubscriptionInfo != null)
                return UnsynchronizedSubscribe(unsynchronizedSubscriptionInfo);

            throw new NotSupportedException("Type of subscription used is not supported");
        }
Beispiel #2
0
        /// <summary>
        /// Subscribes (or re-subscribes) to a data publisher for a set of data points.
        /// </summary>
        /// <param name="info">Configuration object that defines the subscription.</param>
        /// <returns><c>true</c> if subscribe transmission was successful; otherwise <c>false</c>.</returns>
        public bool Subscribe(SubscriptionInfo info)
        {
            if (info is SynchronizedSubscriptionInfo)
                return SynchronizedSubscribe((SynchronizedSubscriptionInfo)info);

            if (info is UnsynchronizedSubscriptionInfo)
                return UnsynchronizedSubscribe((UnsynchronizedSubscriptionInfo)info);

            throw new NotSupportedException("Type of subscription used is not supported");
        }