diff --git a/SDK v2 migration guide.md b/SDK v2 migration guide.md index 7cf0b138f9..ddf82fe804 100644 --- a/SDK v2 migration guide.md +++ b/SDK v2 migration guide.md @@ -286,12 +286,16 @@ What was a loose affiliation of separate clients is now a consolidated client wi - The `Message` class no longer requires disposal! - `FeedbackReceiver` is now a callback assigned to the `MessageFeedbackProcessor` property. - `GetFileNotificationReceiver(...)` is now a callback assigned to `FileUploadNotificationProcessor` property. These methods return a callback value. +- `FileUploadNotification.BlobUriPath` was a string and is now of type `System.Uri`. #### Notable additions - The library now includes `IIotHubServiceRetryPolicy` implementations: `IotHubServiceExponentialBackoffRetryPolicy`, `IotHubServiceFixedDelayRetryPolicy`, `IotHubServiceIncrementalDelayRetryPolicy` and `IotHubServiceNoRetry`, which can be set via `IotHubServiceClientOptions.RetryPolicy`. - `DirectMethodClientResponse` now has a method `TryGetValue` to deserialize the payload to a type of your choice. + - Added `ImportJobError` class to help deserialize errors from device/module/configuration import job. + - Use the `ImportErrorsBlobName` to load the output errors file, if it exists, in the blob container specified in `ImportJobProperties.InputBlobContainerUri`. +- `IsFinished` convenience property now exists on `CloudToDeviceMethodScheduledJob`, `ScheduledJob`, and `TwinScheduledJob` which is **true** when `Status` is `Completed`, `Failed`, or `Cancelled`. #### API mapping diff --git a/iothub/device/src/Microsoft.Azure.Devices.Client.csproj b/iothub/device/src/Microsoft.Azure.Devices.Client.csproj index 349119a6cc..3e06cc9143 100644 --- a/iothub/device/src/Microsoft.Azure.Devices.Client.csproj +++ b/iothub/device/src/Microsoft.Azure.Devices.Client.csproj @@ -28,7 +28,7 @@ - 2.0.0-preview003 + 2.0.0-preview004 Microsoft Azure IoT Device Client SDK True True diff --git a/iothub/service/samples/how to guides/CleanupDevicesSample/CleanupDevicesSample.csproj b/iothub/service/samples/how to guides/CleanupDevicesSample/CleanupDevicesSample.csproj index 7baa7bbde2..72f0ca1cb1 100644 --- a/iothub/service/samples/how to guides/CleanupDevicesSample/CleanupDevicesSample.csproj +++ b/iothub/service/samples/how to guides/CleanupDevicesSample/CleanupDevicesSample.csproj @@ -18,12 +18,6 @@ - - - PreserveNewest - - - diff --git a/iothub/service/src/Amqp/AmqpCbsSessionHandler.cs b/iothub/service/src/Amqp/AmqpCbsSessionHandler.cs index 6747d051b7..f04252d2a3 100644 --- a/iothub/service/src/Amqp/AmqpCbsSessionHandler.cs +++ b/iothub/service/src/Amqp/AmqpCbsSessionHandler.cs @@ -12,7 +12,9 @@ namespace Microsoft.Azure.Devices.Amqp /// Handles a single CBS session (for SAS token renewal) including the inital authentication and scheduling all subsequent /// authentication attempts. /// +#pragma warning disable CA1852 // used in debug for unit test mocking internal class AmqpCbsSessionHandler : IDisposable +#pragma warning restore CA1852 { // There is no AmqpSession object to track here because it is encapsulated by the AmqpCbsLink class. private readonly IotHubConnectionProperties _credential; diff --git a/iothub/service/src/Amqp/AmqpConnectionHandler.cs b/iothub/service/src/Amqp/AmqpConnectionHandler.cs index e40824e052..66b52b1958 100644 --- a/iothub/service/src/Amqp/AmqpConnectionHandler.cs +++ b/iothub/service/src/Amqp/AmqpConnectionHandler.cs @@ -21,7 +21,9 @@ namespace Microsoft.Azure.Devices.Amqp /// /// This class intentionally abstracts away details about sessions and links for simplicity at the service client level. /// +#pragma warning disable CA1852 // used in debug for unit test mocking internal class AmqpConnectionHandler : IDisposable +#pragma warning restore CA1852 { private static readonly AmqpVersion s_amqpVersion_1_0_0 = new(1, 0, 0); diff --git a/iothub/service/src/Amqp/AmqpSessionHandler.cs b/iothub/service/src/Amqp/AmqpSessionHandler.cs index a402700672..2ace278d4f 100644 --- a/iothub/service/src/Amqp/AmqpSessionHandler.cs +++ b/iothub/service/src/Amqp/AmqpSessionHandler.cs @@ -13,7 +13,9 @@ namespace Microsoft.Azure.Devices.Amqp /// Handles a single AMQP session that holds the sender or receiver link that does the "work" /// for the AMQP connection (receiving file upload notification, sending cloud to device messages, etc). /// +#pragma warning disable CA1852 // used in debug for unit test mocking internal class AmqpSessionHandler +#pragma warning restore CA1852 { private readonly AmqpSendingLinkHandler _sendingLinkHandler; private readonly AmqpReceivingLinkHandler _receivingLinkHandler; diff --git a/iothub/service/src/Authentication/IotHubTokenCredentialProperties.cs b/iothub/service/src/Authentication/IotHubTokenCredentialProperties.cs index 92a96c856c..431591a4e5 100644 --- a/iothub/service/src/Authentication/IotHubTokenCredentialProperties.cs +++ b/iothub/service/src/Authentication/IotHubTokenCredentialProperties.cs @@ -12,7 +12,9 @@ namespace Microsoft.Azure.Devices /// /// The properties required for authentication to IoT hub using a token credential. /// +#pragma warning disable CA1852 // used in debug for unit test mocking internal class IotHubTokenCredentialProperties : IotHubConnectionProperties +#pragma warning restore CA1852 { private const string TokenType = "Bearer"; private static readonly string[] s_iotHubAadTokenScopes = new string[] { "https://iothubs.azure.net/.default" }; diff --git a/iothub/service/src/Microsoft.Azure.Devices.csproj b/iothub/service/src/Microsoft.Azure.Devices.csproj index 79ebec0583..e0663da33c 100644 --- a/iothub/service/src/Microsoft.Azure.Devices.csproj +++ b/iothub/service/src/Microsoft.Azure.Devices.csproj @@ -27,7 +27,7 @@ - 2.0.0-preview003 + 2.0.0-preview004 Microsoft Azure IoT Service Client SDK True True diff --git a/iothub/service/src/Registry/Models/ImportJobError.cs b/iothub/service/src/Registry/Models/ImportJobError.cs index ab3def21a0..228666c454 100644 --- a/iothub/service/src/Registry/Models/ImportJobError.cs +++ b/iothub/service/src/Registry/Models/ImportJobError.cs @@ -12,7 +12,7 @@ namespace Microsoft.Azure.Devices /// Any errors that occur during a bulk import job can be deserialized with this class from a blob file named "importErrors.log" /// in the container specified during import. /// - public class ImportJobError + public sealed class ImportJobError { /// /// The name of the blob file that contains the import errors. diff --git a/provisioning/device/src/Microsoft.Azure.Devices.Provisioning.Client.csproj b/provisioning/device/src/Microsoft.Azure.Devices.Provisioning.Client.csproj index 96827e0ee3..2e9418c202 100644 --- a/provisioning/device/src/Microsoft.Azure.Devices.Provisioning.Client.csproj +++ b/provisioning/device/src/Microsoft.Azure.Devices.Provisioning.Client.csproj @@ -26,7 +26,7 @@ - 2.0.0-preview003 + 2.0.0-preview004 Microsoft Azure IoT Provisioning Device Client SDK True True diff --git a/provisioning/service/src/Microsoft.Azure.Devices.Provisioning.Service.csproj b/provisioning/service/src/Microsoft.Azure.Devices.Provisioning.Service.csproj index 8b1e97a7b2..cb27d9d768 100644 --- a/provisioning/service/src/Microsoft.Azure.Devices.Provisioning.Service.csproj +++ b/provisioning/service/src/Microsoft.Azure.Devices.Provisioning.Service.csproj @@ -27,7 +27,7 @@ - 2.0.0-preview003 + 2.0.0-preview004 Microsoft Azure IoT Provisioning Service Client SDK True True diff --git a/tools/diffscripts/diffapi.ps1 b/tools/diffscripts/diffapi.ps1 index 2c0f3871e3..ca00cf61b6 100644 --- a/tools/diffscripts/diffapi.ps1 +++ b/tools/diffscripts/diffapi.ps1 @@ -178,8 +178,7 @@ $assemblyRootNames = @( "Microsoft.Azure.Devices.Client", "Microsoft.Azure.Devices", "Microsoft.Azure.Devices.Provisioning.Client", - "Microsoft.Azure.Devices.Provisioning.Service", - "Microsoft.Azure.Devices.Authentication" + "Microsoft.Azure.Devices.Provisioning.Service" ) # All of the files from the build @@ -187,8 +186,7 @@ $assemblyFilePath = @( (Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\iothub\device\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[0] + ".dll"))), (Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\iothub\service\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[1] + ".dll"))), (Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\provisioning\device\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[2] + ".dll"))), - (Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\provisioning\service\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[3] + ".dll"))), - (Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\authentication\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[4] + ".dll"))) + (Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\provisioning\service\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[3] + ".dll"))) ) # Get the last tag from the git repository and do the comparison @@ -296,7 +294,6 @@ Set-Location -Path $compareDirectory # # 9 3 sdk_design_docs/CSharp/main/Microsoft.Azure.Devices.Client.md # 2 0 sdk_design_docs/CSharp/main/Microsoft.Azure.Devices.Provisioning.Client.md -# 2 0 sdk_design_docs/CSharp/main/Microsoft.Azure.Devices.Authentication.md # 2 0 sdk_design_docs/CSharp/main/Microsoft.Azure.Devices.Provisioning.Service.md # 7 9 sdk_design_docs/CSharp/main/Microsoft.Azure.Devices.md $gitDiffOutput = git diff --ignore-all-space --numstat diff --git a/versions.csv b/versions.csv index c2b0eafc30..ada2e60cee 100644 --- a/versions.csv +++ b/versions.csv @@ -1,5 +1,5 @@ AssemblyPath, Version -iothub\device\src\Microsoft.Azure.Devices.Client.csproj, 2.0.0-preview003 -iothub\service\src\Microsoft.Azure.Devices.csproj, 2.0.0-preview003 -provisioning\device\src\Microsoft.Azure.Devices.Provisioning.Client.csproj, 2.0.0-preview003 -provisioning\service\src\Microsoft.Azure.Devices.Provisioning.Service.csproj, 2.0.0-preview003 +iothub\device\src\Microsoft.Azure.Devices.Client.csproj, 2.0.0-preview004 +iothub\service\src\Microsoft.Azure.Devices.csproj, 2.0.0-preview004 +provisioning\device\src\Microsoft.Azure.Devices.Provisioning.Client.csproj, 2.0.0-preview004 +provisioning\service\src\Microsoft.Azure.Devices.Provisioning.Service.csproj, 2.0.0-preview004