jamietre / CsQuery

CsQuery is a complete CSS selector engine, HTML parser, and jQuery port for C# and .NET 4.
Other
1.16k stars 250 forks source link

CQ always disposes stream #134

Closed Athari closed 10 years ago

Athari commented 11 years ago

When created from a stream, CQ always disposes it. This makes reusing the stream impossible.

CQ.Create methods which accept a stream, should offer optional bool leaveOpen = false argument, like StreamReader from .NET Framewok does.

jamietre commented 10 years ago

Fixed in the last push- streams are just left unclosed always; handling stream disposition really should be the concern of whoever created the stream anyway.