New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obsoleted Close() methods #465
Comments
You'll have to give an example of something that doesn't work if you switch from calling close on the generator to disposing the Stream returned from the generator's Open method(s). All our tests and several utilities are using the disposing approach without issue. Indeed all those Open methods are actually returning a WrappedGeneratorStream, whose Dispose just calls the generator's Close, so there's not much room for confusion. |
@peterdettman Thanks for looking into this. Here's the method that has the deprecated Close() commented out and would fail our automated tests.
Below is the diff of code changes: |
I guess the problem is that in the changed code the |
The Close() method on the follow types are marked with
[Obsolete("Dispose any opened Stream directly")]
. However, replacing the Close() calls with directly disposing the open stream does not appear to work (the decryption of the encrypted data fails with a variety of errors). Each of those Close() calls has substantial logic which I doubt can simply be replaced with directly disposing the open streams. I want to make sure if my understanding of the Obsolete directive is incorrect or if the Obsolete attribute should be removed.The text was updated successfully, but these errors were encountered: