#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
InternalCopyTo(destination, _DefaultCopyBufferSize);
}
+#if MONO
+ virtual
+#endif
public void CopyTo(Stream destination, int bufferSize)
{
if (destination == null)
// 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);
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()
{