diff options
author | Martin Baulig <mabaul@microsoft.com> | 2019-02-15 21:09:14 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-02-20 01:19:07 +0300 |
commit | 23762efca5225213909f06b6a3e173706b78ef5d (patch) | |
tree | 02637fb0c82eae81329f2ae4a6e17eddabfa837f /mcs/class/System.Net.Http | |
parent | c890be00c9ce7a916cf21277b5869d9eea565db7 (diff) |
Add temporary workaround for internal StreamContent constructor.
Diffstat (limited to 'mcs/class/System.Net.Http')
-rw-r--r-- | mcs/class/System.Net.Http/StreamContent.Mono.cs | 19 | ||||
-rw-r--r-- | mcs/class/System.Net.Http/System.Net.Http.csproj | 3 | ||||
-rw-r--r-- | mcs/class/System.Net.Http/unix_net_4_x_System.Net.Http.dll.sources | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/mcs/class/System.Net.Http/StreamContent.Mono.cs b/mcs/class/System.Net.Http/StreamContent.Mono.cs new file mode 100644 index 00000000000..411119106f6 --- /dev/null +++ b/mcs/class/System.Net.Http/StreamContent.Mono.cs @@ -0,0 +1,19 @@ +using System.IO; +using System.Threading; + +namespace System.Net.Http +{ + partial class StreamContent + { + // + // Workarounds for poor .NET API + // Instead of having SerializeToStreamAsync with CancellationToken as public API. Only LoadIntoBufferAsync + // called internally from the send worker can be cancelled and user cannot see/do it + // + [Obsolete ("FIXME: Please talk to Martin about this; see https://github.com/mono/mono/issues/12996.")] + internal StreamContent (Stream content, CancellationToken cancellationToken) + : this (content) + { + } + } +} diff --git a/mcs/class/System.Net.Http/System.Net.Http.csproj b/mcs/class/System.Net.Http/System.Net.Http.csproj index c7fa6ecb9b5..e7f4273df99 100644 --- a/mcs/class/System.Net.Http/System.Net.Http.csproj +++ b/mcs/class/System.Net.Http/System.Net.Http.csproj @@ -604,6 +604,7 @@ <Compile Include="HttpClientHandler.cs" />
<Compile Include="IMonoHttpClientHandler.cs" />
<Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="StreamContent.Mono.cs" />
<Compile Include="corefx\NetEventSource.Http.cs" />
<Compile Include="corefx\SocketsHttpHandler.Mono.cs" />
</ItemGroup>
@@ -718,6 +719,7 @@ <Compile Include="HttpClientHandler.cs" />
<Compile Include="IMonoHttpClientHandler.cs" />
<Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="StreamContent.Mono.cs" />
<Compile Include="corefx\NetEventSource.Http.cs" />
<Compile Include="corefx\SocketsHttpHandler.Mono.cs" />
</ItemGroup>
@@ -832,6 +834,7 @@ <Compile Include="HttpClientHandler.cs" />
<Compile Include="IMonoHttpClientHandler.cs" />
<Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="StreamContent.Mono.cs" />
<Compile Include="corefx\NetEventSource.Http.cs" />
<Compile Include="corefx\SocketsHttpHandler.Mono.cs" />
</ItemGroup>
diff --git a/mcs/class/System.Net.Http/unix_net_4_x_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/unix_net_4_x_System.Net.Http.dll.sources index ceb22741dfd..364adf69787 100644 --- a/mcs/class/System.Net.Http/unix_net_4_x_System.Net.Http.dll.sources +++ b/mcs/class/System.Net.Http/unix_net_4_x_System.Net.Http.dll.sources @@ -5,6 +5,7 @@ HttpClientHandler.cs HttpClientHandler.SocketsHandler.cs IMonoHttpClientHandler.cs MonoWebRequestHandler.cs +StreamContent.Mono.cs ../corlib/System.Diagnostics/Debug.cs |