fix SA1005

This commit is contained in:
telans
2020-06-14 21:11:11 +12:00
parent 726e116d5b
commit acd4389653
82 changed files with 247 additions and 247 deletions

View File

@@ -118,7 +118,7 @@ namespace Emby.Server.Implementations.Services
var componentsList = new List<string>();
//We only split on '.' if the restPath has them. Allows for /{action}.{type}
// We only split on '.' if the restPath has them. Allows for /{action}.{type}
var hasSeparators = new List<bool>();
foreach (var component in this.restPath.Split(PathSeperatorChar))
{
@@ -298,12 +298,12 @@ namespace Emby.Server.Implementations.Services
return -1;
}
//Routes with least wildcard matches get the highest score
// Routes with least wildcard matches get the highest score
var score = Math.Max((100 - wildcardMatchCount), 1) * 1000
//Routes with less variable (and more literal) matches
// Routes with less variable (and more literal) matches
+ Math.Max((10 - VariableArgsCount), 1) * 100;
//Exact verb match is better than ANY
// Exact verb match is better than ANY
if (Verbs.Length == 1 && string.Equals(httpMethod, Verbs[0], StringComparison.OrdinalIgnoreCase))
{
score += 10;
@@ -470,7 +470,7 @@ namespace Emby.Server.Implementations.Services
+ variableName + " on " + RequestType.GetMethodName());
}
var value = requestComponents.Length > pathIx ? requestComponents[pathIx] : null; //wildcard has arg mismatch
var value = requestComponents.Length > pathIx ? requestComponents[pathIx] : null; // wildcard has arg mismatch
if (value != null && this.isWildcard[i])
{
if (i == this.TotalComponentsCount - 1)
@@ -519,8 +519,8 @@ namespace Emby.Server.Implementations.Services
if (queryStringAndFormData != null)
{
//Query String and form data can override variable path matches
//path variables < query string < form data
// Query String and form data can override variable path matches
// path variables < query string < form data
foreach (var name in queryStringAndFormData)
{
requestKeyValuesMap[name.Key] = name.Value;