You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenApiStreamReader disposes input stream after reading and it's not configurable #530
I have to use OpenApiStreamReader as a one of the several steps, of handling the Stream. The problem is, that when I read the stream using OpenApiStreamReader.Read(stream) at first, then the Stream is disposed and cannot be used anymore. I cannot configure anyhow to Read the stream without disposing it, as I can do that in the base StreamReader.
// openApiSpec is a Stream argument of the method
var openApiStreamReader = new OpenApiStreamReader();
var openApiDocument = openApiStreamReader.Read(openApiSpec, out var openApiDiagnostic);
This is a good call out. We use StreamReader under the covers with a using statement, hence why dispose is called. I think we can add a property to OpenReaderSettings to allow control of this.
Activity
darrelmiller commentedon Dec 13, 2020
This is a good call out. We use StreamReader under the covers with a using statement, hence why dispose is called. I think we can add a property to OpenReaderSettings to allow control of this.