Merge pull request #1021 from Bond-009/failonwarn

Fail on warnings for Jellyfin.Server
This commit is contained in:
Vasily
2019-03-12 11:31:22 +03:00
committed by GitHub
5 changed files with 118 additions and 134 deletions

View File

@@ -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);
}
}
}
}