Example #1
0
        /// <summary>
        /// Removes the group.
        /// </summary>
        /// <param name="group">The group.</param>
        public void RemoveGroup(ComDaGroup group)
        {
            TraceState("RemoveGroup", group.Name);

            lock (m_lock)
            {
                for (int ii = 0; ii < m_groups.Count; ii++)
                {
                    if (Object.ReferenceEquals(group, m_groups[ii]))
                    {
                        m_groups.RemoveAt(ii);

                        if (group.Subscription != null && group.Subscription.Session != null)
                        {
                            group.Subscription.Session.RemoveSubscription(group.Subscription);
                        }
                    }
                }

                group.Dispose();
            }
        }