aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Services
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Services')
-rw-r--r--MediaBrowser.Model/Services/ApiMemberAttribute.cs3
-rw-r--r--MediaBrowser.Model/Services/IHasRequestFilter.cs2
-rw-r--r--MediaBrowser.Model/Services/IHttpRequest.cs4
-rw-r--r--MediaBrowser.Model/Services/IHttpResult.cs11
-rw-r--r--MediaBrowser.Model/Services/IRequest.cs13
-rw-r--r--MediaBrowser.Model/Services/IRequiresRequestStream.cs2
-rw-r--r--MediaBrowser.Model/Services/IService.cs2
-rw-r--r--MediaBrowser.Model/Services/QueryParamCollection.cs10
-rw-r--r--MediaBrowser.Model/Services/RouteAttribute.cs19
9 files changed, 42 insertions, 24 deletions
diff --git a/MediaBrowser.Model/Services/ApiMemberAttribute.cs b/MediaBrowser.Model/Services/ApiMemberAttribute.cs
index 8e50836f4..63f3ecd55 100644
--- a/MediaBrowser.Model/Services/ApiMemberAttribute.cs
+++ b/MediaBrowser.Model/Services/ApiMemberAttribute.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
namespace MediaBrowser.Model.Services
@@ -57,7 +58,7 @@ namespace MediaBrowser.Model.Services
public string Route { get; set; }
/// <summary>
- /// Whether to exclude this property from being included in the ModelSchema
+ /// Whether to exclude this property from being included in the ModelSchema.
/// </summary>
public bool ExcludeInSchema { get; set; }
}
diff --git a/MediaBrowser.Model/Services/IHasRequestFilter.cs b/MediaBrowser.Model/Services/IHasRequestFilter.cs
index 3e49e9872..b83d3b075 100644
--- a/MediaBrowser.Model/Services/IHasRequestFilter.cs
+++ b/MediaBrowser.Model/Services/IHasRequestFilter.cs
@@ -7,7 +7,7 @@ namespace MediaBrowser.Model.Services
public interface IHasRequestFilter
{
/// <summary>
- /// Order in which Request Filters are executed.
+ /// Gets the order in which Request Filters are executed.
/// &lt;0 Executed before global request filters.
/// &gt;0 Executed after global request filters.
/// </summary>
diff --git a/MediaBrowser.Model/Services/IHttpRequest.cs b/MediaBrowser.Model/Services/IHttpRequest.cs
index 4dccd2d68..3ea65195c 100644
--- a/MediaBrowser.Model/Services/IHttpRequest.cs
+++ b/MediaBrowser.Model/Services/IHttpRequest.cs
@@ -5,12 +5,12 @@ namespace MediaBrowser.Model.Services
public interface IHttpRequest : IRequest
{
/// <summary>
- /// The HTTP Verb
+ /// Gets the HTTP Verb.
/// </summary>
string HttpMethod { get; }
/// <summary>
- /// The value of the Accept HTTP Request Header
+ /// Gets the value of the Accept HTTP Request Header.
/// </summary>
string Accept { get; }
}
diff --git a/MediaBrowser.Model/Services/IHttpResult.cs b/MediaBrowser.Model/Services/IHttpResult.cs
index b153f15ec..abc581d8e 100644
--- a/MediaBrowser.Model/Services/IHttpResult.cs
+++ b/MediaBrowser.Model/Services/IHttpResult.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System.Net;
@@ -7,27 +8,27 @@ namespace MediaBrowser.Model.Services
public interface IHttpResult : IHasHeaders
{
/// <summary>
- /// The HTTP Response Status
+ /// The HTTP Response Status.
/// </summary>
int Status { get; set; }
/// <summary>
- /// The HTTP Response Status Code
+ /// The HTTP Response Status Code.
/// </summary>
HttpStatusCode StatusCode { get; set; }
/// <summary>
- /// The HTTP Response ContentType
+ /// The HTTP Response ContentType.
/// </summary>
string ContentType { get; set; }
/// <summary>
- /// Response DTO
+ /// Response DTO.
/// </summary>
object Response { get; set; }
/// <summary>
- /// Holds the request call context
+ /// Holds the request call context.
/// </summary>
IRequest RequestContext { get; set; }
}
diff --git a/MediaBrowser.Model/Services/IRequest.cs b/MediaBrowser.Model/Services/IRequest.cs
index 3f4edced6..8bc1d3668 100644
--- a/MediaBrowser.Model/Services/IRequest.cs
+++ b/MediaBrowser.Model/Services/IRequest.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -22,7 +23,7 @@ namespace MediaBrowser.Model.Services
string Verb { get; }
/// <summary>
- /// The request ContentType
+ /// The request ContentType.
/// </summary>
string ContentType { get; }
@@ -31,7 +32,7 @@ namespace MediaBrowser.Model.Services
string UserAgent { get; }
/// <summary>
- /// The expected Response ContentType for this request
+ /// The expected Response ContentType for this request.
/// </summary>
string ResponseContentType { get; set; }
@@ -54,7 +55,7 @@ namespace MediaBrowser.Model.Services
string RemoteIp { get; }
/// <summary>
- /// The value of the Authorization Header used to send the Api Key, null if not available
+ /// The value of the Authorization Header used to send the Api Key, null if not available.
/// </summary>
string Authorization { get; }
@@ -67,7 +68,7 @@ namespace MediaBrowser.Model.Services
long ContentLength { get; }
/// <summary>
- /// The value of the Referrer, null if not available
+ /// The value of the Referrer, null if not available.
/// </summary>
Uri UrlReferrer { get; }
}
@@ -75,9 +76,13 @@ namespace MediaBrowser.Model.Services
public interface IHttpFile
{
string Name { get; }
+
string FileName { get; }
+
long ContentLength { get; }
+
string ContentType { get; }
+
Stream InputStream { get; }
}
diff --git a/MediaBrowser.Model/Services/IRequiresRequestStream.cs b/MediaBrowser.Model/Services/IRequiresRequestStream.cs
index 622626edc..3e5f2da42 100644
--- a/MediaBrowser.Model/Services/IRequiresRequestStream.cs
+++ b/MediaBrowser.Model/Services/IRequiresRequestStream.cs
@@ -7,7 +7,7 @@ namespace MediaBrowser.Model.Services
public interface IRequiresRequestStream
{
/// <summary>
- /// The raw Http Request Input Stream
+ /// The raw Http Request Input Stream.
/// </summary>
Stream RequestStream { get; set; }
}
diff --git a/MediaBrowser.Model/Services/IService.cs b/MediaBrowser.Model/Services/IService.cs
index a26d39455..5233f57ab 100644
--- a/MediaBrowser.Model/Services/IService.cs
+++ b/MediaBrowser.Model/Services/IService.cs
@@ -8,6 +8,8 @@ namespace MediaBrowser.Model.Services
}
public interface IReturn { }
+
public interface IReturn<T> : IReturn { }
+
public interface IReturnVoid : IReturn { }
}
diff --git a/MediaBrowser.Model/Services/QueryParamCollection.cs b/MediaBrowser.Model/Services/QueryParamCollection.cs
index 19e9e53e7..bdb0cabdf 100644
--- a/MediaBrowser.Model/Services/QueryParamCollection.cs
+++ b/MediaBrowser.Model/Services/QueryParamCollection.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -19,11 +20,6 @@ namespace MediaBrowser.Model.Services
return StringComparison.OrdinalIgnoreCase;
}
- private static StringComparer GetStringComparer()
- {
- return StringComparer.OrdinalIgnoreCase;
- }
-
/// <summary>
/// Adds a new query parameter.
/// </summary>
@@ -128,8 +124,8 @@ namespace MediaBrowser.Model.Services
/// Gets or sets a query parameter value by name. A query may contain multiple values of the same name
/// (i.e. "x=1&amp;x=2"), in which case the value is an array, which works for both getting and setting.
/// </summary>
- /// <param name="name">The query parameter name</param>
- /// <returns>The query parameter value or array of values</returns>
+ /// <param name="name">The query parameter name.</param>
+ /// <returns>The query parameter value or array of values.</returns>
public string this[string name]
{
get => Get(name);
diff --git a/MediaBrowser.Model/Services/RouteAttribute.cs b/MediaBrowser.Model/Services/RouteAttribute.cs
index 197ba05e5..f8bf51112 100644
--- a/MediaBrowser.Model/Services/RouteAttribute.cs
+++ b/MediaBrowser.Model/Services/RouteAttribute.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -127,9 +128,21 @@ namespace MediaBrowser.Model.Services
public override bool Equals(object obj)
{
- if (ReferenceEquals(null, obj)) return false;
- if (ReferenceEquals(this, obj)) return true;
- if (obj.GetType() != this.GetType()) return false;
+ if (ReferenceEquals(null, obj))
+ {
+ return false;
+ }
+
+ if (ReferenceEquals(this, obj))
+ {
+ return true;
+ }
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
return Equals((RouteAttribute)obj);
}