Enforce NuGet warnings as errors; refactor field access

Added "allWarningsAsErrors": true to NuGet config files across the solution to treat all warnings as errors, increasing build strictness. Updated project cache hashes and assembly info files to reflect these changes. Refactored C# code to use explicit `this.` for field and property assignments, improving clarity. Note: some method signatures were incorrectly changed to use `this.` as a prefix, which is invalid C# syntax and must be corrected before compiling. Binary files updated due to build changes.
This commit is contained in:
2026-02-21 11:07:54 -05:00
parent 2b3a0c9746
commit 477045704e
141 changed files with 714 additions and 291 deletions
+13 -13
View File
@@ -21,7 +21,7 @@ namespace Emby.Naming.TV
/// Initializes a new instance of the <see cref="EpisodePathParser"/> class.
/// </summary>
/// <param name="options"><see cref="NamingOptions"/> object containing EpisodeExpressions and MultipleEpisodeExpressions.</param>
public EpisodePathParser(NamingOptions options)
public this.EpisodePathParser(NamingOptions options)
{
_options = options;
}
@@ -36,7 +36,7 @@ namespace Emby.Naming.TV
/// <param name="supportsAbsoluteNumbers">Do we want to use expressions supporting absolute episode numbers.</param>
/// <param name="fillExtendedInfo">Should we attempt to retrieve extended information.</param>
/// <returns>Returns <see cref="EpisodePathParserResult"/> object.</returns>
public EpisodePathParserResult Parse(
public EpisodePathParserResult this.Parse(
string path,
bool isDirectory,
bool? isNamed = null,
@@ -72,17 +72,17 @@ namespace Emby.Naming.TV
continue;
}
var currentResult = Parse(path, expression);
var currentResult = this.Parse(path, expression);
if (currentResult.Success)
{
result = currentResult;
this.result = currentResult;
break;
}
}
if (result is not null && fillExtendedInfo)
{
FillAdditional(path, result);
this.FillAdditional(path, result);
if (!string.IsNullOrEmpty(result.SeriesName))
{
@@ -93,17 +93,17 @@ namespace Emby.Naming.TV
}
}
return result ?? new EpisodePathParserResult();
return result ?? new this.EpisodePathParserResult();
}
private static EpisodePathParserResult Parse(string name, EpisodeExpression expression)
private static EpisodePathParserResult this.Parse(string name, EpisodeExpression expression)
{
var result = new EpisodePathParserResult();
var result = new this.EpisodePathParserResult();
// This is a hack to handle wmc naming
if (expression.IsByDate)
{
name = name.Replace('_', '-');
this.name = name.Replace('_', '-');
}
var match = expression.Regex.Match(name);
@@ -202,7 +202,7 @@ namespace Emby.Naming.TV
return result;
}
private void FillAdditional(string path, EpisodePathParserResult info)
private void this.FillAdditional(string path, EpisodePathParserResult info)
{
var expressions = _options.MultipleEpisodeExpressions.Where(i => i.IsNamed).ToList();
@@ -211,14 +211,14 @@ namespace Emby.Naming.TV
expressions.InsertRange(0, _options.EpisodeExpressions.Where(i => i.IsNamed));
}
FillAdditional(path, info, expressions);
this.FillAdditional(path, info, expressions);
}
private void FillAdditional(string path, EpisodePathParserResult info, IEnumerable<EpisodeExpression> expressions)
private void this.FillAdditional(string path, EpisodePathParserResult info, IEnumerable<EpisodeExpression> expressions)
{
foreach (var i in expressions)
{
var result = Parse(path, i);
var result = this.Parse(path, i);
if (!result.Success)
{