ReadonlywasGets a value indicating whether the object has been disposed.
This property should return true once the object has been disposed
and should remain true for the lifetime of the object. It should
never transition back to false after being set to true.
Defines the contract for objects that can report their disposal state.
This interface does NOT extend
Disposablebecause it represents objects that can report whether they have been disposed, but may not necessarily be disposable themselves. This separation allows for:Use this interface when you need to check if something has been disposed but don't need the ability to dispose it directly.
Example