From 020aa16aae4c9bac0b4222f8880f0a36d5d4aa1d Mon Sep 17 00:00:00 2001 From: Jericho Date: Sat, 16 Nov 2024 09:13:26 -0500 Subject: [PATCH 1/5] Refresh build script --- appveyor.yml | 2 +- build.cake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 93c0eef9..87ac9859 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,7 +40,7 @@ cache: # Environment configuration image: - - Ubuntu1804 + - Ubuntu2204 - Visual Studio 2022 # Skip builds for doc changes diff --git a/build.cake b/build.cake index a7ce8fcf..696fde26 100644 --- a/build.cake +++ b/build.cake @@ -2,7 +2,7 @@ #tool dotnet:?package=GitVersion.Tool&version=6.0.5 #tool dotnet:?package=coveralls.net&version=4.0.1 #tool nuget:https://f.feedz.io/jericho/jericho/nuget/?package=GitReleaseManager&version=0.17.0-collaborators0008 -#tool nuget:?package=ReportGenerator&version=5.4.0 +#tool nuget:?package=ReportGenerator&version=5.4.1 #tool nuget:?package=xunit.runner.console&version=2.9.2 #tool nuget:?package=CodecovUploader&version=0.8.0 From d8672b8820d191ec80ba7de8701112bddb66b149 Mon Sep 17 00:00:00 2001 From: Jericho Date: Mon, 18 Nov 2024 14:29:21 -0500 Subject: [PATCH 2/5] Run integration tests and unit tests under net9.0 --- Source/ZoomNet.IntegrationTests/ZoomNet.IntegrationTests.csproj | 2 +- Source/ZoomNet.UnitTests/ZoomNet.UnitTests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/ZoomNet.IntegrationTests/ZoomNet.IntegrationTests.csproj b/Source/ZoomNet.IntegrationTests/ZoomNet.IntegrationTests.csproj index 8b253ed3..a79a7532 100644 --- a/Source/ZoomNet.IntegrationTests/ZoomNet.IntegrationTests.csproj +++ b/Source/ZoomNet.IntegrationTests/ZoomNet.IntegrationTests.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 ZoomNet.IntegrationTests ZoomNet.IntegrationTests diff --git a/Source/ZoomNet.UnitTests/ZoomNet.UnitTests.csproj b/Source/ZoomNet.UnitTests/ZoomNet.UnitTests.csproj index 90825cf2..6536e82e 100644 --- a/Source/ZoomNet.UnitTests/ZoomNet.UnitTests.csproj +++ b/Source/ZoomNet.UnitTests/ZoomNet.UnitTests.csproj @@ -1,7 +1,7 @@ - net48;net6.0;net7.0;net8.0 + net48;net9.0 ZoomNet.UnitTests ZoomNet.UnitTests false From 6b2a348a61fe193f5990f81cd33bdeccf0d7187d Mon Sep 17 00:00:00 2001 From: Jericho Date: Mon, 18 Nov 2024 14:30:11 -0500 Subject: [PATCH 3/5] Upgrade nuget references --- .../ZoomNet.IntegrationTests.csproj | 8 ++++---- Source/ZoomNet.UnitTests/ZoomNet.UnitTests.csproj | 2 +- Source/ZoomNet/ZoomNet.csproj | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/ZoomNet.IntegrationTests/ZoomNet.IntegrationTests.csproj b/Source/ZoomNet.IntegrationTests/ZoomNet.IntegrationTests.csproj index a79a7532..90b3d9d0 100644 --- a/Source/ZoomNet.IntegrationTests/ZoomNet.IntegrationTests.csproj +++ b/Source/ZoomNet.IntegrationTests/ZoomNet.IntegrationTests.csproj @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/Source/ZoomNet.UnitTests/ZoomNet.UnitTests.csproj b/Source/ZoomNet.UnitTests/ZoomNet.UnitTests.csproj index 6536e82e..abd2a6e4 100644 --- a/Source/ZoomNet.UnitTests/ZoomNet.UnitTests.csproj +++ b/Source/ZoomNet.UnitTests/ZoomNet.UnitTests.csproj @@ -13,7 +13,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Source/ZoomNet/ZoomNet.csproj b/Source/ZoomNet/ZoomNet.csproj index 24a6c71d..a1f2e52e 100644 --- a/Source/ZoomNet/ZoomNet.csproj +++ b/Source/ZoomNet/ZoomNet.csproj @@ -37,12 +37,12 @@ - - + + - + From 71373c3219f7e147054168c4766bef3b99634041 Mon Sep 17 00:00:00 2001 From: Jericho Date: Thu, 5 Dec 2024 10:52:51 -0500 Subject: [PATCH 4/5] Add "Windows 10" and "Windows 11" to ParticipantDevice Resolves #381 --- .../Json/ParticipantDeviceConverter.cs | 2 ++ Source/ZoomNet/Json/ParticipantDeviceConverter.cs | 13 ++++++++++++- Source/ZoomNet/Models/ParticipantDevice.cs | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Source/ZoomNet.UnitTests/Json/ParticipantDeviceConverter.cs b/Source/ZoomNet.UnitTests/Json/ParticipantDeviceConverter.cs index 6962f7ac..9113e071 100644 --- a/Source/ZoomNet.UnitTests/Json/ParticipantDeviceConverter.cs +++ b/Source/ZoomNet.UnitTests/Json/ParticipantDeviceConverter.cs @@ -77,6 +77,8 @@ public void Write_multiple() [InlineData("Zoom Rooms", ParticipantDevice.ZoomRoom)] [InlineData("win 10+ 17763", ParticipantDevice.Windows)] [InlineData("Web Browser Chrome 129", ParticipantDevice.Web)] + [InlineData("Web Browser Chrome 130", ParticipantDevice.Web)] + [InlineData("Windows 10", ParticipantDevice.Windows)] public void Read_single(string value, ParticipantDevice expectedValue) { // Arrange diff --git a/Source/ZoomNet/Json/ParticipantDeviceConverter.cs b/Source/ZoomNet/Json/ParticipantDeviceConverter.cs index deb92a7e..c38329c1 100644 --- a/Source/ZoomNet/Json/ParticipantDeviceConverter.cs +++ b/Source/ZoomNet/Json/ParticipantDeviceConverter.cs @@ -20,9 +20,16 @@ public override ParticipantDevice[] Read(ref Utf8JsonReader reader, Type typeToC case JsonTokenType.Null: return Array.Empty(); case JsonTokenType.String: + var splitOption = +#if NET5_0_OR_GREATER + StringSplitOptions.TrimEntries; +#else + StringSplitOptions.None; +#endif + var stringValue = reader.GetString(); var items = stringValue - .Split(new[] { '+' }) + .Split(new[] { " + " }, splitOption) .Where(item => !long.TryParse(item, out _)) // Filter out values like "17763" which is a Windows build number. See https://github.com/Jericho/ZoomNet/issues/354 for details .Select(item => Convert(item)) .ToArray(); @@ -47,6 +54,10 @@ private static ParticipantDevice Convert(string deviceAsString) // See https://github.com/Jericho/ZoomNet/issues/370 for details about this workaround if (deviceAsString.StartsWith("Web Browser", StringComparison.OrdinalIgnoreCase)) return ParticipantDevice.Web; + // Ensure values such as "win 10+ 17763" are treated as "win 10" + var plusSignIndex = deviceAsString.IndexOf('+'); + if (plusSignIndex > 0) deviceAsString = deviceAsString.Substring(0, plusSignIndex); + return deviceAsString.Trim().ToEnum(); } } diff --git a/Source/ZoomNet/Models/ParticipantDevice.cs b/Source/ZoomNet/Models/ParticipantDevice.cs index 4f59c8e7..fc60db89 100644 --- a/Source/ZoomNet/Models/ParticipantDevice.cs +++ b/Source/ZoomNet/Models/ParticipantDevice.cs @@ -29,7 +29,7 @@ public enum ParticipantDevice /// /// The participant joined via VoIP using a Windows device. /// - [MultipleValuesEnumMember(DefaultValue = "Windows", OtherValues = new[] { "WIN", "win 10", "win 11" })] + [MultipleValuesEnumMember(DefaultValue = "Windows", OtherValues = new[] { "WIN", "win 10", "win 11", "Windows 10", "Windows 11" })] Windows, /// From f484322963a26b3553c177ada3b10bce3b04a8ae Mon Sep 17 00:00:00 2001 From: Jericho Date: Thu, 5 Dec 2024 10:57:31 -0500 Subject: [PATCH 5/5] Upgrade .NET SDK to 9.101 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 11db103e..01198d30 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100", + "version": "9.0.101", "rollForward": "patch", "allowPrerelease": false }