/// <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) { } } }
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; } } }
/// <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; }
/// <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; } } } }
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; } } } }
public void Dispose() { MediaManager?.Dispose(); LoggingChannel?.Dispose(); BackgroundUpdater?.Dispose(); }