[System] WebConnection and WebConnectionStream code cleanups.
commitda6c88b49bdf75861352910b0f1e68b474992686
authorMartin Baulig <martin.baulig@xamarin.com>
Wed, 19 Feb 2014 10:02:37 +0000 (19 11:02 +0100)
committerMartin Baulig <martin.baulig@xamarin.com>
Wed, 19 Feb 2014 10:08:18 +0000 (19 11:08 +0100)
tree4b00ee967378b8b43bbcef1718930112609044d4
parent0570fc0be4bccc7689fabae22fe9d70087a2c7a1
[System] WebConnection and WebConnectionStream code cleanups.

* Merged WebConnection.EndWrite() and EndWrite2().

* WebConnectionStream.BeginWrite(): Use the same async-write
  callback for both chunked and non-chunked; remove the single-use
  small WriteRequestAsync() and inline it here to make the code
  more readable.

* WebConnectionStream.WriteRequestAsyncCB(): Now called for all
  async writes, call WebConnection.EndWrite() here.

The code is now more readable and easier to understand.  This is
the first part of a series of cleanups, which should eventually
lead towards full async and 100-continue.
mcs/class/System/System.Net/HttpWebRequest.cs
mcs/class/System/System.Net/WebConnection.cs
mcs/class/System/System.Net/WebConnectionStream.cs