Reformatted the files with notes.

This commit is contained in:
Erwin de Haan
2019-01-12 21:41:08 +01:00
parent e2751d42e8
commit 846456b41e
20 changed files with 217 additions and 216 deletions

View File

@@ -89,9 +89,10 @@ namespace Emby.Server.Implementations.Devices
public DeviceId(IApplicationPaths appPaths, ILogger logger, IFileSystem fileSystem)
{
if (fileSystem == null) {
throw new ArgumentNullException(nameof(fileSystem));
}
if (fileSystem == null)
{
throw new ArgumentNullException(nameof(fileSystem));
}
_appPaths = appPaths;
_logger = logger;

View File

@@ -332,7 +332,7 @@ namespace Emby.Server.Implementations.LiveTv
{
try
{
dto.ParentBackdropImageTags = new []
dto.ParentBackdropImageTags = new[]
{
_imageProcessor.GetImageCacheTag(program, image)
};

View File

@@ -207,7 +207,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
throw new ArgumentNullException(nameof(buffer));
if (offset + count < 0)
throw new ArgumentOutOfRangeException(nameof(offset),"offset + count must not be negative");
throw new ArgumentOutOfRangeException(nameof(offset), "offset + count must not be negative");
if (offset + count > buffer.Length)
throw new ArgumentException("offset + count must not be greater than the length of buffer");

View File

@@ -459,7 +459,7 @@ namespace Emby.Server.Implementations.Playlists
{
if (string.IsNullOrEmpty(folderPath))
{
throw new ArgumentException("Folder path was null or empty.",nameof(folderPath));
throw new ArgumentException("Folder path was null or empty.", nameof(folderPath));
}
if (string.IsNullOrEmpty(fileAbsolutePath))

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -29,7 +29,6 @@ namespace Emby.Server.Implementations.ScheduledTasks
/// <value>The scheduled task.</value>
public IScheduledTask ScheduledTask { get; private set; }
/// <summary>
/// Gets or sets the json serializer.
/// </summary>
/// <value>The json serializer.</value>

View File

@@ -116,7 +116,6 @@ namespace Emby.Server.Implementations.Services
{
if (string.IsNullOrEmpty(component)) continue;
if (StringContains(component, VariablePrefix)
&& component.IndexOf(ComponentSeperator) != -1)
{
@@ -352,7 +351,7 @@ namespace Emby.Server.Implementations.Services
if (withPathInfoParts.Length != this.PathComponentsCount && !this.IsWildCardPath)
{
return false;
return false;
}
if (!Verbs.Contains(httpMethod, StringComparer.OrdinalIgnoreCase))

View File

@@ -1,4 +1,4 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Sorting;
using MediaBrowser.Model.Querying;
using System;
@@ -24,7 +24,7 @@ namespace Emby.Server.Implementations.Sorting
return hasSeries != null ? hasSeries.FindSeriesSortName() : null;
}
/// <summary>
/// Gets the name.
/// </summary>

View File

@@ -1,25 +1,25 @@
using System;
using System;
namespace NLangDetect.Core.Extensions
{
public static class StringExtensions
{
/// <summary>
/// Returns a new character sequence that is a subsequence of this sequence. The subsequence starts with the character at the specified index and ends with the character at index end - 1. The length of the returned sequence is end - start, so if start == end then an empty sequence is returned.
/// </summary>
/// <param name="s"></param>
/// <param name="start">the start index, inclusive</param>
/// <param name="end">the end index, exclusive</param>
/// <returns>the specified subsequence</returns>
/// <exception cref="IndexOutOfRangeException"> if start or end are negative, if end is greater than length(), or if start is greater than end</exception>
public static string SubSequence(this string s, int start, int end)
public static class StringExtensions
{
if (start < 0) throw new ArgumentOutOfRangeException(nameof(start), "Argument must not be negative.");
if (end < 0) throw new ArgumentOutOfRangeException(nameof(end), "Argument must not be negative.");
if (end > s.Length) throw new ArgumentOutOfRangeException(nameof(end), "Argument must not be greater than the input string's length.");
if (start > end) throw new ArgumentOutOfRangeException(nameof(start), "Argument must not be greater than the 'end' argument.");
return s.Substring(start, end - start);
/// <summary>
/// Returns a new character sequence that is a subsequence of this sequence. The subsequence starts with the character at the specified index and ends with the character at index end - 1. The length of the returned sequence is end - start, so if start == end then an empty sequence is returned.
/// </summary>
/// <param name="s"></param>
/// <param name="start">the start index, inclusive</param>
/// <param name="end">the end index, exclusive</param>
/// <returns>the specified subsequence</returns>
/// <exception cref="IndexOutOfRangeException"> if start or end are negative, if end is greater than length(), or if start is greater than end</exception>
public static string SubSequence(this string s, int start, int end)
{
if (start < 0) throw new ArgumentOutOfRangeException(nameof(start), "Argument must not be negative.");
if (end < 0) throw new ArgumentOutOfRangeException(nameof(end), "Argument must not be negative.");
if (end > s.Length) throw new ArgumentOutOfRangeException(nameof(end), "Argument must not be greater than the input string's length.");
if (start > end) throw new ArgumentOutOfRangeException(nameof(start), "Argument must not be greater than the 'end' argument.");
return s.Substring(start, end - start);
}
}
}
}