diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 3b42b80..fb4283b 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -22,7 +22,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: Restore dependencies run: dotnet restore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b008762..6656d45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: Restore dependencies run: dotnet restore diff --git a/.github/workflows/push2nuget.yml b/.github/workflows/push2nuget.yml index 0f96c31..d6d00d3 100644 --- a/.github/workflows/push2nuget.yml +++ b/.github/workflows/push2nuget.yml @@ -17,7 +17,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: Restore dependencies run: dotnet restore diff --git a/samples/memmon-protobuff/memmon-protobuff.csproj b/samples/memmon-protobuff/memmon-protobuff.csproj index 8b52d4d..a8b3c27 100644 --- a/samples/memmon-protobuff/memmon-protobuff.csproj +++ b/samples/memmon-protobuff/memmon-protobuff.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 enable false enable diff --git a/samples/memmon/Dockerfile b/samples/memmon/Dockerfile index 6be0b6c..855d287 100644 --- a/samples/memmon/Dockerfile +++ b/samples/memmon/Dockerfile @@ -1,9 +1,9 @@ #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base +FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src COPY samples/memmon/. memmon/ RUN cd memmon && chmod +x ./proj2nupkg.sh && ./proj2nupkg.sh && cd .. diff --git a/samples/memmon/MemMonFactory.cs b/samples/memmon/MemMonFactory.cs index 272d373..daed61f 100644 --- a/samples/memmon/MemMonFactory.cs +++ b/samples/memmon/MemMonFactory.cs @@ -62,12 +62,12 @@ public async Task CreateMemMonClientAsync(string connectinStringName, C return client; } - static async Task CreateBrokerClientAsync(string connectionString, CancellationToken cancellationToken = default) + static async Task CreateBrokerClientAsync(string connectionString, CancellationToken cancellationToken = default) { var cs = new ConnectionSettings(connectionString) { ModelId = Imemmon.ModelId }; var mqtt = await BrokerClientFactory.CreateFromConnectionSettingsAsync(cs, true, cancellationToken); connectionSettings = BrokerClientFactory.ComputedSettings; - var client = new dtmi_rido_memmon.mqtt.memmon(mqtt) + var client = new dtmi_rido_memmon.mqtt._memmon(mqtt) { InitialState = String.Empty }; @@ -75,21 +75,21 @@ public async Task CreateMemMonClientAsync(string connectinStringName, C return client; } - static async Task CreateHubClientAsync(string connectionString, CancellationToken cancellationToken = default) + static async Task CreateHubClientAsync(string connectionString, CancellationToken cancellationToken = default) { var cs = new ConnectionSettings(connectionString) { ModelId = Imemmon.ModelId }; var hub = await HubDpsFactory.CreateFromConnectionSettingsAsync(cs, cancellationToken); connectionSettings = HubDpsFactory.ComputedSettings; - var client = new dtmi_rido_memmon.hub.memmon(hub); + var client = new dtmi_rido_memmon.hub._memmon(hub); nugetPackageVersion = HubDpsFactory.NuGetPackageVersion; client.InitialState = await client.GetTwinAsync(cancellationToken); return client; } - static async Task CreateAwsClientAsync(string connectionString, CancellationToken cancellationToken = default) + static async Task CreateAwsClientAsync(string connectionString, CancellationToken cancellationToken = default) { var mqtt = await AwsClientFactory.CreateFromConnectionSettingsAsync(connectionString, true, cancellationToken); - var client = new dtmi_rido_memmon.aws.memmon(mqtt); + var client = new dtmi_rido_memmon.aws._memmon(mqtt); connectionSettings = AwsClientFactory.ComputedSettings; nugetPackageVersion = AwsClientFactory.NuGetPackageVersion; client.InitialState = await client.GetShadowAsync(cancellationToken); diff --git a/samples/memmon/dtmi_rido_memmon-2.aws.g.cs b/samples/memmon/dtmi_rido_memmon-2.aws.g.cs index 951f093..3124d64 100644 --- a/samples/memmon/dtmi_rido_memmon-2.aws.g.cs +++ b/samples/memmon/dtmi_rido_memmon-2.aws.g.cs @@ -6,7 +6,7 @@ namespace dtmi_rido_memmon.aws; -public class memmon : AwsMqttClient, Imemmon +public class _memmon : AwsMqttClient, Imemmon { public IReadOnlyProperty Property_started { get; set; } public IWritableProperty Property_enabled { get; set; } @@ -21,7 +21,7 @@ public class memmon : AwsMqttClient, Imemmon public ICommand Command_malloc { get; set; } public ICommand Command_free { get; set; } - internal memmon(IMqttClient c) : base(c) + internal _memmon(IMqttClient c) : base(c) { Property_started = new ReadOnlyProperty(c, "started"); Property_interval = new WritableProperty(c, "interval"); diff --git a/samples/memmon/dtmi_rido_memmon-2.hub.g.cs b/samples/memmon/dtmi_rido_memmon-2.hub.g.cs index f638967..4052d46 100644 --- a/samples/memmon/dtmi_rido_memmon-2.hub.g.cs +++ b/samples/memmon/dtmi_rido_memmon-2.hub.g.cs @@ -7,7 +7,7 @@ namespace dtmi_rido_memmon.hub; -public class memmon : HubMqttClient, Imemmon +public class _memmon : HubMqttClient, Imemmon { public IReadOnlyProperty Property_started { get; set; } @@ -20,7 +20,7 @@ public class memmon : HubMqttClient, Imemmon public ICommand Command_malloc { get; set; } public ICommand Command_free { get; set; } - public memmon(IMqttClient c) : base(c) + public _memmon(IMqttClient c) : base(c) { Property_started = new ReadOnlyProperty(c, "started"); Property_interval = new WritableProperty(c, "interval"); diff --git a/samples/memmon/dtmi_rido_memmon-2.mqtt.g.cs b/samples/memmon/dtmi_rido_memmon-2.mqtt.g.cs index 3d80669..2d6ebc3 100644 --- a/samples/memmon/dtmi_rido_memmon-2.mqtt.g.cs +++ b/samples/memmon/dtmi_rido_memmon-2.mqtt.g.cs @@ -7,7 +7,7 @@ namespace dtmi_rido_memmon.mqtt; -public class memmon : Imemmon +public class _memmon : Imemmon { public IMqttClient Connection { get; set; } public string InitialState { get; set; } @@ -21,7 +21,7 @@ public class memmon : Imemmon public ICommand Command_malloc { get; set; } public ICommand Command_free { get; set; } - internal memmon(IMqttClient c) + internal _memmon(IMqttClient c) { Connection = c; Property_started = new ReadOnlyProperty(c, "started"); diff --git a/samples/memmon/memmon.csproj b/samples/memmon/memmon.csproj index 6b8d2de..8a47951 100644 --- a/samples/memmon/memmon.csproj +++ b/samples/memmon/memmon.csproj @@ -1,10 +1,11 @@  - net6.0 + net7.0 enable false Linux + memmon_dn7 @@ -22,8 +23,8 @@ - - + + diff --git a/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/MQTTnet.Extensions.MultiCloud.IntegrationTests.csproj b/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/MQTTnet.Extensions.MultiCloud.IntegrationTests.csproj index dabb5c1..245f6c5 100644 --- a/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/MQTTnet.Extensions.MultiCloud.IntegrationTests.csproj +++ b/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/MQTTnet.Extensions.MultiCloud.IntegrationTests.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 enable enable diff --git a/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/BrokerE2EFixture.cs b/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/BrokerE2EFixture.cs index 13ffd7e..32f421a 100644 --- a/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/BrokerE2EFixture.cs +++ b/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/BrokerE2EFixture.cs @@ -45,7 +45,7 @@ public async Task DeviceSendsBirth() }; await ta.SubscribeAsync("registry/e2e-device/status"); cs.ModelId = Imemmon.ModelId; - var td = new memmon(await BrokerClientFactory.CreateFromConnectionSettingsAsync(cs, true)); + var td = new _memmon(await BrokerClientFactory.CreateFromConnectionSettingsAsync(cs, true)); await Task.Delay(100); Assert.True(birthFound); Assert.Equal(Imemmon.ModelId, bm!.ModelId); diff --git a/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/HubEndToEndFixture.cs b/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/HubEndToEndFixture.cs index fd7ec61..e6f7d3c 100644 --- a/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/HubEndToEndFixture.cs +++ b/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/HubEndToEndFixture.cs @@ -36,7 +36,7 @@ internal async Task NewDeviceSendDefaults() var deviceId = "memmon-test" + new Random().Next(100); var device = await GetOrCreateDeviceAsync(deviceId); - var td = new memmon(await HubDpsFactory.CreateFromConnectionSettingsAsync($"HostName={hubName};DeviceId={deviceId};SharedAccessKey={device.Authentication.SymmetricKey.PrimaryKey}")); + var td = new _memmon(await HubDpsFactory.CreateFromConnectionSettingsAsync($"HostName={hubName};DeviceId={deviceId};SharedAccessKey={device.Authentication.SymmetricKey.PrimaryKey}")); td.Property_interval.OnMessage = async p => { td.Property_interval.Value = p; @@ -91,7 +91,7 @@ internal async Task DeviceReadsSettingsAtStartup() await Task.Delay(1000); - var td = new memmon(await HubDpsFactory.CreateFromConnectionSettingsAsync($"HostName={hubName};DeviceId={deviceId};SharedAccessKey={device.Authentication.SymmetricKey.PrimaryKey}")); + var td = new _memmon(await HubDpsFactory.CreateFromConnectionSettingsAsync($"HostName={hubName};DeviceId={deviceId};SharedAccessKey={device.Authentication.SymmetricKey.PrimaryKey}")); // await td.InitState(); td.Property_interval.OnMessage = async m => @@ -131,7 +131,7 @@ private async Task UpdatesDesiredPropertyWhenOnline() var deviceId = "memmon-test" + new Random().Next(100); var device = await GetOrCreateDeviceAsync(deviceId); - var td = new memmon(await HubDpsFactory.CreateFromConnectionSettingsAsync($"HostName={hubName};DeviceId={deviceId};SharedAccessKey={device.Authentication.SymmetricKey.PrimaryKey}")); + var td = new _memmon(await HubDpsFactory.CreateFromConnectionSettingsAsync($"HostName={hubName};DeviceId={deviceId};SharedAccessKey={device.Authentication.SymmetricKey.PrimaryKey}")); td.Property_interval.OnMessage = m => { var ack = new Ack() @@ -183,7 +183,7 @@ internal async Task CommandsGetCalled() var device = await GetOrCreateDeviceAsync(deviceId); bool commandInvoked = false; - var td = new memmon(await HubDpsFactory.CreateFromConnectionSettingsAsync($"HostName={hubName};DeviceId={deviceId};SharedAccessKey={device.Authentication.SymmetricKey.PrimaryKey}")); + var td = new _memmon(await HubDpsFactory.CreateFromConnectionSettingsAsync($"HostName={hubName};DeviceId={deviceId};SharedAccessKey={device.Authentication.SymmetricKey.PrimaryKey}")); td.Command_getRuntimeStats.OnMessage = async m => { diff --git a/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/memmon/dtmi_rido_pnp_memmon-1.hub.g.cs b/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/memmon/dtmi_rido_pnp_memmon-1.hub.g.cs index f57c06e..2392d51 100644 --- a/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/memmon/dtmi_rido_pnp_memmon-1.hub.g.cs +++ b/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/memmon/dtmi_rido_pnp_memmon-1.hub.g.cs @@ -8,7 +8,7 @@ namespace dtmi_rido_pnp_memmon.hub; -public class memmon : HubMqttClient, Imemmon +public class _memmon : HubMqttClient, Imemmon { public IReadOnlyProperty Property_started { get; set; } public IWritableProperty Property_enabled { get; set; } @@ -16,7 +16,7 @@ public class memmon : HubMqttClient, Imemmon public ITelemetry Telemetry_workingSet { get; set; } public ICommand> Command_getRuntimeStats { get; set; } - public memmon(IMqttClient c) : base(c) + public _memmon(IMqttClient c) : base(c) { Property_started = new ReadOnlyProperty(c, "started"); Property_interval = new WritableProperty(c, "interval"); diff --git a/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/memmon/dtmi_rido_pnp_memmon-1.mqtt.g.cs b/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/memmon/dtmi_rido_pnp_memmon-1.mqtt.g.cs index 78eb8d7..e29efc1 100644 --- a/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/memmon/dtmi_rido_pnp_memmon-1.mqtt.g.cs +++ b/tests/MQTTnet.Extensions.MultiCloud.IntegrationTests/e2e/memmon/dtmi_rido_pnp_memmon-1.mqtt.g.cs @@ -8,7 +8,7 @@ namespace dtmi_rido_pnp_memmon.mqtt; -public class memmon : Imemmon +public class _memmon : Imemmon { public IMqttClient Connection { get; set; } public string InitialState { get; set; } @@ -18,7 +18,7 @@ public class memmon : Imemmon public ITelemetry Telemetry_workingSet { get; set; } public ICommand> Command_getRuntimeStats { get; set; } - internal memmon(IMqttClient c) + internal _memmon(IMqttClient c) { Property_started = new ReadOnlyProperty(c, "started"); Property_interval = new WritableProperty(c, "interval"); diff --git a/tests/MQTTnet.Extensions.MultiCloud.UnitTests/MQTTnet.Extensions.MultiCloud.UnitTests.csproj b/tests/MQTTnet.Extensions.MultiCloud.UnitTests/MQTTnet.Extensions.MultiCloud.UnitTests.csproj index f8c4d48..a40c2aa 100644 --- a/tests/MQTTnet.Extensions.MultiCloud.UnitTests/MQTTnet.Extensions.MultiCloud.UnitTests.csproj +++ b/tests/MQTTnet.Extensions.MultiCloud.UnitTests/MQTTnet.Extensions.MultiCloud.UnitTests.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 enable false diff --git a/version.json b/version.json index 449d0a1..3aa7b23 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "0.5", + "version": "0.6", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/rel/v\\d+(?:\\.\\d+)?$"