Yort.Trashy

Yort.Trashy is .Net library for implementing the disposable pattern correctly and in a thread-safe manner, as well was working with disposable types.

View project on GitHub
# Yort.Trashy

What is Yort.Trashy ?

Yort.Trashy is .Net library for implementing the disposable pattern correctly and in a thread-safe manner, as well was working with disposable types.

GitHub license

Supported Platforms

Currently;

  • .Net Standard 1.3 (no stack trace capture available)
  • Xamarin.iOS
  • Xamarin.Android
  • Net 4.0+

Build Status

Build status

What’s in the box/How do I use it?

  • Implement the dispose pattern correctly, including “thread-safety” and “idempotency”.
  • Implement the IIsDisposable interface for components that want to expose their disposed status.
  • Dispose objects easily with TryDispose, i.e ignore nulls, avoid manually casting to IDisposable, optionally suppress errors during disposal.
  • Dispose collections of items with TryDispose.
  • Dispose multiple objects with DisposeAll.
  • Inherit from and use ReferenceCountedDisposableBase to prevent being disposed too early.
  • Track and log disposable object instances, including those that are not properly (explicitly) disposed.

Check out the wiki for more.