Bump corefx
[mono.git] / mcs / class / referencesource / mscorlib / system / io / stream.cs
index ff92bed105c0c13552faba59c3edc2eede85e9b7..d830182a037bf3dff46af90e3ca65b233eb12a95 100644 (file)
@@ -39,8 +39,8 @@ namespace System.IO {
 #if CONTRACTS_FULL
     [ContractClass(typeof(StreamContract))]
 #endif
-#if FEATURE_REMOTING
-    public abstract class Stream : MarshalByRefObject, IDisposable {
+#if FEATURE_REMOTING || MONO
+    public abstract partial class Stream : MarshalByRefObject, IDisposable {
 #else // FEATURE_REMOTING
     public abstract class Stream : IDisposable {
 #endif // FEATURE_REMOTING
@@ -195,6 +195,9 @@ namespace System.IO {
             InternalCopyTo(destination, _DefaultCopyBufferSize);
         }
 
+#if MONO
+        virtual
+#endif
         public void CopyTo(Stream destination, int bufferSize)
         {
             if (destination == null)
@@ -744,9 +747,6 @@ namespace System.IO {
         // byte[] each time you call it, and should be overridden by any 
         // subclass that maintains an internal buffer.  Then, it can help perf
         // significantly for people who are reading one byte at a time.
-#if !FEATURE_CORECLR
-        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
-#endif
         public virtual int ReadByte()
         {
             Contract.Ensures(Contract.Result<int>() >= -1);
@@ -786,7 +786,7 @@ namespace System.IO {
             return new SyncStream(stream);
         }
 
-#if !FEATURE_PAL  // This method shouldn't have been exposed in Dev10 (we revised object invariants after locking down).
+#if !FEATURE_PAL || MONO // This method shouldn't have been exposed in Dev10 (we revised object invariants after locking down).
         [Obsolete("Do not call or override this method.")]
         protected virtual void ObjectInvariant() 
         {