public static void LogException(this ILogging log, System.Exception exception) { if (exception == null || IDisposedExtensions.IsNullOrDisposed(log)) { return; } log.LogException(exception); }
public static void Log(this ILogging log, string message) { if (string.IsNullOrEmpty(message) || IDisposedExtensions.IsNullOrDisposed(log)) { return; } log.Log(message); }
public static void SetShouldDispose(BaseDisposable toDispose, bool value, bool callDispose = false) { if (IDisposedExtensions.IsNullOrDisposed(toDispose)) { return; } toDispose.ShouldDispose = value; if (callDispose) { toDispose.Dispose(); } }