AspComet.Client.UnsubscribeFrom C# (CSharp) Method

UnsubscribeFrom() public method

public UnsubscribeFrom ( string subscription ) : void
subscription string
return void
        public void UnsubscribeFrom(string subscription)
        {
            if (string.IsNullOrEmpty(subscription))
                throw new ArgumentException("Subscription cannot be null or empty");

            lock (this.syncRoot)
            {
                if (!this.subscriptions.Contains(subscription))
                    throw new ArgumentException("Cannot unsubscribe when not already subscribed");

                this.subscriptions.Remove(subscription);
            }
        }