Exemple #1
0
        public void Remove(bool p_Force)
        {
            if (m_CallbackPoint != null)
            {
                if (m_CallbackCookie != 0)
                {
                    m_CallbackPoint.Unadvise(m_CallbackCookie);
                    m_CallbackCookie = 0;
                }
                Marshal.ReleaseComObject(m_CallbackPoint);
                m_CallbackPoint = null;
            }

            m_PointContainer = null;
            m_IfItems        = null;
            m_IfSync         = null;
            m_IfAsync        = null;

            if (m_IfMgt != null)
            {
                Marshal.ReleaseComObject(m_IfMgt);
                m_IfMgt = null;
            }

            if (m_IfServer != null)
            {
                if (!m_State.Public)
                {
                    m_IfServer.RemoveGroup(m_State.HandleServer, p_Force);
                }
                m_IfServer = null;
            }

            m_State.HandleServer = 0;
        }
 public void Disconnect()
 {
     if (_sinkCookie == int.MaxValue)
     {
         throw new InvalidOperationException();
     }
     _sinkCP.Unadvise(_sinkCookie);
     _sinkCookie = int.MaxValue;
     _sinkCP     = null;
 }
Exemple #3
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         // Release event sink
         if (-1 != cookie)
         {
             icp.Unadvise(cookie);
         }
         cookie = -1;
         if (components != null)
         {
             components.Dispose();
         }
     }
     base.Dispose(disposing);
 }
Exemple #4
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Release event sink
                if (-1 != cookie)
                {
                    icp.Unadvise(cookie);
                }
                cookie = -1;
                if (components != null)
                {
                    components.Dispose();
                }

                this.eventDocumentComplete.Dispose();
                this.eventWindowClose.Dispose();
            }
            base.Dispose(disposing);
        }