Exemplo n.º 1
0
 /// <summary>
 /// Removes the specified logging channel from the current logging session.
 /// </summary>
 /// <param name="loggingChannel">The logging channel to remove.</param>
 public static void RemoveLoggingChannel(LoggingChannel loggingChannel)
 {
     if (loggingChannel != null)
     {
         try
         {
             LoggingSession.RemoveLoggingChannel(loggingChannel);
             loggingChannel.Dispose();
         }
         catch (Exception) { }
     }
 }
Exemplo n.º 2
0
 protected virtual void Dispose(bool disposing)
 {
     if (isDisposed == false)
     {
         isDisposed = true;
         if (channel != null)
         {
             channel.Dispose();
             channel = null;
         }
         if (session != null)
         {
             session.Dispose();
             session = null;
         }
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        private void Dispose(Boolean disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                if (_logChannel != null)
                {
                    _logChannel.Dispose();
                    _logChannel = null;
                }
            }

            disposed = true;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="disposing">
        /// <c>true</c> to release both managed and unmanaged resources; <c>false</c> to release
        /// only unmanaged resources.
        /// </param>
        protected virtual void Dispose(bool disposing)
        {
            if (loggingSessionDisposed == false)
            {
                loggingSessionDisposed = true;

                if (disposing)
                {
                    if (logChannel != null)
                    {
                        logChannel.Dispose();
                        logChannel = null;
                    }

                    if (localFileLogSession != null)
                    {
                        localFileLogSession.Dispose();
                        localFileLogSession = null;
                    }
                }
            }
        }
Exemplo n.º 5
0
        private void Dispose(bool disposing)
        {
            if (isDisposed == false)
            {
                isDisposed = true;

                if (disposing)
                {
                    if (channel != null)
                    {
                        channel.Dispose();
                        channel = null;
                    }

                    if (session != null)
                    {
                        session.Dispose();
                        session = null;
                    }
                }
            }
        }
Exemplo n.º 6
0
 public void Dispose()
 {
     MediaManager?.Dispose();
     LoggingChannel?.Dispose();
     BackgroundUpdater?.Dispose();
 }