From 023c77ff09ac41854018989501ce6b9344d3d44b Mon Sep 17 00:00:00 2001 From: Nils Andresen Date: Fri, 10 Nov 2023 23:38:19 +0100 Subject: [PATCH] fixed the build-errors All of which I introduced earlier. --- src/Spectre.Console.Testing/Cli/TypeRegistrarBaseTests.cs | 4 +++- src/Spectre.Console.Testing/FakeTypeResolver.cs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Spectre.Console.Testing/Cli/TypeRegistrarBaseTests.cs b/src/Spectre.Console.Testing/Cli/TypeRegistrarBaseTests.cs index 753c4d207..723dfcb19 100644 --- a/src/Spectre.Console.Testing/Cli/TypeRegistrarBaseTests.cs +++ b/src/Spectre.Console.Testing/Cli/TypeRegistrarBaseTests.cs @@ -246,7 +246,9 @@ private class MockService : IMockService private class AnotherMockService : IMockService { - public AnotherMockService(string _){} + public AnotherMockService(string ignore) + { + } } /// diff --git a/src/Spectre.Console.Testing/FakeTypeResolver.cs b/src/Spectre.Console.Testing/FakeTypeResolver.cs index 7a313a0fa..d6e85727f 100644 --- a/src/Spectre.Console.Testing/FakeTypeResolver.cs +++ b/src/Spectre.Console.Testing/FakeTypeResolver.cs @@ -40,7 +40,7 @@ public FakeTypeResolver( if (_instances.TryGetValue(type, out var listInstances)) { - listInstances.ForEach(i => castList.Add(i)); + listInstances.ForEach(i => castList!.Add(i)); } if (_registrations.TryGetValue(type, out var listRegistrations)) @@ -48,7 +48,7 @@ public FakeTypeResolver( listRegistrations .Select(x => Activator.CreateInstance(x)!) .ToList() - .ForEach(i => castList.Add(i)); + .ForEach(i => castList!.Add(i)); } return allRegistrations;