ReSharper Reformat: Properties to expression bodied form.

This commit is contained in:
Erwin de Haan
2019-01-13 21:31:14 +01:00
parent 9fa60ec934
commit a36658f6f0
185 changed files with 782 additions and 3786 deletions

View File

@@ -113,21 +113,9 @@ namespace Jellyfin.SocketSharp
return form;
}
public string Accept
{
get
{
return string.IsNullOrEmpty(request.Headers["Accept"]) ? null : request.Headers["Accept"];
}
}
public string Accept => string.IsNullOrEmpty(request.Headers["Accept"]) ? null : request.Headers["Accept"];
public string Authorization
{
get
{
return string.IsNullOrEmpty(request.Headers["Authorization"]) ? null : request.Headers["Authorization"];
}
}
public string Authorization => string.IsNullOrEmpty(request.Headers["Authorization"]) ? null : request.Headers["Authorization"];
protected bool validate_cookies, validate_query_string, validate_form;
protected bool checked_cookies, checked_query_string, checked_form;
@@ -410,30 +398,17 @@ namespace Jellyfin.SocketSharp
throw new NotSupportedException();
}
public override bool CanRead
{
get { return true; }
}
public override bool CanSeek
{
get { return true; }
}
public override bool CanWrite
{
get { return false; }
}
public override bool CanRead => true;
public override long Length
{
get { return end - offset; }
}
public override bool CanSeek => true;
public override bool CanWrite => false;
public override long Length => end - offset;
public override long Position
{
get
{
return position - offset;
}
get => position - offset;
set
{
if (value > Length)
@@ -451,37 +426,13 @@ namespace Jellyfin.SocketSharp
this.stream = new ReadSubStream(base_stream, offset, length);
}
public string ContentType
{
get
{
return content_type;
}
}
public string ContentType => content_type;
public int ContentLength
{
get
{
return (int)stream.Length;
}
}
public int ContentLength => (int)stream.Length;
public string FileName
{
get
{
return name;
}
}
public string FileName => name;
public Stream InputStream
{
get
{
return stream;
}
}
public Stream InputStream => stream;
}
class Helpers