Suppress non-critical warnings, refactor Emby.Naming

Expanded .editorconfig to silence non-critical IDE/StyleCop warnings and updated Emby.Naming.csproj to prevent warnings-as-errors in Debug. Refactored codebase for modern C# style, removed unused code and unnecessary usings, and fixed formatting and StringComparison issues. Added detailed documentation on code style and warning suppression. Project now builds cleanly with only critical issues surfaced.
This commit is contained in:
2026-02-21 12:48:04 -05:00
parent 477045704e
commit 8421e3ad5c
107 changed files with 714 additions and 543 deletions
+6 -6
View File
@@ -15,10 +15,10 @@ public class FileStackRule
/// </summary>
/// <param name="token">Token.</param>
/// <param name="isNumerical">Whether the file stack rule uses numerical or alphabetical numbering.</param>
public this.FileStackRule(string token, bool isNumerical)
public FileStackRule(string token, bool isNumerical)
{
_tokenRegex = new this.Regex(token, RegexOptions.IgnoreCase | RegexOptions.Compiled);
this.IsNumerical = isNumerical;
_tokenRegex = new Regex(token, RegexOptions.IgnoreCase | RegexOptions.Compiled);
IsNumerical = isNumerical;
}
/// <summary>
@@ -32,9 +32,9 @@ public class FileStackRule
/// <param name="input">The input.</param>
/// <param name="result">The part type and number or <c>null</c>.</param>
/// <returns>A value indicating whether the input matched the rule.</returns>
public bool this.Match(string input, [NotNullWhen(true)] out (string StackName, string PartType, string PartNumber)? result)
public bool Match(string input, [NotNullWhen(true)] out (string StackName, string PartType, string PartNumber)? result)
{
this.result = null;
result = null;
var match = _tokenRegex.Match(input);
if (!match.Success)
{
@@ -42,7 +42,7 @@ public class FileStackRule
}
var partType = match.Groups["parttype"].Success ? match.Groups["parttype"].Value : "unknown";
this.result = (match.Groups["filename"].Value, partType, match.Groups["number"].Value);
result = (match.Groups["filename"].Value, partType, match.Groups["number"].Value);
return true;
}
}