Beispiel #1
0
        /// <summary>
        /// Unsubscribes change events for all state variables of this service.
        /// </summary>
        /// <exception cref="IllegalCallException">If the state variables are not subscribed
        /// (see <see cref="IsStateVariablesSubscribed"/>).</exception>
        public void UnsubscribeStateVariables()
        {
            DeviceConnection connection = _connection;

            if (connection == null)
            {
                throw new IllegalCallException("UPnP service is not connected to a UPnP network service");
            }
            if (!connection.IsServiceSubscribedForEvents(this))
            {
                throw new IllegalCallException("State variables are not subscribed");
            }
            connection.OnUnsubscribeEvents(this);
        }