/// <summary> /// Default release method. /// </summary> public void Release(T value) { try { Closeables.Close((IDisposable)value, true); } catch (IOException ioe) { Debug.WriteLine($"{ ioe.Message }. This will not happen, Closeable.close swallows and logs IOExceptions."); } }
void IResourceReleaser <Thing> .Release(Thing value) { try { Closeables.Close(value, true); } catch (IOException ioe) { // This should not happen Debug.WriteLine($"{ ioe.Message } is NOT expected."); Assert.Fail(); } }