Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="disposing"></param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                m_log.Dispose();
            }

            Release();
        }
Пример #2
0
 /// <summary>
 /// Releases the unmanaged resources used by the <see cref="ServiceHost"/> object and optionally releases the managed resources.
 /// </summary>
 /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
 protected override void Dispose(bool disposing)
 {
     if (!m_disposed)
     {
         try
         {
             if (disposing)
             {
                 m_webAppHost?.Dispose();
                 m_logSubscriber?.Dispose();
             }
         }
         finally
         {
             m_disposed = true;          // Prevent duplicate dispose.
             base.Dispose(disposing);    // Call base class Dispose().
         }
     }
 }
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="disposing"></param>
        protected override void Dispose(bool disposing)
        {
            if (m_log != null)
            {
                m_log.Dispose();
                m_log = null;
            }
            if (m_vlm != null)
            {
                m_vlm.Dispose();
                m_vlm = null;
            }

            if (disposing)
            {
                AppDomain.CurrentDomain.UnhandledException -= CurrentDomain_UnhandledException;
            }

            Release();
        }