AnonymousDisposable<TState>
Represents a Action-based disposable that can hold onto some state.
            
                
Gets a value that indicates whether the object is disposed.
            
Constructs a new disposable with the given action used for disposal.
            
Calls the disposal action if and only if the current instance hasn't been disposed yet.