diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-03-27 16:34:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-27 16:34:26 +0100 |
| commit | d0fbd260d5cc386119d96f53cdc1d164b80d02df (patch) | |
| tree | 55d465b25aae29128b77d1867f0bfd9a1fc3708f /Emby.Server.Implementations/SocketSharp/HttpPostedFile.cs | |
| parent | 7f42dcc60fd3aaf30f2408f6bddeb2b8bf921cdf (diff) | |
| parent | 524357bfa845e1c01ef280b1d0fc3896b7b9dbaa (diff) | |
Merge branch 'master' into httpclient
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); - } - } } } |
