From dff49c896e89888c1e348491424b11297fe55c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20Hellstr=C3=B6m?= Date: Thu, 2 May 2024 20:53:44 +0200 Subject: [PATCH] Dependency upgrades (#1091) * Dependency upgrades * Fixed new warnings introduced in new version of roslyn --- .../NetDaemon.AppModel.SourceDeployedApps.csproj | 2 +- .../NetDaemon.AppModel.Tests.csproj | 4 ++-- .../NetDaemon.AppModel/NetDaemon.AppModel.csproj | 2 +- .../NetDaemon.HassClient.Debug.csproj | 2 +- .../NetDaemon.HassClient.Tests.csproj | 4 ++-- .../NetDaemon.HassClient/NetDaemon.Client.csproj | 2 +- .../NetDaemon.Extensions.Logging.csproj | 2 +- .../NetDaemon.Extensions.Scheduling.Tests.csproj | 4 ++-- .../NetDaemon.Extensions.Scheduling.csproj | 2 +- .../NetDaemon.Extensions.Tts.csproj | 2 +- .../NetDaemon.HassModel.CodeGenerator.csproj | 2 +- .../Internal/AppScopedHaContextProviderTest.cs | 6 +++--- .../Internal/EntityStateCacheTest.cs | 12 ++++++------ .../Internal/QueuedObservabeTest.cs | 10 +++++----- .../NetDaemon.HassModel.Tests.csproj | 4 ++-- .../NetDaemon.Host.Default.csproj | 2 +- .../NetDaemon.Runtime.Tests.csproj | 4 ++-- .../NetDaemon.Runtime/NetDaemon.Runtime.csproj | 2 +- .../NetDaemon.Tests.Integration.csproj | 4 ++-- 19 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/AppModel/NetDaemon.AppModel.SourceDeployedApps/NetDaemon.AppModel.SourceDeployedApps.csproj b/src/AppModel/NetDaemon.AppModel.SourceDeployedApps/NetDaemon.AppModel.SourceDeployedApps.csproj index c719d8aef..757cc7daf 100644 --- a/src/AppModel/NetDaemon.AppModel.SourceDeployedApps/NetDaemon.AppModel.SourceDeployedApps.csproj +++ b/src/AppModel/NetDaemon.AppModel.SourceDeployedApps/NetDaemon.AppModel.SourceDeployedApps.csproj @@ -25,7 +25,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/AppModel/NetDaemon.AppModel.Tests/NetDaemon.AppModel.Tests.csproj b/src/AppModel/NetDaemon.AppModel.Tests/NetDaemon.AppModel.Tests.csproj index 509391b1b..2f5038a60 100644 --- a/src/AppModel/NetDaemon.AppModel.Tests/NetDaemon.AppModel.Tests.csproj +++ b/src/AppModel/NetDaemon.AppModel.Tests/NetDaemon.AppModel.Tests.csproj @@ -17,8 +17,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/AppModel/NetDaemon.AppModel/NetDaemon.AppModel.csproj b/src/AppModel/NetDaemon.AppModel/NetDaemon.AppModel.csproj index 464e0bc1b..1c0218034 100644 --- a/src/AppModel/NetDaemon.AppModel/NetDaemon.AppModel.csproj +++ b/src/AppModel/NetDaemon.AppModel/NetDaemon.AppModel.csproj @@ -23,7 +23,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Client/NetDaemon.HassClient.Debug/NetDaemon.HassClient.Debug.csproj b/src/Client/NetDaemon.HassClient.Debug/NetDaemon.HassClient.Debug.csproj index ff025fd55..d45449ffd 100644 --- a/src/Client/NetDaemon.HassClient.Debug/NetDaemon.HassClient.Debug.csproj +++ b/src/Client/NetDaemon.HassClient.Debug/NetDaemon.HassClient.Debug.csproj @@ -31,7 +31,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj b/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj index 823aba4ff..8f37fcbaa 100644 --- a/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj +++ b/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj @@ -12,8 +12,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Client/NetDaemon.HassClient/NetDaemon.Client.csproj b/src/Client/NetDaemon.HassClient/NetDaemon.Client.csproj index 1d4b3ff70..1e0c2021d 100644 --- a/src/Client/NetDaemon.HassClient/NetDaemon.Client.csproj +++ b/src/Client/NetDaemon.HassClient/NetDaemon.Client.csproj @@ -30,7 +30,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Extensions/NetDaemon.Extensions.Logging/NetDaemon.Extensions.Logging.csproj b/src/Extensions/NetDaemon.Extensions.Logging/NetDaemon.Extensions.Logging.csproj index 9a6137ea7..ea22253b5 100644 --- a/src/Extensions/NetDaemon.Extensions.Logging/NetDaemon.Extensions.Logging.csproj +++ b/src/Extensions/NetDaemon.Extensions.Logging/NetDaemon.Extensions.Logging.csproj @@ -20,7 +20,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Extensions/NetDaemon.Extensions.Scheduling.Tests/NetDaemon.Extensions.Scheduling.Tests.csproj b/src/Extensions/NetDaemon.Extensions.Scheduling.Tests/NetDaemon.Extensions.Scheduling.Tests.csproj index 03b0bb04b..9415eff87 100644 --- a/src/Extensions/NetDaemon.Extensions.Scheduling.Tests/NetDaemon.Extensions.Scheduling.Tests.csproj +++ b/src/Extensions/NetDaemon.Extensions.Scheduling.Tests/NetDaemon.Extensions.Scheduling.Tests.csproj @@ -16,9 +16,9 @@ - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Extensions/NetDaemon.Extensions.Scheduling/NetDaemon.Extensions.Scheduling.csproj b/src/Extensions/NetDaemon.Extensions.Scheduling/NetDaemon.Extensions.Scheduling.csproj index 865fe2e17..2f3ec6575 100644 --- a/src/Extensions/NetDaemon.Extensions.Scheduling/NetDaemon.Extensions.Scheduling.csproj +++ b/src/Extensions/NetDaemon.Extensions.Scheduling/NetDaemon.Extensions.Scheduling.csproj @@ -19,7 +19,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Extensions/NetDaemon.Extensions.Tts/NetDaemon.Extensions.Tts.csproj b/src/Extensions/NetDaemon.Extensions.Tts/NetDaemon.Extensions.Tts.csproj index 2ac092f08..fb9434fe6 100644 --- a/src/Extensions/NetDaemon.Extensions.Tts/NetDaemon.Extensions.Tts.csproj +++ b/src/Extensions/NetDaemon.Extensions.Tts/NetDaemon.Extensions.Tts.csproj @@ -17,7 +17,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/HassModel/NetDaemon.HassModel.CodeGenerator/NetDaemon.HassModel.CodeGenerator.csproj b/src/HassModel/NetDaemon.HassModel.CodeGenerator/NetDaemon.HassModel.CodeGenerator.csproj index 8035a67e0..9dce55685 100644 --- a/src/HassModel/NetDaemon.HassModel.CodeGenerator/NetDaemon.HassModel.CodeGenerator.csproj +++ b/src/HassModel/NetDaemon.HassModel.CodeGenerator/NetDaemon.HassModel.CodeGenerator.csproj @@ -18,7 +18,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/HassModel/NetDaemon.HassModel.Tests/Internal/AppScopedHaContextProviderTest.cs b/src/HassModel/NetDaemon.HassModel.Tests/Internal/AppScopedHaContextProviderTest.cs index c1cc1aa00..a6c337e59 100644 --- a/src/HassModel/NetDaemon.HassModel.Tests/Internal/AppScopedHaContextProviderTest.cs +++ b/src/HassModel/NetDaemon.HassModel.Tests/Internal/AppScopedHaContextProviderTest.cs @@ -24,7 +24,7 @@ public sealed class AppScopedHaContextProviderTest : IDisposable }; [Fact] - public async void TestCallService() + public async Task TestCallService() { var haContext = await CreateTargetAsync(); @@ -48,7 +48,7 @@ public async void TestCallService() } [Fact] - public async void TestCallServiceWithFloor() + public async Task TestCallServiceWithFloor() { var haContext = await CreateTargetAsync(); @@ -72,7 +72,7 @@ public async void TestCallServiceWithFloor() } [Fact] - public async void TestCallServiceWithLabel() + public async Task TestCallServiceWithLabel() { var haContext = await CreateTargetAsync(); diff --git a/src/HassModel/NetDaemon.HassModel.Tests/Internal/EntityStateCacheTest.cs b/src/HassModel/NetDaemon.HassModel.Tests/Internal/EntityStateCacheTest.cs index 46dafb679..c0d2e0ce5 100644 --- a/src/HassModel/NetDaemon.HassModel.Tests/Internal/EntityStateCacheTest.cs +++ b/src/HassModel/NetDaemon.HassModel.Tests/Internal/EntityStateCacheTest.cs @@ -11,7 +11,7 @@ namespace NetDaemon.HassModel.Tests.Internal; public class EntityStateCacheTest { [Fact] - public async void StateChangeEventIsFirstStoredInCacheThanForwarded() + public async Task StateChangeEventIsFirstStoredInCacheThanForwarded() { var entityId = "sensor.test"; @@ -36,7 +36,7 @@ public async void StateChangeEventIsFirstStoredInCacheThanForwarded() n.SubscribeToHomeAssistantEventsAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(testSubject ); - + var serviceColletion = new ServiceCollection(); _ = serviceColletion.AddTransient>(_ => testSubject); var sp = serviceColletion.BuildServiceProvider(); @@ -83,7 +83,7 @@ public async void StateChangeEventIsFirstStoredInCacheThanForwarded() } [Fact] - public async void AllEntityIds_returnsInitialPlusChangedEntities() + public async Task AllEntityIds_returnsInitialPlusChangedEntities() { // Arrange using var testSubject = new Subject(); @@ -103,12 +103,12 @@ public async void AllEntityIds_returnsInitialPlusChangedEntities() }); var serviceColletion = new ServiceCollection(); - + _hassConnectionMock.Setup(n => n.SubscribeToHomeAssistantEventsAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(testSubject ); - + var sp = serviceColletion.BuildServiceProvider(); using var cache = new EntityStateCache(haRunnerMock.Object, sp); @@ -140,4 +140,4 @@ public async void AllEntityIds_returnsInitialPlusChangedEntities() // Assert cache.AllEntityIds.Should().BeEquivalentTo("sensor.sensor1", "sensor.sensor2"); } -} \ No newline at end of file +} diff --git a/src/HassModel/NetDaemon.HassModel.Tests/Internal/QueuedObservabeTest.cs b/src/HassModel/NetDaemon.HassModel.Tests/Internal/QueuedObservabeTest.cs index 80389f0da..f5e8757f0 100644 --- a/src/HassModel/NetDaemon.HassModel.Tests/Internal/QueuedObservabeTest.cs +++ b/src/HassModel/NetDaemon.HassModel.Tests/Internal/QueuedObservabeTest.cs @@ -8,7 +8,7 @@ namespace NetDaemon.HassModel.Tests.Internal; public class QueuedObservabeTest { [Fact] - public async void EventsSouldbeforwarded() + public async Task EventsSouldbeforwarded() { var source = new Subject(); @@ -28,7 +28,7 @@ public async void EventsSouldbeforwarded() } [Fact] - public async void SubscribersShouldNotBlockEachOther() + public async Task SubscribersShouldNotBlockEachOther() { var source = new Subject(); @@ -90,11 +90,11 @@ public async Task WhenScopeIsDisposedSubscribersAreDetached() await Task.WhenAll(waitTasks); await scoped1.DisposeAsync(); - + var waitTask2 = scope2ObserverMock.WaitForInvocationAndVerify(o => o.OnNext("Event2")); testSubject.OnNext("Event2"); await waitTask2; - + scope1AObserverMock.Verify(o => o.OnNext("Event2"), Times.Never, "Event should not reach Observer of disposed scope"); scope1BObserverMock.Verify(o => o.OnNext("Event2"), Times.Never, "Event should not reach Observer of disposed scope"); scope2ObserverMock.Verify(o => o.OnNext("Event2"), Times.Once); @@ -115,7 +115,7 @@ public async Task TestQueuedObservableShouldHaveFinishedTasksOnDispose() queue.Subscribe(subscriber.Object); // It is not enough that DisposeAsync waits on task - // since it can be aborted by the cancellation token + // since it can be aborted by the cancellation token var waitOnCallTask = subscriber.WaitForInvocation(n => n.OnNext(1)); source.OnNext(1); await waitOnCallTask; diff --git a/src/HassModel/NetDaemon.HassModel.Tests/NetDaemon.HassModel.Tests.csproj b/src/HassModel/NetDaemon.HassModel.Tests/NetDaemon.HassModel.Tests.csproj index dd6cc85b5..11a59bb73 100644 --- a/src/HassModel/NetDaemon.HassModel.Tests/NetDaemon.HassModel.Tests.csproj +++ b/src/HassModel/NetDaemon.HassModel.Tests/NetDaemon.HassModel.Tests.csproj @@ -11,8 +11,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Host/NetDaemon.Host.Default/NetDaemon.Host.Default.csproj b/src/Host/NetDaemon.Host.Default/NetDaemon.Host.Default.csproj index c6abed582..1f4407768 100644 --- a/src/Host/NetDaemon.Host.Default/NetDaemon.Host.Default.csproj +++ b/src/Host/NetDaemon.Host.Default/NetDaemon.Host.Default.csproj @@ -6,7 +6,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Runtime/NetDaemon.Runtime.Tests/NetDaemon.Runtime.Tests.csproj b/src/Runtime/NetDaemon.Runtime.Tests/NetDaemon.Runtime.Tests.csproj index 571555eeb..4fb59c25f 100644 --- a/src/Runtime/NetDaemon.Runtime.Tests/NetDaemon.Runtime.Tests.csproj +++ b/src/Runtime/NetDaemon.Runtime.Tests/NetDaemon.Runtime.Tests.csproj @@ -12,8 +12,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Runtime/NetDaemon.Runtime/NetDaemon.Runtime.csproj b/src/Runtime/NetDaemon.Runtime/NetDaemon.Runtime.csproj index 93f218136..08ceebf51 100644 --- a/src/Runtime/NetDaemon.Runtime/NetDaemon.Runtime.csproj +++ b/src/Runtime/NetDaemon.Runtime/NetDaemon.Runtime.csproj @@ -22,7 +22,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Integration/NetDaemon.Tests.Integration/NetDaemon.Tests.Integration.csproj b/tests/Integration/NetDaemon.Tests.Integration/NetDaemon.Tests.Integration.csproj index 0ee7c464e..d0bbe532a 100644 --- a/tests/Integration/NetDaemon.Tests.Integration/NetDaemon.Tests.Integration.csproj +++ b/tests/Integration/NetDaemon.Tests.Integration/NetDaemon.Tests.Integration.csproj @@ -9,8 +9,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all