set WarningsAsErrors = true

This commit is contained in:
John Andrews
2024-05-07 14:05:03 +12:00
parent d6c2034d8e
commit d60b0486b6
81 changed files with 732 additions and 946 deletions
+2
View File
@@ -24,11 +24,13 @@ namespace MetaNodes.Tests
{
if (args == null || args.Length == 0)
return;
#pragma warning disable IL2026
string message = type + " -> " +
string.Join(", ", args.Select(x =>
x == null ? "null" :
x.GetType().IsPrimitive || x is string ? x.ToString() :
System.Text.Json.JsonSerializer.Serialize(x)));
#pragma warning restore IL2026
Messages.Add(message);
}
@@ -186,10 +186,12 @@ public class MovieLookupTests
var md = MovieLookup.GetVideoMetadata(args, movieApi, 414906, @"D:\videos\temp");
Assert.IsNotNull(md);
#pragma warning disable IL2026
string json = System.Text.Json.JsonSerializer.Serialize(md, new System.Text.Json.JsonSerializerOptions
{
WriteIndented = true
});
#pragma warning restore IL2026
File.WriteAllText(@"D:\videos\metadata.json", json);
}
[TestMethod]