diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileStream.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileStream.cs index eb9d98750f758..285c4f26dee95 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileStream.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileStream.cs @@ -197,7 +197,9 @@ public FileStream(string path, FileMode mode, FileAccess access, FileShare share [Obsolete("This property has been deprecated. Please use FileStream's SafeFileHandle property instead. https://go.microsoft.com/fwlink/?linkid=14202")] public virtual IntPtr Handle => _strategy.Handle; + [UnsupportedOSPlatform("ios")] [UnsupportedOSPlatform("macos")] + [UnsupportedOSPlatform("tvos")] public virtual void Lock(long position, long length) { if (position < 0 || length < 0) @@ -212,7 +214,9 @@ public virtual void Lock(long position, long length) _strategy.Lock(position, length); } + [UnsupportedOSPlatform("ios")] [UnsupportedOSPlatform("macos")] + [UnsupportedOSPlatform("tvos")] public virtual void Unlock(long position, long length) { if (position < 0 || length < 0) diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index d7d0aa9218bd9..19d1816ad465d 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -7329,7 +7329,9 @@ public override void EndWrite(System.IAsyncResult asyncResult) { } public override void Flush() { } public virtual void Flush(bool flushToDisk) { } public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; } + [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] [System.Runtime.Versioning.UnsupportedOSPlatform("macos")] + [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] public virtual void Lock(long position, long length) { } public override int Read(byte[] buffer, int offset, int count) { throw null; } public override int Read(System.Span buffer) { throw null; } @@ -7338,7 +7340,9 @@ public virtual void Lock(long position, long length) { } public override int ReadByte() { throw null; } public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; } public override void SetLength(long value) { } + [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] [System.Runtime.Versioning.UnsupportedOSPlatform("macos")] + [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] public virtual void Unlock(long position, long length) { } public override void Write(byte[] buffer, int offset, int count) { } public override void Write(System.ReadOnlySpan buffer) { }