Fix some warnings

This commit is contained in:
Bond-009
2019-10-25 12:47:20 +02:00
committed by Bond_009
parent 7846e9cb3c
commit b477b3874e
48 changed files with 128 additions and 100 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -45,8 +46,8 @@ namespace Emby.Server.Implementations.Services
public int PathComponentsCount { get; set; }
/// <summary>
/// The total number of segments after subparts have been exploded ('.')
/// e.g. /path/to/here.ext == 4
/// Gets or sets the total number of segments after subparts have been exploded ('.')
/// e.g. /path/to/here.ext == 4.
/// </summary>
public int TotalComponentsCount { get; set; }
@@ -279,7 +280,7 @@ namespace Emby.Server.Implementations.Services
}
/// <summary>
/// Provide for quick lookups based on hashes that can be determined from a request url
/// Provide for quick lookups based on hashes that can be determined from a request url.
/// </summary>
public string FirstMatchHashKey { get; private set; }
@@ -436,9 +437,12 @@ namespace Emby.Server.Implementations.Services
&& requestComponents.Length >= this.TotalComponentsCount - this.wildcardCount;
if (!isValidWildCardPath)
throw new ArgumentException(string.Format(
"Path Mismatch: Request Path '{0}' has invalid number of components compared to: '{1}'",
pathInfo, this.restPath));
throw new ArgumentException(
string.Format(
CultureInfo.InvariantCulture,
"Path Mismatch: Request Path '{0}' has invalid number of components compared to: '{1}'",
pathInfo,
this.restPath));
}
var requestKeyValuesMap = new Dictionary<string, string>();

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using MediaBrowser.Controller.Net;
@@ -175,7 +175,7 @@ namespace Emby.Server.Implementations.Services
private SwaggerTag[] GetTags()
{
return new SwaggerTag[] { };
return Array.Empty<SwaggerTag>();
}
private Dictionary<string, SwaggerDefinition> GetDefinitions()