aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/SocketSharp/RequestMono.cs
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:31:14 +0100
committerErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:31:14 +0100
commita36658f6f0ed342d8b55dbf7c9ff95fe3abfa818 (patch)
treeb1484407efd83b243d0ea792b18c598e9ff53053 /Jellyfin.Server/SocketSharp/RequestMono.cs
parent9fa60ec9340cbc8b4ed3e866fcf61852077902a1 (diff)
ReSharper Reformat: Properties to expression bodied form.
Diffstat (limited to 'Jellyfin.Server/SocketSharp/RequestMono.cs')
-rw-r--r--Jellyfin.Server/SocketSharp/RequestMono.cs75
1 files changed, 13 insertions, 62 deletions
diff --git a/Jellyfin.Server/SocketSharp/RequestMono.cs b/Jellyfin.Server/SocketSharp/RequestMono.cs
index ffa57758a..6e5a4e75a 100644
--- a/Jellyfin.Server/SocketSharp/RequestMono.cs
+++ b/Jellyfin.Server/SocketSharp/RequestMono.cs
@@ -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