diff options
| author | Vasily <JustAMan@users.noreply.github.com> | 2019-03-12 11:31:22 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-12 11:31:22 +0300 |
| commit | 497b4f834fcf545e3b417dddb2ab3d86e20b2998 (patch) | |
| tree | 7ea5e5d969133bbaeff73daeda466d691f95f9ed /Emby.Server.Implementations/SocketSharp/HttpPostedFile.cs | |
| parent | f77af5f6e4cce85a5fc638e8da20cb0d56a899da (diff) | |
| parent | 620d7b560d0b72f532d96a5b459f14fd4ad3044a (diff) | |
Merge pull request #1021 from Bond-009/failonwarn
Fail on warnings for Jellyfin.Server
Diffstat (limited to 'Emby.Server.Implementations/SocketSharp/HttpPostedFile.cs')
| -rw-r--r-- | Emby.Server.Implementations/SocketSharp/HttpPostedFile.cs | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/Emby.Server.Implementations/SocketSharp/HttpPostedFile.cs b/Emby.Server.Implementations/SocketSharp/HttpPostedFile.cs index f38ed848e..95b7912fb 100644 --- a/Emby.Server.Implementations/SocketSharp/HttpPostedFile.cs +++ b/Emby.Server.Implementations/SocketSharp/HttpPostedFile.cs @@ -63,6 +63,28 @@ public sealed class HttpPostedFile : IDisposable _position = offset; } + public override bool CanRead => true; + + public override bool CanSeek => true; + + public override bool CanWrite => false; + + public override long Length => _end - _offset; + + public override long Position + { + get => _position - _offset; + set + { + if (value > Length) + { + throw new ArgumentOutOfRangeException(nameof(value)); + } + + _position = Seek(value, SeekOrigin.Begin); + } + } + public override void Flush() { } @@ -178,27 +200,5 @@ public sealed class HttpPostedFile : IDisposable { throw new NotSupportedException(); } - - public override bool CanRead => true; - - public override bool CanSeek => true; - - public override bool CanWrite => false; - - public override long Length => _end - _offset; - - public override long Position - { - get => _position - _offset; - set - { - if (value > Length) - { - throw new ArgumentOutOfRangeException(nameof(value)); - } - - _position = Seek(value, SeekOrigin.Begin); - } - } } } |
