Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Henry <ludovic@xamarin.com>2017-02-23 04:04:22 +0300
committerLudovic Henry <ludovic@xamarin.com>2017-02-23 20:19:41 +0300
commit7105792bf9725aa53efd3a40e04275c26140173b (patch)
tree0e6d6595e168dbb1759b9634ed113028fa3c5d2f
parentd87c966d80c1274373ddafe3375bf1730cd430ed (diff)
[mono] Import System.IO.Stream
-rw-r--r--src/System.Private.CoreLib/src/System/IO/Stream.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/System.Private.CoreLib/src/System/IO/Stream.cs b/src/System.Private.CoreLib/src/System/IO/Stream.cs
index 36bb32474..a210c246f 100644
--- a/src/System.Private.CoreLib/src/System/IO/Stream.cs
+++ b/src/System.Private.CoreLib/src/System/IO/Stream.cs
@@ -4,12 +4,13 @@
using System.Diagnostics;
using System.Diagnostics.Contracts;
+using System.Diagnostics.Private;
using System.Threading;
using System.Threading.Tasks;
namespace System.IO
{
- public abstract class Stream : IDisposable
+ public abstract partial class Stream : IDisposable
{
public static readonly Stream Null = new NullStream();
@@ -287,10 +288,12 @@ namespace System.IO
public virtual Task WriteAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
+#if !MONO
if (!CanWrite)
{
throw new NotSupportedException(SR.NotSupported_UnwritableStream);
}
+#endif
return cancellationToken.IsCancellationRequested ?
Task.FromCanceled<int>(cancellationToken) :