aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:46:33 +0100
committerErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:46:33 +0100
commite8674464373c3635243953cded42fcd2aa87d196 (patch)
tree8087e1c5d47a525b04f3ae7e99183f68391bb410 /Emby.Naming
parent65bd052f3e8682d177520af57db1c8ef5cb33262 (diff)
ReSharper format: conform inline 'out' parameters.
Diffstat (limited to 'Emby.Naming')
-rw-r--r--Emby.Naming/Audio/AlbumParser.cs3
-rw-r--r--Emby.Naming/AudioBook/AudioBookFilePathParser.cs6
-rw-r--r--Emby.Naming/TV/EpisodePathParser.cs6
-rw-r--r--Emby.Naming/TV/SeasonPathParser.cs9
-rw-r--r--Emby.Naming/Video/CleanDateTimeParser.cs3
5 files changed, 9 insertions, 18 deletions
diff --git a/Emby.Naming/Audio/AlbumParser.cs b/Emby.Naming/Audio/AlbumParser.cs
index 8cf8ec5e5..7d029a9f4 100644
--- a/Emby.Naming/Audio/AlbumParser.cs
+++ b/Emby.Naming/Audio/AlbumParser.cs
@@ -49,8 +49,7 @@ namespace Emby.Naming.Audio
tmp = tmp.Trim().Split(' ').FirstOrDefault() ?? string.Empty;
- int val;
- if (int.TryParse(tmp, NumberStyles.Integer, CultureInfo.InvariantCulture, out val))
+ if (int.TryParse(tmp, NumberStyles.Integer, CultureInfo.InvariantCulture, out var val))
{
result.IsMultiPart = true;
break;
diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs
index b386593e7..590979794 100644
--- a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs
+++ b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs
@@ -34,8 +34,7 @@ namespace Emby.Naming.AudioBook
var value = match.Groups["chapter"];
if (value.Success)
{
- int intValue;
- if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out intValue))
+ if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intValue))
{
result.ChapterNumber = intValue;
}
@@ -46,8 +45,7 @@ namespace Emby.Naming.AudioBook
var value = match.Groups["part"];
if (value.Success)
{
- int intValue;
- if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out intValue))
+ if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intValue))
{
result.ChapterNumber = intValue;
}
diff --git a/Emby.Naming/TV/EpisodePathParser.cs b/Emby.Naming/TV/EpisodePathParser.cs
index 260cb505c..9485d697b 100644
--- a/Emby.Naming/TV/EpisodePathParser.cs
+++ b/Emby.Naming/TV/EpisodePathParser.cs
@@ -122,8 +122,7 @@ namespace Emby.Naming.TV
}
else if (expression.IsNamed)
{
- int num;
- if (int.TryParse(match.Groups["seasonnumber"].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out num))
+ if (int.TryParse(match.Groups["seasonnumber"].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var num))
{
result.SeasonNumber = num;
}
@@ -154,8 +153,7 @@ namespace Emby.Naming.TV
}
else
{
- int num;
- if (int.TryParse(match.Groups[1].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out num))
+ if (int.TryParse(match.Groups[1].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var num))
{
result.SeasonNumber = num;
}
diff --git a/Emby.Naming/TV/SeasonPathParser.cs b/Emby.Naming/TV/SeasonPathParser.cs
index 002bbe19c..f1dcc50b8 100644
--- a/Emby.Naming/TV/SeasonPathParser.cs
+++ b/Emby.Naming/TV/SeasonPathParser.cs
@@ -72,8 +72,7 @@ namespace Emby.Naming.TV
if (supportNumericSeasonFolders)
{
- int val;
- if (int.TryParse(filename, NumberStyles.Integer, CultureInfo.InvariantCulture, out val))
+ if (int.TryParse(filename, NumberStyles.Integer, CultureInfo.InvariantCulture, out var val))
{
return new Tuple<int?, bool>(val, true);
}
@@ -83,8 +82,7 @@ namespace Emby.Naming.TV
{
var testFilename = filename.Substring(1);
- int val;
- if (int.TryParse(testFilename, NumberStyles.Integer, CultureInfo.InvariantCulture, out val))
+ if (int.TryParse(testFilename, NumberStyles.Integer, CultureInfo.InvariantCulture, out var val))
{
return new Tuple<int?, bool>(val, true);
}
@@ -121,8 +119,7 @@ namespace Emby.Naming.TV
part = part.Substring(1);
- int value;
- if (int.TryParse(part, NumberStyles.Integer, CultureInfo.InvariantCulture, out value))
+ if (int.TryParse(part, NumberStyles.Integer, CultureInfo.InvariantCulture, out var value))
{
return value;
}
diff --git a/Emby.Naming/Video/CleanDateTimeParser.cs b/Emby.Naming/Video/CleanDateTimeParser.cs
index 702e7ae6f..74807ef53 100644
--- a/Emby.Naming/Video/CleanDateTimeParser.cs
+++ b/Emby.Naming/Video/CleanDateTimeParser.cs
@@ -71,8 +71,7 @@ namespace Emby.Naming.Video
if (match.Success && match.Groups.Count == 4)
{
- int year;
- if (match.Groups[1].Success && match.Groups[2].Success && int.TryParse(match.Groups[2].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out year))
+ if (match.Groups[1].Success && match.Groups[2].Success && int.TryParse(match.Groups[2].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var year))
{
name = match.Groups[1].Value;
result.Year = year;