diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-12 21:41:08 +0100 |
|---|---|---|
| committer | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-12 21:41:08 +0100 |
| commit | 846456b41e87c8ccced544298b80a27d0f199215 (patch) | |
| tree | 8196146818ecee84bfd5ee99ed1c5aea0402d165 /Emby.Server.Implementations | |
| parent | e2751d42e8775596b7c4b929fd004d879f980947 (diff) | |
Reformatted the files with notes.
Diffstat (limited to 'Emby.Server.Implementations')
8 files changed, 30 insertions, 31 deletions
diff --git a/Emby.Server.Implementations/Devices/DeviceId.cs b/Emby.Server.Implementations/Devices/DeviceId.cs index 5630d7d3c..4f5950ac7 100644 --- a/Emby.Server.Implementations/Devices/DeviceId.cs +++ b/Emby.Server.Implementations/Devices/DeviceId.cs @@ -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; diff --git a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs index dbc7b16a2..7397d4b60 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs @@ -332,7 +332,7 @@ namespace Emby.Server.Implementations.LiveTv { try { - dto.ParentBackdropImageTags = new [] + dto.ParentBackdropImageTags = new[] { _imageProcessor.GetImageCacheTag(program, image) }; diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs index 1a33154f8..fd78dfa8e 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs @@ -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"); diff --git a/Emby.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs index a5fa24fc8..38fbac030 100644 --- a/Emby.Server.Implementations/Playlists/PlaylistManager.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs @@ -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)) diff --git a/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs b/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs index 602eeb29b..c8d6f2022 100644 --- a/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs +++ b/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs @@ -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> diff --git a/Emby.Server.Implementations/Services/ServicePath.cs b/Emby.Server.Implementations/Services/ServicePath.cs index 4c98a3388..0222b3782 100644 --- a/Emby.Server.Implementations/Services/ServicePath.cs +++ b/Emby.Server.Implementations/Services/ServicePath.cs @@ -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)) diff --git a/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs b/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs index 32a8f6b45..1bbe30b95 100644 --- a/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs +++ b/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs @@ -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> diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs index c60757c02..5db68bbf1 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs @@ -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); + } } - } } |
