├── .editorconfig ├── .gitattributes ├── .github ├── CODEOWNERS ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ ├── feature_request.md │ └── technical-question.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── github_issues.yml │ └── issueLabeler.yml ├── .gitignore ├── 35MSSharedLib1024.snk ├── CODE_OF_CONDUCT.md ├── CodeMaid.config ├── LICENSE ├── SECURITY.md ├── azureiot.sln ├── build.cmd ├── build.ps1 ├── common └── src │ ├── DefaultWebProxySettings.cs │ ├── HttpContentExtensions.cs │ ├── HttpMessageHelper.cs │ ├── Logging.Common.cs │ ├── Logging.ProvisioningTransport.Common.cs │ ├── StreamDisposalResponsibility.cs │ ├── StreamExtensions.cs │ ├── TaskCompletionSource.cs │ ├── device │ ├── provisioning │ │ └── transport │ │ │ ├── ClientApiVersionHelper.cs │ │ │ ├── DeviceRegistrationResult.cs │ │ │ ├── ProvisioningSasBuilder.cs │ │ │ ├── RegistrationOperationStatus.cs │ │ │ ├── RetryJitter.cs │ │ │ ├── SymmetricKeyRegistrationResult.cs │ │ │ ├── TpmRegistrationResult.cs │ │ │ ├── X509CertificateInfo.cs │ │ │ └── X509RegistrationResult.cs │ └── transport │ │ └── mqtt │ │ ├── ClientWebSocketChannel.cs │ │ └── ClientWebSocketChannelConfig.cs │ └── service │ ├── AssertionFailedException.cs │ ├── AuthenticationMethodFactory.cs │ ├── CommonConstants.cs │ ├── CommonResources.cs │ ├── EventTraceActivity.cs │ ├── ExceptionDispatcher.cs │ ├── ExceptionHandlingHelper.cs │ ├── ExceptionTrace.cs │ ├── FatalException.cs │ ├── Fx.cs │ ├── FxCop.cs │ ├── HttpClientHelper.cs │ ├── IAuthorizationHeaderProvider.cs │ ├── IHttpClientHelper.cs │ ├── IotHubConnectionString.cs │ ├── PutOperationType.cs │ ├── QuerySpecification.cs │ ├── Resources.Designer.cs │ ├── StringValidationHelper.cs │ ├── TaskHelpers.cs │ └── Utils.cs ├── configure_tls_protocol_version_and_ciphers.md ├── device_connection_and_reliability_readme.md ├── doc ├── coding-style.md ├── components.png ├── devbox_setup.md ├── devguide.md ├── manage_iot_hub.md ├── media │ ├── PlatformToolset.png │ ├── create-iot-hub1.png │ ├── create-iot-hub2.png │ ├── create-iot-hub3.png │ ├── create-iot-hub4.png │ ├── create-iot-hub5.png │ └── device_explorer │ │ ├── connstr.png │ │ ├── iotgetstart1.png │ │ ├── iotgetstart2.png │ │ ├── iotgetstart3.png │ │ └── iotgetstart4.png ├── packages.puml ├── readme.md ├── setup_iothub.md └── workloads.png ├── e2e ├── stress │ ├── IoTClientPerf │ │ ├── Configuration.Stress.cs │ │ ├── IoTClientPerf.csproj │ │ ├── ParallelRun.cs │ │ ├── PerfScenario.cs │ │ ├── PerfScenarioConfig.cs │ │ ├── PerfTestRunner.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Reporting │ │ │ ├── ResultWriter.cs │ │ │ ├── ResultWriterConsole.cs │ │ │ ├── ResultWriterFile.cs │ │ │ ├── SystemMetrics.cs │ │ │ └── TelemetryMetrics.cs │ │ ├── Scenarios │ │ │ ├── DeviceAllNoRetry.cs │ │ │ ├── DeviceAllTest.cs │ │ │ ├── DeviceC2DNoRetry.cs │ │ │ ├── DeviceC2DTest.cs │ │ │ ├── DeviceClientScenario.cs │ │ │ ├── DeviceD2CNoRetry.cs │ │ │ ├── DeviceD2CTest.cs │ │ │ ├── DeviceMethodTest.cs │ │ │ ├── DeviceMethodsNoRetry.cs │ │ │ ├── DeviceOneD2CTest.cs │ │ │ ├── GenerateIotHubConfigTest.cs │ │ │ ├── HarnessBaseline.cs │ │ │ ├── ServiceAllTest.cs │ │ │ ├── ServiceC2DTest.cs │ │ │ ├── ServiceClientScenarios.cs │ │ │ └── ServiceMethodTest.cs │ │ ├── readme.md │ │ └── scripts │ │ │ ├── runClient.ps1 │ │ │ └── runServer.ps1 │ ├── MemoryLeakTest │ │ ├── MemoryLeakTest.csproj │ │ └── Program.cs │ └── stress.sln └── test │ ├── CodeAnalysisOverrides.cs │ ├── E2EMsTestBase.cs │ ├── E2ETests.csproj │ ├── GlobalSuppressions.cs │ ├── JsonSerializerSettingsInitializer.cs │ ├── config │ ├── TestConfiguration.AzureSecurityCenterForIoTLogAnalytics.cs │ ├── TestConfiguration.CommonCertificates.cs │ ├── TestConfiguration.IotHub.cs │ ├── TestConfiguration.Provisioning.cs │ ├── TestConfiguration.Storage.cs │ └── TestConfiguration.cs │ ├── docker │ ├── docker-setup.sh │ ├── haproxy │ │ ├── errors │ │ │ ├── 400.http │ │ │ ├── 403.http │ │ │ ├── 408.http │ │ │ ├── 500.http │ │ │ ├── 502.http │ │ │ ├── 503.http │ │ │ └── 504.http │ │ ├── haproxy.bin │ │ ├── haproxydps.cfg │ │ ├── haproxygde.cfg │ │ └── haproxyhub.cfg │ └── readme.md │ ├── helpers │ ├── AmqpConnectionStatusChange.cs │ ├── ConsoleEventListener.cs │ ├── CryptoKeyGenerator.cs │ ├── CustomWebProxy.cs │ ├── HostNameHelper.cs │ ├── ImportExportHelpers.cs │ ├── ProvisioningServiceRetryPolicy.cs │ ├── RetryOperationHelper.cs │ ├── StorageContainer.cs │ ├── TestDevice.cs │ ├── TestDeviceCallbackHandler.cs │ ├── TestModule.cs │ ├── X509Certificate2Helper.cs │ ├── digitaltwins │ │ └── models │ │ │ ├── TemperatureControllerTwin.cs │ │ │ └── ThermostatTwin.cs │ ├── logging │ │ ├── EventSourceTestLogger.cs │ │ └── VerboseTestLogger.cs │ └── templates │ │ ├── FaultInjection.cs │ │ ├── FaultInjectionConstants.cs │ │ ├── FaultInjectionPoolingOverAmqp.cs │ │ └── PoolingOverAmqp.cs │ ├── iothub │ ├── AuthenticationWithTokenRefreshDisposalTests.cs │ ├── CombinedClientOperationsPoolAmqpTests.cs │ ├── ConnectionStatusChangeHandlerTests.cs │ ├── DeviceClientE2eTests.cs │ ├── DeviceClientX509AuthenticationE2ETests.cs │ ├── DeviceTokenRefreshE2ETests.cs │ ├── FaultInjectionPoolAmqpTests.cs │ ├── FileUploadE2ETests.cs │ ├── FileUploadFaultInjectionTests.cs │ ├── NoRetryE2ETests.cs │ ├── SasCredentialAuthenticationTests.cs │ ├── TokenCredentialAuthenticationTests.cs │ ├── messaging │ │ ├── AzureSecurityCenterForIoTSecurityMessageE2ETests.cs │ │ ├── FaultInjectionPoolAmqpTests.MessageReceiveFaultInjectionPoolAmqpTests.cs │ │ ├── FaultInjectionPoolAmqpTests.MessageSendFaultInjectionPoolAmqpTests.cs │ │ ├── MessageFeedbackE2ETests.cs │ │ ├── MessageReceiveE2EPoolAmqpTests.cs │ │ ├── MessageReceiveE2ETests.cs │ │ ├── MessageReceiveFaultInjectionTests.cs │ │ ├── MessageSendE2EPoolAmqpTests.cs │ │ ├── MessageSendE2ETests.cs │ │ └── MessageSendFaultInjectionTests.cs │ ├── method │ │ ├── FaultInjectionPoolAmqpTests.MethodFaultInjectionPoolAmqpTests.cs │ │ ├── MethodE2EPoolAmqpTests.cs │ │ ├── MethodE2ETests.cs │ │ └── MethodFaultInjectionTests.cs │ ├── service │ │ ├── BulkOperationsE2ETests.cs │ │ ├── DigitalTwinClientE2ETests.cs │ │ ├── IoTHubCertificateValidationE2ETest.cs │ │ ├── IoTHubServiceProxyE2ETests.cs │ │ ├── PnpServiceTests.cs │ │ ├── RegistryManagerE2ETests.cs │ │ ├── RegistryManagerExportDevicesTests.cs │ │ ├── RegistryManagerImportDevicesTests.cs │ │ └── ServiceClientE2ETests.cs │ └── twin │ │ ├── FaultInjectionPoolAmqpTests.TwinFaultInjectionPoolAmqpTests.cs │ │ ├── TwinE2EPoolAmqpTests.cs │ │ ├── TwinE2ETests.cs │ │ └── TwinFaultInjectionTests.cs │ ├── prerequisites │ ├── E2ETestsSetup │ │ ├── LoadEnvironmentVariablesFromKeyVault.ps1 │ │ ├── e2eTestsSetup.ps1 │ │ ├── generateArmTemplate.ps1 │ │ ├── test-resources.bicep │ │ └── test-resources.json │ └── readme.md │ └── provisioning │ ├── ProvisioningCertificateValidationE2ETest.cs │ ├── ProvisioningE2ETests.cs │ └── ProvisioningServiceClientE2ETests.cs ├── iothub ├── device │ ├── devdoc │ │ ├── amqpTransportExceptions.md │ │ ├── amqppoolconnectionselection.puml │ │ ├── amqpstack.md │ │ ├── amqpstack.puml │ │ ├── architecture.md │ │ ├── architecture.puml │ │ ├── disconnect.puml │ │ ├── openasync.puml │ │ ├── retry.png │ │ └── retrypolicy.md │ ├── readme.md │ ├── samples │ │ ├── getting started │ │ │ ├── FileUploadSample │ │ │ │ ├── FileUploadSample.cs │ │ │ │ ├── FileUploadSample.csproj │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ └── TestPayload.txt │ │ │ ├── MessageReceiveSample │ │ │ │ ├── MessageReceiveSample.cs │ │ │ │ ├── MessageReceiveSample.csproj │ │ │ │ ├── Parameters.cs │ │ │ │ └── Program.cs │ │ │ ├── MethodSample │ │ │ │ ├── MethodSample.cs │ │ │ │ ├── MethodSample.csproj │ │ │ │ ├── Parameters.cs │ │ │ │ └── Program.cs │ │ │ ├── SimulatedDevice │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ └── SimulatedDevice.csproj │ │ │ ├── SimulatedDeviceWithCommand │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ └── SimulatedDeviceWithCommand.csproj │ │ │ └── TwinSample │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ ├── TwinSample.cs │ │ │ │ ├── TwinSample.csproj │ │ │ │ └── readme.md │ │ ├── how to guides │ │ │ ├── DeviceReconnectionSample │ │ │ │ ├── CustomRetryPolicy.cs │ │ │ │ ├── DeviceReconnectionSample.cs │ │ │ │ ├── DeviceReconnectionSample.csproj │ │ │ │ ├── ExceptionHelper.cs │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ └── readme.md │ │ │ ├── HubRoutingSample │ │ │ │ ├── HubRoutingSample.csproj │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ └── resources │ │ │ │ │ ├── iothub_msgenrichment_cli.azcli │ │ │ │ │ ├── iothub_routing_cli.azcli │ │ │ │ │ ├── iothub_routing_psh.ps1 │ │ │ │ │ ├── template_iothub.json │ │ │ │ │ ├── template_iothub_parameters.json │ │ │ │ │ └── template_messageenrichments.json │ │ │ ├── X509DeviceCertWithChainSample │ │ │ │ ├── AuthSetup.ps1 │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ ├── X509DeviceCertWithChainSample.cs │ │ │ │ ├── X509DeviceCertWithChainSample.csproj │ │ │ │ └── readme.md │ │ │ └── XamarinSample │ │ │ │ ├── XamarinSample.sln │ │ │ │ ├── XamarinSample │ │ │ │ ├── XamarinSample.Android │ │ │ │ │ ├── Assets │ │ │ │ │ │ └── AboutAssets.txt │ │ │ │ │ ├── MainActivity.cs │ │ │ │ │ ├── Properties │ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ │ ├── Resources │ │ │ │ │ │ ├── AboutResources.txt │ │ │ │ │ │ ├── Resource.designer.cs │ │ │ │ │ │ ├── drawable-hdpi │ │ │ │ │ │ │ └── icon.png │ │ │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ │ │ └── icon.png │ │ │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ │ │ └── icon.png │ │ │ │ │ │ ├── drawable │ │ │ │ │ │ │ └── icon.png │ │ │ │ │ │ ├── layout │ │ │ │ │ │ │ ├── Main.axml │ │ │ │ │ │ │ ├── Tabbar.axml │ │ │ │ │ │ │ └── Toolbar.axml │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ │ └── Icon.png │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ │ └── Icon.png │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ │ └── Icon.png │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ │ └── Icon.png │ │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ │ └── Icon.png │ │ │ │ │ │ └── values │ │ │ │ │ │ │ ├── Strings.xml │ │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── XamarinSample.Android.csproj │ │ │ │ ├── XamarinSample.UWP │ │ │ │ │ ├── App.xaml │ │ │ │ │ ├── App.xaml.cs │ │ │ │ │ ├── Assets │ │ │ │ │ │ ├── LockScreenLogo.scale-100.png │ │ │ │ │ │ ├── LockScreenLogo.scale-125.png │ │ │ │ │ │ ├── LockScreenLogo.scale-150.png │ │ │ │ │ │ ├── LockScreenLogo.scale-200.png │ │ │ │ │ │ ├── LockScreenLogo.scale-400.png │ │ │ │ │ │ ├── SplashScreen.scale-100.png │ │ │ │ │ │ ├── SplashScreen.scale-125.png │ │ │ │ │ │ ├── SplashScreen.scale-150.png │ │ │ │ │ │ ├── SplashScreen.scale-200.png │ │ │ │ │ │ ├── SplashScreen.scale-400.png │ │ │ │ │ │ ├── Square150x150Logo.scale-100.png │ │ │ │ │ │ ├── Square150x150Logo.scale-125.png │ │ │ │ │ │ ├── Square150x150Logo.scale-150.png │ │ │ │ │ │ ├── Square150x150Logo.scale-200.png │ │ │ │ │ │ ├── Square150x150Logo.scale-400.png │ │ │ │ │ │ ├── Square44x44Logo.scale-100.png │ │ │ │ │ │ ├── Square44x44Logo.scale-125.png │ │ │ │ │ │ ├── Square44x44Logo.scale-150.png │ │ │ │ │ │ ├── Square44x44Logo.scale-200.png │ │ │ │ │ │ ├── Square44x44Logo.scale-400.png │ │ │ │ │ │ ├── Square44x44Logo.targetsize-16_altform-unplated.png │ │ │ │ │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ │ │ │ │ ├── Square44x44Logo.targetsize-256_altform-unplated.png │ │ │ │ │ │ ├── Square44x44Logo.targetsize-32_altform-unplated.png │ │ │ │ │ │ ├── Square44x44Logo.targetsize-48_altform-unplated.png │ │ │ │ │ │ ├── StoreLogo.png │ │ │ │ │ │ ├── Wide310x150Logo.scale-100.png │ │ │ │ │ │ ├── Wide310x150Logo.scale-125.png │ │ │ │ │ │ ├── Wide310x150Logo.scale-150.png │ │ │ │ │ │ ├── Wide310x150Logo.scale-200.png │ │ │ │ │ │ └── Wide310x150Logo.scale-400.png │ │ │ │ │ ├── MainPage.xaml │ │ │ │ │ ├── MainPage.xaml.cs │ │ │ │ │ ├── Package.appxmanifest │ │ │ │ │ ├── Properties │ │ │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ │ │ └── Default.rd.xml │ │ │ │ │ └── XamarinSample.UWP.csproj │ │ │ │ ├── XamarinSample.iOS │ │ │ │ │ ├── AppDelegate.cs │ │ │ │ │ ├── Entitlements.plist │ │ │ │ │ ├── Info.plist │ │ │ │ │ ├── Main.cs │ │ │ │ │ ├── Properties │ │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ │ ├── Resources │ │ │ │ │ │ ├── Default-568h@2x.png │ │ │ │ │ │ ├── Default-Portrait.png │ │ │ │ │ │ ├── Default-Portrait@2x.png │ │ │ │ │ │ ├── Default.png │ │ │ │ │ │ ├── Default@2x.png │ │ │ │ │ │ ├── Icon-60@2x.png │ │ │ │ │ │ ├── Icon-60@3x.png │ │ │ │ │ │ ├── Icon-76.png │ │ │ │ │ │ ├── Icon-76@2x.png │ │ │ │ │ │ ├── Icon-Small-40.png │ │ │ │ │ │ ├── Icon-Small-40@2x.png │ │ │ │ │ │ ├── Icon-Small-40@3x.png │ │ │ │ │ │ ├── Icon-Small.png │ │ │ │ │ │ ├── Icon-Small@2x.png │ │ │ │ │ │ ├── Icon-Small@3x.png │ │ │ │ │ │ └── LaunchScreen.storyboard │ │ │ │ │ └── XamarinSample.iOS.csproj │ │ │ │ └── XamarinSample │ │ │ │ │ ├── App.xaml │ │ │ │ │ ├── App.xaml.cs │ │ │ │ │ ├── MainPage.xaml │ │ │ │ │ ├── MainPage.xaml.cs │ │ │ │ │ └── XamarinSample.csproj │ │ │ │ └── readme.md │ │ ├── readme.md │ │ └── solutions │ │ │ └── PnpDeviceSamples │ │ │ ├── PnpConvention │ │ │ ├── PnpConvention.cs │ │ │ ├── PnpHelpers.csproj │ │ │ └── WritablePropertyResponse.cs │ │ │ ├── TemperatureController │ │ │ ├── Models │ │ │ │ ├── DeviceInformation.json │ │ │ │ ├── TemperatureController.json │ │ │ │ ├── Thermostat.json │ │ │ │ └── Thermostat2.json │ │ │ ├── Parameter.cs │ │ │ ├── Program.cs │ │ │ ├── TemperatureController.csproj │ │ │ └── TemperatureControllerSample.cs │ │ │ ├── Thermostat │ │ │ ├── Models │ │ │ │ └── Thermostat.json │ │ │ ├── Parameter.cs │ │ │ ├── Program.cs │ │ │ ├── Thermostat.csproj │ │ │ └── ThermostatSample.cs │ │ │ └── readme.md │ ├── src │ │ ├── Authentication │ │ │ ├── AuthenticationMethodFactory.cs │ │ │ ├── AuthenticationWithTokenRefresh.cs │ │ │ ├── DeviceAuthenticationWithRegistrySymmetricKey.cs │ │ │ ├── DeviceAuthenticationWithSakRefresh.cs │ │ │ ├── DeviceAuthenticationWithSharedAccessPolicyKey.cs │ │ │ ├── DeviceAuthenticationWithToken.cs │ │ │ ├── DeviceAuthenticationWithTokenRefresh.cs │ │ │ ├── DeviceAuthenticationWithTpm.cs │ │ │ ├── DeviceAuthenticationWithX509Certificate.cs │ │ │ ├── HsmAuthentication │ │ │ │ ├── GeneratedCode │ │ │ │ │ └── HttpHsmClient.cs │ │ │ │ ├── HttpClientHelper.cs │ │ │ │ ├── HttpHsmComunicationException.cs │ │ │ │ ├── HttpHsmSignatureProvider.cs │ │ │ │ ├── ISignatureProvider.cs │ │ │ │ ├── ModuleAuthenticationWithHsm.cs │ │ │ │ └── SasTokenBuilder.cs │ │ │ ├── IAuthenticationMethod.cs │ │ │ ├── IAuthorizationProvider.cs │ │ │ ├── IotHubConnectionString.Core.cs │ │ │ ├── IotHubConnectionString.cs │ │ │ ├── IotHubConnectionStringBuilder.cs │ │ │ ├── ModuleAuthenticationWithRegistrySymmetricKey.cs │ │ │ ├── ModuleAuthenticationWithSakRefresh.cs │ │ │ ├── ModuleAuthenticationWithToken.cs │ │ │ └── ModuleAuthenticationWithTokenRefresh.cs │ │ ├── BuildConfig │ │ │ ├── DebugBuildConfiguration.cs │ │ │ ├── GlobalSuppressions.cs │ │ │ ├── IotHubClientDiagnostic.cs │ │ │ └── Logging.DeviceClient.cs │ │ ├── ClientFactory.cs │ │ ├── ClientSettings │ │ │ ├── AmqpConnectionPoolSettings.cs │ │ │ ├── AmqpTransportSettings.cs │ │ │ ├── ClientOptions.cs │ │ │ ├── Http1TransportSettings.cs │ │ │ ├── ITransportSettings.cs │ │ │ └── MqttTransportSettings.cs │ │ ├── Common │ │ │ ├── ActionItem.cs │ │ │ ├── Amqp │ │ │ │ └── ClientWebSocketTransport.cs │ │ │ ├── Api │ │ │ │ ├── ApiResources.Designer.cs │ │ │ │ ├── ApiResources.resx │ │ │ │ ├── ClientApiVersionHelper.cs │ │ │ │ └── IotHubApiResources.cs │ │ │ ├── AsyncResult.cs │ │ │ ├── CommonConstants.cs │ │ │ ├── CommonResources.cs │ │ │ ├── CompletedAsyncResult.cs │ │ │ ├── Data │ │ │ │ ├── AccessRights.cs │ │ │ │ └── SharedAccessSignatureAuthorizationRule.cs │ │ │ ├── ExceptionDispatcher.cs │ │ │ ├── ExceptionTrace.cs │ │ │ ├── Exceptions │ │ │ │ ├── DeviceMaximumQueueDepthExceededException.cs │ │ │ │ ├── DeviceMessageLockLostException.cs │ │ │ │ ├── DeviceNotFoundException.cs │ │ │ │ ├── ExceptionHandlingHelper.cs │ │ │ │ ├── FatalException.cs │ │ │ │ ├── IotHubCommunicationException.cs │ │ │ │ ├── IotHubException.cs │ │ │ │ ├── IotHubSuspendedException.cs │ │ │ │ ├── IotHubThrottledException.cs │ │ │ │ ├── MessageTooLargeException.cs │ │ │ │ ├── QuotaExceededException.cs │ │ │ │ ├── ServerBusyException.cs │ │ │ │ ├── ServerErrorException.cs │ │ │ │ └── UnauthorizedException.cs │ │ │ ├── Extensions │ │ │ │ ├── CommonExtensions.cs │ │ │ │ ├── ExceptionExtensions.cs │ │ │ │ └── StringFormattingExtensions.cs │ │ │ ├── Fx.cs │ │ │ ├── FxCop.cs │ │ │ ├── FxTrace.cs │ │ │ ├── IOThreadScheduler.cs │ │ │ ├── Interop │ │ │ │ └── SafeEventLogWriteHandle.cs │ │ │ ├── PartialTrustHelpers.cs │ │ │ ├── ReadOnlyDictionary45.cs │ │ │ ├── Resources.Designer.cs │ │ │ ├── Resources.resx │ │ │ ├── Security │ │ │ │ ├── CertificateInstaller.cs │ │ │ │ ├── ISharedAccessSignatureCredential.cs │ │ │ │ ├── SecurityConstants.cs │ │ │ │ ├── SecurityHelper.cs │ │ │ │ ├── SharedAccessSignature.cs │ │ │ │ ├── SharedAccessSignatureBuilder.cs │ │ │ │ ├── SharedAccessSignatureConstants.cs │ │ │ │ └── StringValidationHelper.cs │ │ │ ├── SerializationUtilities.cs │ │ │ ├── SignalGate.cs │ │ │ ├── TaskHelpers.cs │ │ │ ├── Ticks.cs │ │ │ ├── TimeoutHelper.cs │ │ │ ├── Tracing │ │ │ │ └── EventTraceActivity.cs │ │ │ ├── UrlEncodedDictionarySerializer.cs │ │ │ ├── Utils.cs │ │ │ ├── WaitCallbackActionItem.cs │ │ │ └── WebApi │ │ │ │ └── CustomHeaderConstants.cs │ │ ├── ConnectionStatus.cs │ │ ├── ConnectionStatusChangeReason.cs │ │ ├── DeliveryAcknowledgement.cs │ │ ├── DeviceClient.cs │ │ ├── DirectMethod │ │ │ ├── MethodInvokeRequest.cs │ │ │ ├── MethodInvokeResponse.cs │ │ │ ├── MethodRequest.cs │ │ │ ├── MethodRequestInternal.cs │ │ │ ├── MethodResponse.cs │ │ │ ├── MethodResponseInternal.cs │ │ │ └── MethodResponseStatusCode.cs │ │ ├── Edge │ │ │ ├── CustomCertificateValidator.cs │ │ │ ├── EdgeModuleClientFactory.cs │ │ │ ├── ICertificateValidator.cs │ │ │ ├── ITrustBundleProvider.cs │ │ │ ├── InstalledCertificateValidator.cs │ │ │ ├── NullCertificateValidator.cs │ │ │ └── TrustBundleProvider.cs │ │ ├── FileUpload │ │ │ ├── FileUploadCompletionNotification.cs │ │ │ ├── FileUploadSasUriRequest.cs │ │ │ └── FileUploadSasUriResponse.cs │ │ ├── InternalClient.cs │ │ ├── JsonSerializerSettingsInitializer.cs │ │ ├── Message.cs │ │ ├── MessageSystemPropertyNames.cs │ │ ├── Microsoft.Azure.Devices.Client.csproj │ │ ├── ModernDotNet │ │ │ └── HsmAuthentication │ │ │ │ └── Transport │ │ │ │ ├── BufferedReadStream.cs │ │ │ │ ├── HttpBufferedStream.cs │ │ │ │ ├── HttpRequestResponseSerializer.cs │ │ │ │ ├── HttpUdsMessageHandler.cs │ │ │ │ └── UnixDomainSocketEndPoint.cs │ │ ├── ModuleClient.cs │ │ ├── Pipeline │ │ │ ├── DefaultDelegatingHandler.cs │ │ │ ├── DeviceClientPipelineBuilder.cs │ │ │ ├── ErrorDelegatingHandler.cs │ │ │ ├── IContinuationProvider.cs │ │ │ ├── IDelegatingHandler.cs │ │ │ ├── IDeviceClientPipelineBuilder.cs │ │ │ ├── ITransportHandlerFactory.cs │ │ │ ├── PipelineContext.cs │ │ │ ├── ProtocolRoutingDelegatingHandler.cs │ │ │ ├── RetryDelegatingHandler.cs │ │ │ ├── TransportHandler.cs │ │ │ └── TransportHandlerFactory.cs │ │ ├── ProductInfo.cs │ │ ├── RetryPolicies │ │ │ ├── ExponentialBackoff.cs │ │ │ ├── IRetryPolicy.cs │ │ │ ├── NoRetry.cs │ │ │ ├── RetryPolicyType.cs │ │ │ └── RetryStrategyAdapter.cs │ │ ├── TransientFaultHandling │ │ │ ├── ExponentialBackoffRetryStrategy.cs │ │ │ ├── FixedInterval.cs │ │ │ ├── Guard.cs │ │ │ ├── ITransientErrorDetectionStrategy.cs │ │ │ ├── Incremental.cs │ │ │ ├── Properties │ │ │ │ ├── TransientFaultHandlingResources.Designer.cs │ │ │ │ └── TransientFaultHandlingResources.resx │ │ │ ├── RetryLimitExceededException.cs │ │ │ ├── RetryPolicy.cs │ │ │ ├── RetryStrategy.cs │ │ │ ├── RetryingEventArgs.cs │ │ │ └── ShouldRetry.cs │ │ ├── Transport │ │ │ ├── Amqp │ │ │ │ ├── AmqpAuthenticationRefresher.cs │ │ │ │ ├── AmqpConnectionHolder.cs │ │ │ │ ├── AmqpConnectionPool.cs │ │ │ │ ├── AmqpTransportHandler.cs │ │ │ │ ├── AmqpUnit.cs │ │ │ │ ├── AmqpUnitManager.cs │ │ │ │ ├── AuthenticationModel.cs │ │ │ │ ├── CancellationTokenBundle.cs │ │ │ │ ├── DeviceIdentity.cs │ │ │ │ ├── IAmqpAuthenticationRefresher.cs │ │ │ │ ├── IAmqpConnectionHolder.cs │ │ │ │ ├── IAmqpUnitManager.cs │ │ │ │ └── IDeviceIdentity.cs │ │ │ ├── AmqpIot │ │ │ │ ├── AmqpIotCbsLink.cs │ │ │ │ ├── AmqpIotCbsTokenProvider.cs │ │ │ │ ├── AmqpIotConnection.cs │ │ │ │ ├── AmqpIotConnector.cs │ │ │ │ ├── AmqpIotConstants.cs │ │ │ │ ├── AmqpIotErrorAdapter.cs │ │ │ │ ├── AmqpIotExceptionAdapter.cs │ │ │ │ ├── AmqpIotLinkFactory.cs │ │ │ │ ├── AmqpIotMessageConverter.cs │ │ │ │ ├── AmqpIotOutcome.cs │ │ │ │ ├── AmqpIotReceivingLink.cs │ │ │ │ ├── AmqpIotResourceException.cs │ │ │ │ ├── AmqpIotResultAdapter.cs │ │ │ │ ├── AmqpIotSendingLink.cs │ │ │ │ ├── AmqpIotSession.cs │ │ │ │ ├── AmqpIotTransport.cs │ │ │ │ ├── AmqpIotTransportLog.cs │ │ │ │ └── MappingType.cs │ │ │ ├── Http │ │ │ │ ├── HttpClientHelper.cs │ │ │ │ ├── HttpTransportHandler.cs │ │ │ │ ├── IHttpClientHelper.cs │ │ │ │ ├── PutOperationType.cs │ │ │ │ └── ServicePointHelpers.cs │ │ │ ├── Mqtt │ │ │ │ ├── ChannelMessageProcessingException.cs │ │ │ │ ├── ClientWebSocketChannel.cs │ │ │ │ ├── ClientWebSocketChannelConfig.cs │ │ │ │ ├── ICancellable.cs │ │ │ │ ├── IMqttIotHubEventHandler.cs │ │ │ │ ├── ISessionContextProvider.cs │ │ │ │ ├── IWillMessage.cs │ │ │ │ ├── MqttIotHubAdapter.cs │ │ │ │ ├── MqttIotHubAdapterFactory.cs │ │ │ │ ├── MqttTransportHandler.cs │ │ │ │ ├── OrderedTwoPhaseWorkQueue.cs │ │ │ │ ├── PublishWorkItem.cs │ │ │ │ ├── ReadOnlyByteBufferStream.cs │ │ │ │ ├── ReferenceCountedObjectContainer.cs │ │ │ │ ├── RouteDestinationType.cs │ │ │ │ ├── SessionContextProvider.cs │ │ │ │ ├── SimpleWorkQueue.cs │ │ │ │ ├── TransientErrorIgnoreStrategy.cs │ │ │ │ ├── TransportState.cs │ │ │ │ └── WillMessage.cs │ │ │ └── WebSocketConstants.cs │ │ ├── TransportType.cs │ │ └── net451 │ │ │ ├── Common │ │ │ ├── Interop │ │ │ │ └── UnsafeNativeMethods.cs │ │ │ └── LegacyClientWebSocketTransport.cs │ │ │ └── IotHubClientWebSocket.cs │ └── tests │ │ ├── Authentication │ │ ├── AuthenticationWithTokenRefreshTests.cs │ │ ├── DeviceAuthenticationWithTokenRefreshTests.cs │ │ ├── DeviceClientConnectionStringExceptionTests.cs │ │ ├── HsmAuthentication │ │ │ ├── HttpBufferedStreamTest.cs │ │ │ ├── HttpRequestResponseSerializerTest.cs │ │ │ ├── ModuleAuthenticationWithHsmTest.cs │ │ │ └── SasTokenBuilderTest.cs │ │ ├── IotHubConnectionStringBuilderTests.cs │ │ ├── IotHubConnectionStringExtensions.cs │ │ ├── ModuleAuthenticationTests.cs │ │ └── ModuleAuthenticationWithTokenRefreshTests.cs │ │ ├── CertificateHelper.cs │ │ ├── ClientSettings │ │ └── TransportSettingsTests.cs │ │ ├── ClientWebSocketTransportTests.cs │ │ ├── DeviceClientDisposeTests.cs │ │ ├── DeviceClientTests.cs │ │ ├── DeviceClientTwinApiTests.cs │ │ ├── Edge │ │ ├── CustomCertificateValidatorTest.cs │ │ ├── EdgeModuleClientFactoryTest.cs │ │ └── TrustBundleProviderTest.cs │ │ ├── ExceptionAssertions.cs │ │ ├── IoTHubClientDiagnosticTest.cs │ │ ├── MessageTests.cs │ │ ├── Microsoft.Azure.Devices.Client.Tests.csproj │ │ ├── ModuleClientDisposeTests.cs │ │ ├── ModuleClientTests.cs │ │ ├── Pipeline │ │ ├── ErrorDelegatingHandlerTests.cs │ │ ├── ProtocolRoutingDelegatingHandlerTests.cs │ │ ├── RetryDelegatingHandlerImplicitOpenTests.cs │ │ └── RetryDelegatingHandlerTests.cs │ │ ├── ProductInfoTests.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── RetryPolicies │ │ ├── ExponentialBackoffTests.cs │ │ └── NoRetryPolicyTests.cs │ │ ├── TestAssert.cs │ │ ├── TimeoutHelperTests.cs │ │ ├── Transport │ │ ├── Amqp │ │ │ ├── AmqpConnectionPoolTests.cs │ │ │ ├── AmqpTransportHandlerTests.cs │ │ │ ├── MoqableAmqpTransportHandler.cs │ │ │ └── MoqableAmqpUnit.cs │ │ ├── Http │ │ │ └── HttpTransportHandlerTests.cs │ │ ├── Mqtt │ │ │ ├── ChannelExtensions.cs │ │ │ ├── ClientWebSocketChannelTests.cs │ │ │ ├── MqttIotHubAdapterTest.cs │ │ │ ├── MqttTransportHandlerTests.cs │ │ │ └── ReadListeningHandler.cs │ │ └── ServerWebSocketChannel.cs │ │ └── UtilsTests.cs └── service │ ├── README.md │ ├── devdoc │ └── ServiceClient.md │ ├── samples │ ├── getting started │ │ ├── EdgeDeploymentSample │ │ │ ├── EdgeDeploymentSample.cs │ │ │ ├── EdgeDeploymentSample.csproj │ │ │ ├── Parameters.cs │ │ │ └── Program.cs │ │ ├── FileUploadNotificationReceiverSample │ │ │ ├── FileUploadNotificationReceiverSample.cs │ │ │ ├── FileUploadNotificationReceiverSample.csproj │ │ │ ├── Parameters.cs │ │ │ └── Program.cs │ │ ├── InvokeDeviceMethod │ │ │ ├── InvokeDeviceMethod.csproj │ │ │ ├── Parameters.cs │ │ │ └── Program.cs │ │ ├── JobsSample │ │ │ ├── JobsSample.cs │ │ │ ├── JobsSample.csproj │ │ │ ├── Parameters.cs │ │ │ └── Program.cs │ │ ├── ReadD2cMessages │ │ │ ├── Parameters.cs │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ └── ReadD2cMessages.csproj │ │ └── ServiceClientSample │ │ │ ├── ExceptionHelper.cs │ │ │ ├── Parameters.cs │ │ │ ├── Program.cs │ │ │ ├── ServiceClientSample.cs │ │ │ ├── ServiceClientSample.csproj │ │ │ └── readme.md │ ├── how to guides │ │ ├── AutomaticDeviceManagementSample │ │ │ ├── AutomaticDeviceManagementSample.cs │ │ │ ├── AutomaticDeviceManagementSample.csproj │ │ │ ├── Parameters.cs │ │ │ └── Program.cs │ │ ├── AzureSasCredentialAuthenticationSample │ │ │ ├── AzureSasCredentialAuthenticationSample.cs │ │ │ ├── AzureSasCredentialAuthenticationSample.csproj │ │ │ ├── Parameters.cs │ │ │ └── Program.cs │ │ ├── CleanupDevicesSample │ │ │ ├── CleanupDevicesSample.cs │ │ │ ├── CleanupDevicesSample.csproj │ │ │ ├── ImportError.cs │ │ │ ├── ImportExportDevicesHelper.cs │ │ │ ├── Parameters.cs │ │ │ └── Program.cs │ │ ├── ImportExportDevicesSample │ │ │ ├── ImportExportDevicesSample.cs │ │ │ ├── ImportExportDevicesSample.csproj │ │ │ ├── Parameters.cs │ │ │ └── Program.cs │ │ ├── ImportExportDevicesWithManagedIdentitySample │ │ │ ├── ImportExportDevicesWithManagedIdentitySample.csproj │ │ │ ├── ImportExportDevicesWithManagedidentitySample.cs │ │ │ ├── Parameters.cs │ │ │ └── Program.cs │ │ ├── RegistryManagerSample │ │ │ ├── Parameters.cs │ │ │ ├── Program.cs │ │ │ ├── RegistryManagerSample.cs │ │ │ └── RegistryManagerSample.csproj │ │ └── RoleBasedAuthenticationSample │ │ │ ├── Parameters.cs │ │ │ ├── Program.cs │ │ │ ├── RoleBasedAuthenticationSample.cs │ │ │ └── RoleBasedAuthenticationSample.csproj │ ├── readme.md │ └── solutions │ │ ├── DigitalTwinClientSamples │ │ ├── TemperatureController │ │ │ ├── Parameters.cs │ │ │ ├── Program.cs │ │ │ ├── TemperatureController.csproj │ │ │ ├── TemperatureControllerSample.cs │ │ │ ├── TemperatureControllerTwin.cs │ │ │ └── ThermostatTwin.cs │ │ ├── Thermostat │ │ │ ├── Parameters.cs │ │ │ ├── Program.cs │ │ │ ├── Thermostat.csproj │ │ │ ├── ThermostatSample.cs │ │ │ └── ThermostatTwin.cs │ │ └── readme.md │ │ └── PnpServiceSamples │ │ ├── TemperatureController │ │ ├── Parameters.cs │ │ ├── Program.cs │ │ ├── TemperatureController.csproj │ │ └── TemperatureControllerSample.cs │ │ ├── Thermostat │ │ ├── Parameters.cs │ │ ├── Program.cs │ │ ├── Thermostat.csproj │ │ └── ThermostatSample.cs │ │ └── readme.md │ ├── src │ ├── Amqp │ │ ├── AmqpClientHelper.cs │ │ ├── AmqpTransportLog.cs │ │ └── IotHubConnection.cs │ ├── ApiResources.Designer.cs │ ├── ApiResources.resx │ ├── Authentication │ │ ├── IAuthenticationMethod.cs │ │ ├── IotHubConnectionProperties.cs │ │ ├── IotHubConnectionStringBuilder.cs │ │ ├── IotHubSasCredentialProperties.cs │ │ ├── IotHubTokenCredentialProperties.cs │ │ ├── ServiceAuthenticationWithDeviceSharedAccessPolicyKey.cs │ │ ├── ServiceAuthenticationWithDeviceSharedAccessPolicyToken.cs │ │ ├── ServiceAuthenticationWithSharedAccessPolicyKey.cs │ │ └── ServiceAuthenticationWithSharedAccessPolicyToken.cs │ ├── BuildConfig │ │ ├── DebugBuildConfiguration.cs │ │ ├── GlobalSuppressions.cs │ │ └── Logging.ServiceClient.cs │ ├── ClientApiVersionHelper.cs │ ├── Common │ │ ├── Amqp │ │ │ ├── ClientWebSocketTransport.cs │ │ │ ├── LegacyClientWebSocketTransport.cs │ │ │ └── WebSocketConstants.cs │ │ ├── AsyncResult.cs │ │ ├── BufferedInputStream.cs │ │ ├── Client │ │ │ └── IotHubAmqpProperty.cs │ │ ├── CompletedAsyncResult.cs │ │ ├── Data │ │ │ ├── AccessRights.cs │ │ │ ├── AmqpErrorMapper.cs │ │ │ └── SharedAccessSignatureAuthorizationRule.cs │ │ ├── Exceptions │ │ │ ├── CallbackException.cs │ │ │ ├── ConfigurationNotFoundException.cs │ │ │ ├── DeviceAlreadyExistsException.cs │ │ │ ├── DeviceInvalidResultCountException.cs │ │ │ ├── DeviceMaximumQueueDepthExceededException.cs │ │ │ ├── DeviceMessageLockLostException.cs │ │ │ ├── DeviceNotFoundException.cs │ │ │ ├── ErrorCode.cs │ │ │ ├── InvalidProtocolVersionException.cs │ │ │ ├── IotHubAmqpErrorCode.cs │ │ │ ├── IotHubCommunicationException.cs │ │ │ ├── IotHubException.cs │ │ │ ├── IotHubNotFoundException.cs │ │ │ ├── IotHubSerializationException.cs │ │ │ ├── IotHubSerializationVersionException.cs │ │ │ ├── IotHubSuspendedException.cs │ │ │ ├── IotHubThrottledException.cs │ │ │ ├── JobCancelledException.cs │ │ │ ├── JobNotFoundException.cs │ │ │ ├── JobQuotaExceededException.cs │ │ │ ├── MessageTooLargeException.cs │ │ │ ├── ModuleAlreadyExistsException.cs │ │ │ ├── ModuleNotFoundException.cs │ │ │ ├── PreconditionFailedException.cs │ │ │ ├── QuotaExceededException.cs │ │ │ ├── ServerBusyException.cs │ │ │ ├── ServerErrorException.cs │ │ │ ├── ThrottlingException.cs │ │ │ ├── TooManyDevicesException.cs │ │ │ ├── TooManyModulesOnDeviceException.cs │ │ │ └── UnauthorizedException.cs │ │ ├── Extensions │ │ │ ├── AmqpExtensions.cs │ │ │ ├── CommonExtensions.cs │ │ │ ├── DictionaryExtensions.cs │ │ │ ├── EnumerableExtensions.cs │ │ │ ├── ExceptionExtensions.cs │ │ │ ├── MemberInfoExtensions.cs │ │ │ └── OtherExtensions.cs │ │ ├── FxTrace.cs │ │ ├── IOThreadScheduler.cs │ │ ├── InternalBufferManager.cs │ │ ├── Interop │ │ │ └── SafeEventLogWriteHandle.cs │ │ ├── PartialTrustHelpers.cs │ │ ├── PerfectHash.cs │ │ ├── ReadOnlyDictionary45.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Security │ │ │ ├── CryptoKeyGenerator.cs │ │ │ ├── ISharedAccessSignatureCredential.cs │ │ │ ├── SecurityConstants.cs │ │ │ ├── SecurityHelper.cs │ │ │ ├── SharedAccessSignature.cs │ │ │ ├── SharedAccessSignatureBuilder.cs │ │ │ └── SharedAccessSignatureConstants.cs │ │ ├── SerializationUtilities.cs │ │ ├── SignalGate.cs │ │ ├── SingletonDictionary.cs │ │ ├── Ticks.cs │ │ ├── TimeoutHelper.cs │ │ ├── Timestamp.cs │ │ ├── TokenHelper.cs │ │ ├── TraceOperation.cs │ │ ├── TrackingHelper.cs │ │ ├── WaitCallbackActionItem.cs │ │ └── WebApi │ │ │ ├── CustomHeaderConstants.cs │ │ │ └── ResourceRequest.cs │ ├── Configurations │ │ ├── Configuration.cs │ │ ├── ConfigurationContent.cs │ │ ├── ConfigurationImportMode.cs │ │ ├── ConfigurationMetrics.cs │ │ └── ImportConfiguration.cs │ ├── DigitalTwin │ │ ├── Authentication │ │ │ ├── DigitalTwinConnectionStringCredential.cs │ │ │ ├── DigitalTwinSasCredential.cs │ │ │ ├── DigitalTwinServiceClientCredentials.cs │ │ │ └── DigitalTwinTokenCredential.cs │ │ ├── Customized │ │ │ └── DigitalTwinInvokeCommandHeaders.cs │ │ ├── DigitalTwin.json │ │ ├── DigitalTwinClient.cs │ │ ├── Extensions.cs │ │ ├── Generated │ │ │ ├── DigitalTwin.cs │ │ │ ├── DigitalTwinExtensions.cs │ │ │ ├── IDigitalTwin.cs │ │ │ ├── IIotHubGatewayServiceAPIs.cs │ │ │ ├── IotHubGatewayServiceAPIs.cs │ │ │ └── Models │ │ │ │ ├── DigitalTwinGetHeaders.cs │ │ │ │ ├── DigitalTwinInvokeComponentCommandHeaders.cs │ │ │ │ ├── DigitalTwinInvokeRootLevelCommandHeaders.cs │ │ │ │ └── DigitalTwinUpdateHeaders.cs │ │ ├── Models │ │ │ ├── DigitalTwinCommandResponse.cs │ │ │ ├── DigitalTwinInvokeCommandRequestOptions.cs │ │ │ └── DigitalTwinUpdateRequestOptions.cs │ │ ├── Serialization │ │ │ ├── BasicDigitalTwin.cs │ │ │ ├── ComponentMetadata.cs │ │ │ ├── DigitalTwinMetadata.cs │ │ │ ├── UpdateOperationsUtility.cs │ │ │ └── WritableProperty.cs │ │ ├── autorest.md │ │ ├── generateCode.ps1 │ │ └── readme.md │ ├── DirectMethod │ │ ├── CloudToDeviceMethod.cs │ │ └── CloudToDeviceMethodResult.cs │ ├── EndpointKind.cs │ ├── Feedback │ │ ├── AmqpFeedbackReceiver.cs │ │ ├── FeedbackBatch.cs │ │ ├── FeedbackReceiver.cs │ │ ├── FeedbackRecord.cs │ │ └── FeedbackStatusCode.cs │ ├── FileUpload │ │ ├── AmqpFileNotificationReceiver.cs │ │ ├── FileNotification.cs │ │ └── FileNotificationReceiver.cs │ ├── Http │ │ └── HttpTransportSettings.cs │ ├── IoTHubExceptionResult.cs │ ├── IotHubApiResources.cs │ ├── IotHubClientWebSocket.cs │ ├── Jobs │ │ ├── DeviceJob.cs │ │ ├── DeviceJobError.cs │ │ ├── DeviceJobOutcome.cs │ │ ├── DeviceJobParameters.cs │ │ ├── DeviceJobStatus.cs │ │ ├── DeviceJobType.cs │ │ ├── JobClient.cs │ │ ├── JobParameters.cs │ │ ├── JobProperties.cs │ │ ├── JobRequest.cs │ │ ├── JobResponse.cs │ │ ├── JobStatus.cs │ │ ├── JobType.cs │ │ └── ManagedIdentity.cs │ ├── JsonSerializerSettingsInitializer.cs │ ├── Messaging │ │ ├── Models │ │ │ ├── DeliveryAcknowledgement.cs │ │ │ ├── MappingType.cs │ │ │ ├── Message.cs │ │ │ ├── MessageConverter.cs │ │ │ └── MessageSystemPropertyNames.cs │ │ ├── ServiceClient.cs │ │ ├── ServiceClientOptions.cs │ │ └── ServiceClientTransportSettings.cs │ ├── Microsoft.Azure.Devices.csproj │ ├── ModernDotNet │ │ └── Common │ │ │ └── IOThreadTimerSlim.cs │ ├── Query │ │ ├── IQuery.cs │ │ ├── Query.cs │ │ ├── QueryOptions.cs │ │ ├── QueryResponse.cs │ │ ├── QueryResult.cs │ │ └── QueryResultType.cs │ ├── Receiver.cs │ ├── Registry │ │ ├── Models │ │ │ ├── AuthenticationMechanism.cs │ │ │ ├── BulkRegistryOperationResult.cs │ │ │ ├── Device.cs │ │ │ ├── DeviceRegistryOperationError.cs │ │ │ ├── ExportImportDevice.cs │ │ │ ├── ExportImportRequest.cs │ │ │ ├── ImportMode.cs │ │ │ ├── Module.cs │ │ │ ├── RegistryStatistics.cs │ │ │ ├── ServiceStatistics.cs │ │ │ ├── StorageAuthenticationType.cs │ │ │ ├── SymmetricKey.cs │ │ │ └── X509ThumbprintExtensions.cs │ │ ├── PurgeMessageQueueResult.cs │ │ └── RegistryManager.cs │ ├── ServicePointHelpers.cs │ └── net451 │ │ └── Common │ │ ├── ActionItem.cs │ │ ├── IOThreadTimer.cs │ │ ├── Interop │ │ └── UnsafeNativeMethods.cs │ │ └── SynchronizedPool.cs │ └── tests │ ├── ClientWebSocketTransportTests.cs │ ├── ConnectionString │ ├── ServiceClientConnectionStringExceptionTests.cs │ └── ServiceClientConnectionStringTests.cs │ ├── CryptoKeyGenerator.cs │ ├── DeviceAuthenticationTests.cs │ ├── DigitalTwin │ └── UpdateOperationsUtilityTests.cs │ ├── ExceptionHandlingHelperTests.cs │ ├── ExportImportDeviceTests.cs │ ├── IotHubConnectionPropertiesTests.cs │ ├── IotHubSasCredentialPropertiesTests.cs │ ├── JobClient │ ├── DeviceJobParametersTest.cs │ └── JobClientTests.cs │ ├── MessageTests.cs │ ├── Microsoft.Azure.Devices.Tests.csproj │ ├── QueryTests.cs │ ├── RegistryManagerTests.cs │ ├── SerializationTests.cs │ ├── ServiceClientTests.cs │ ├── TestAssert.cs │ ├── TestTokenCredential.cs │ ├── TokenHelperTests.cs │ ├── prerequisites │ ├── windows_install.cmd │ └── windows_remove.cmd │ └── readme.md ├── nuget.config ├── provisioning ├── device │ ├── samples │ │ ├── getting started │ │ │ ├── ComputeDerivedSymmetricKeySample │ │ │ │ ├── ComputeDerivedKeySample.cs │ │ │ │ ├── ComputeDerivedSymmetricKeySample.csproj │ │ │ │ ├── Parameters.cs │ │ │ │ └── Program.cs │ │ │ └── X509Sample │ │ │ │ ├── GenerateTestCertificate.ps1 │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ ├── Properties │ │ │ │ └── launchSettings.json.template │ │ │ │ ├── ProvisioningDeviceClientSample.cs │ │ │ │ ├── X509Sample.csproj │ │ │ │ └── readme.md │ │ ├── how to guides │ │ │ ├── SymmetricKeySample │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ ├── ProvisioningDeviceClientSample.cs │ │ │ │ └── SymmetricKeySample.csproj │ │ │ └── TpmSample │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ ├── Properties │ │ │ │ └── launchSettings.json.template │ │ │ │ ├── ProvisioningDeviceClientSample.cs │ │ │ │ ├── TpmSample.csproj │ │ │ │ └── readme.md │ │ └── readme.md │ ├── src │ │ ├── CertificateInstaller.cs │ │ ├── DeviceRegistrationResult.cs │ │ ├── Extensions │ │ │ └── CommonExtensions.cs │ │ ├── GlobalSuppressions.cs │ │ ├── JsonSerializerSettingsInitializer.cs │ │ ├── Logging.ProvisioningDeviceClient.cs │ │ ├── Microsoft.Azure.Devices.Provisioning.Client.csproj │ │ ├── PlugAndPlay │ │ │ └── PnpConvention.cs │ │ ├── ProductInfo.cs │ │ ├── ProvisioningDeviceClient.cs │ │ ├── ProvisioningErrorDetails.cs │ │ ├── ProvisioningRegistrationAdditionalData.cs │ │ ├── ProvisioningRegistrationStatus.cs │ │ ├── ProvisioningRegistrationSubstatus.cs │ │ ├── ProvisioningTransportException.cs │ │ ├── ProvisioningTransportHandler.cs │ │ └── ProvisioningTransportRegisterRequest.cs │ └── tests │ │ └── Microsoft.Azure.Devices.Provisioning.Client.Tests.csproj ├── service │ ├── samples │ │ ├── getting started │ │ │ ├── CleanupEnrollmentsSample │ │ │ │ ├── CleanupEnrollmentsSample.cs │ │ │ │ ├── CleanupEnrollmentsSample.csproj │ │ │ │ ├── Parameters.cs │ │ │ │ └── Program.cs │ │ │ ├── EnrollmentGroupSample │ │ │ │ ├── EnrollmentGroupSample.cs │ │ │ │ ├── EnrollmentGroupSample.csproj │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ └── Properties │ │ │ │ │ └── launchSettings.json.template │ │ │ └── EnrollmentSample │ │ │ │ ├── IndividualEnrollmentSample.cs │ │ │ │ ├── IndividualEnrollmentSample.csproj │ │ │ │ ├── Parameters.cs │ │ │ │ └── Program.cs │ │ ├── how to guides │ │ │ ├── BulkOperationSample │ │ │ │ ├── BulkOperationSample.cs │ │ │ │ ├── BulkOperationSample.csproj │ │ │ │ ├── Parameters.cs │ │ │ │ ├── Program.cs │ │ │ │ └── Properties │ │ │ │ │ └── launchSettings.json.template │ │ │ └── GroupCertificateVerificationSample │ │ │ │ ├── GroupCertificateVerificationSample.csproj │ │ │ │ ├── Program.cs │ │ │ │ └── VerificationCertificateGenerator.cs │ │ └── readme.md │ ├── src │ │ ├── Auth │ │ │ ├── AccessRights.cs │ │ │ ├── AuthenticationMethodFactory.cs │ │ │ ├── IAuthenticationMethod.cs │ │ │ ├── IAuthorizationHeaderProvider.cs │ │ │ ├── ISharedAccessSignatureCredential.cs │ │ │ ├── SecurityHelper.cs │ │ │ ├── ServiceAuthenticationWithSharedAccessPolicyKey.cs │ │ │ ├── ServiceAuthenticationWithSharedAccessPolicyToken.cs │ │ │ ├── ServiceConnectionString.cs │ │ │ ├── ServiceConnectionStringBuilder.cs │ │ │ ├── SharedAccessSignature.cs │ │ │ ├── SharedAccessSignatureAuthorizationRule.cs │ │ │ ├── SharedAccessSignatureBuilder.cs │ │ │ └── SharedAccessSignatureConstants.cs │ │ ├── CodeAnalysisOverrides.cs │ │ ├── Common │ │ │ └── CommonExtensions.cs │ │ ├── Config │ │ │ ├── AllocationPolicy.cs │ │ │ ├── Attestation.cs │ │ │ ├── AttestationMechanism.cs │ │ │ ├── AttestationMechanismType.cs │ │ │ ├── BulkEnrollmentOperation.cs │ │ │ ├── BulkEnrollmentOperationError.cs │ │ │ ├── BulkEnrollmentOperationResult.cs │ │ │ ├── BulkOperationMode.cs │ │ │ ├── CustomAllocationDefinition.cs │ │ │ ├── DeviceRegistrationState.cs │ │ │ ├── EnrollmentGroup.cs │ │ │ ├── EnrollmentStatus.cs │ │ │ ├── IndividualEnrollment.cs │ │ │ ├── ProvisioningStatus.cs │ │ │ ├── QueryResult.cs │ │ │ ├── QueryResultType.cs │ │ │ ├── QuerySpecification.cs │ │ │ ├── ReprovisionPolicy.cs │ │ │ ├── SymmetricKeyAttestation.cs │ │ │ ├── TpmAttestation.cs │ │ │ ├── TwinState.cs │ │ │ ├── X509Attestation.cs │ │ │ ├── X509CAReferences.cs │ │ │ ├── X509CertificateInfo.cs │ │ │ ├── X509CertificateWithInfo.cs │ │ │ └── X509Certificates.cs │ │ ├── Contract │ │ │ ├── ContractApiHttp.cs │ │ │ ├── ContractApiResponse.cs │ │ │ ├── CustomHeaderConstants.cs │ │ │ ├── IContractApiHttp.cs │ │ │ └── SDKUtils.cs │ │ ├── DebugBuildConfiguration.cs │ │ ├── Exceptions │ │ │ ├── ProvisioningServiceClientException.cs │ │ │ ├── ProvisioningServiceClientHttpException.cs │ │ │ └── ProvisioningServiceClientTransportException.cs │ │ ├── GlobalSuppressions.cs │ │ ├── HttpTransportSettings.cs │ │ ├── JsonSerializerSettingsInitializer.cs │ │ ├── Manager │ │ │ ├── EnrollmentGroupManager.cs │ │ │ ├── IndividualEnrollmentManager.cs │ │ │ └── RegistrationStatusManager.cs │ │ ├── Microsoft.Azure.Devices.Provisioning.Service.csproj │ │ ├── Properties │ │ │ ├── ApiResources.Designer.cs │ │ │ └── ApiResources.resx │ │ ├── ProvisioningServiceClient.cs │ │ └── Query.cs │ └── tests │ │ ├── Config │ │ ├── AttestationMechanismTests.cs │ │ ├── BulkEnrollmentOperationErrorTests.cs │ │ ├── BulkEnrollmentOperationResultTests.cs │ │ ├── BulkEnrollmentOperationTests.cs │ │ ├── EnrollmentGroupTests.cs │ │ ├── IndividualEnrollmentTests.cs │ │ ├── QueryResultTests.cs │ │ ├── SymmetricKeyAttestationTest.cs │ │ ├── TpmAttestationTests.cs │ │ ├── TwinStateTests.cs │ │ ├── X509AttestationTests.cs │ │ ├── X509CAReferencesTests.cs │ │ ├── X509CertificateInfoTests.cs │ │ ├── X509CertificateWithInfoTests.cs │ │ └── X509CertificatesTests.cs │ │ ├── Microsoft.Azure.Devices.Provisioning.Service.Tests.csproj │ │ └── TestAssert.cs └── transport │ ├── amqp │ ├── src │ │ ├── AmqpAuthStrategy.cs │ │ ├── AmqpAuthStrategySymmetricKey.cs │ │ ├── AmqpAuthStrategyTpm.cs │ │ ├── AmqpAuthStrategyX509.cs │ │ ├── AmqpClientConnection.cs │ │ ├── AmqpClientLink.cs │ │ ├── AmqpClientSession.cs │ │ ├── AmqpLinkFactory.cs │ │ ├── ClientWebSocketTransport.cs │ │ ├── DebugBuildConfiguration.cs │ │ ├── DeviceOperations.cs │ │ ├── GlobalSuppressions.cs │ │ ├── JsonSerializerSettingsInitializer.cs │ │ ├── LinkCreatedEventArgs.cs │ │ ├── Logging.ProvisioningTransport.Amqp.cs │ │ ├── MessageApplicationPropertyNames.cs │ │ ├── Microsoft.Azure.Devices.Provisioning.Transport.Amqp.csproj │ │ ├── ProvisioningErrorDetailsAmqp.cs │ │ ├── ProvisioningTransportHandlerAmqp.cs │ │ ├── SaslTpmHandler.cs │ │ ├── TaskHelpers.cs │ │ └── WebSocketConstants.cs │ └── tests │ │ ├── Microsoft.Azure.Devices.Provisioning.Transport.Amqp.Tests.csproj │ │ ├── ProvisioningErrorDetailsAmqpTests.cs │ │ └── RetryJitterTests.cs │ ├── generated │ └── src │ │ └── Models │ │ └── DeviceRegistration.cs │ ├── http │ ├── src │ │ ├── ApiVersionDelegatingHandler.cs │ │ ├── CertificateChainCredentials.cs │ │ ├── Generated │ │ │ ├── DeviceProvisioningServiceRuntimeClient.cs │ │ │ ├── IDeviceProvisioningServiceRuntimeClient.cs │ │ │ ├── IRuntimeRegistration.cs │ │ │ ├── Models │ │ │ │ ├── DeviceRegistrationHttp.cs │ │ │ │ └── TpmAttestation.cs │ │ │ ├── RuntimeRegistration.cs │ │ │ └── RuntimeRegistrationExtensions.cs │ │ ├── GlobalSuppressions.cs │ │ ├── HttpAuthStrategy.cs │ │ ├── HttpAuthStrategySymmetricKey.cs │ │ ├── HttpAuthStrategyTpm.cs │ │ ├── HttpAuthStrategyX509.cs │ │ ├── JsonSerializerSettingsInitializer.cs │ │ ├── Logging.ProvisioningTransport.Http.cs │ │ ├── Microsoft.Azure.Devices.Provisioning.Transport.Http.csproj │ │ ├── ProvisioningErrorDetailsHttp.cs │ │ ├── ProvisioningTransportHandlerHttp.cs │ │ ├── SymmetricKeyCredentials.cs │ │ └── TPM │ │ │ ├── TpmChallenge.cs │ │ │ ├── TpmCredentials.cs │ │ │ └── TpmDelegatingHandler.cs │ └── tests │ │ └── Microsoft.Azure.Devices.Provisioning.Transport.Http.Tests.csproj │ └── mqtt │ ├── src │ ├── DebugBuildConfiguration.cs │ ├── GlobalSuppressions.cs │ ├── JsonSerializerSettingsInitializer.cs │ ├── Logging.ProvisioningTransport.Mqtt.cs │ ├── Microsoft.Azure.Devices.Provisioning.Transport.Mqtt.csproj │ ├── ProvisioningChannelHandlerAdapter.cs │ ├── ProvisioningErrorDetailsMqtt.cs │ └── ProvisioningTransportHandlerMqtt.cs │ └── tests │ ├── Microsoft.Azure.Devices.Provisioning.Transport.Mqtt.Tests.csproj │ └── ProvisioningErrorDetailsMqttTests.cs ├── readme.md ├── samples └── helpers │ └── ColorConsoleLogger │ ├── ColorConsoleLogger.cs │ ├── ColorConsoleLogger.csproj │ ├── ColorConsoleLoggerConfiguration.cs │ ├── ColorConsoleLoggerExtensions.cs │ ├── ColorConsoleLoggerProvider.cs │ └── ConsoleEventListener.cs ├── security └── tpm │ ├── samples │ ├── SecurityProviderTpmSimulator │ │ ├── SecurityProviderTpmSimulator.cs │ │ ├── SecurityProviderTpmSimulator.csproj │ │ └── TpmSimulator │ │ │ ├── Simulator.exe │ │ │ ├── Tpm.dll │ │ │ └── readme.md │ └── samples.sln │ ├── src │ ├── Logging.Security.Tpm.cs │ ├── Microsoft.Azure.Devices.Provisioning.Security.Tpm.csproj │ └── SecurityProviderTpmHsm.cs │ └── tests │ └── Microsoft.Azure.Devices.Provisioning.Security.Tpm.Tests.csproj ├── shared ├── icons │ └── nugetIcon.png ├── src │ ├── AuthenticationType.cs │ ├── CodeAnalysisOverrides.cs │ ├── ConfigurationInfo.cs │ ├── ConfigurationStatus.cs │ ├── DebugBuildConfiguration.cs │ ├── DeviceCapabilities.cs │ ├── DeviceConnectionState.cs │ ├── DeviceStatus.cs │ ├── ETagHolder.cs │ ├── GlobalSuppressions.cs │ ├── IETagHolder.cs │ ├── JsonSerializerSettingsInitializer.cs │ ├── Metadata.cs │ ├── Microsoft.Azure.Devices.Shared.csproj │ ├── SdkAssignsMessageId.cs │ ├── SecurityProvider.cs │ ├── SecurityProviderSymmetricKey.cs │ ├── SecurityProviderTpm.cs │ ├── SecurityProviderX509.cs │ ├── SecurityProviderX509Certificate.cs │ ├── StringFormattingExtensions.cs │ ├── TlsVersions.cs │ ├── TransportFallbackType.cs │ ├── Twin.cs │ ├── TwinCollection.cs │ ├── TwinCollectionArray.cs │ ├── TwinCollectionJsonConverter.cs │ ├── TwinCollectionValue.cs │ ├── TwinJsonConverter.cs │ ├── TwinProperties.cs │ └── X509Thumbprint.cs └── tests │ ├── Microsoft.Azure.Devices.Shared.Tests.csproj │ └── TlsVersionsTests.cs ├── supported_platforms.md ├── test.runsettings ├── thirdpartynotice.txt ├── tools ├── CaptureLogs │ ├── iot_providers.txt │ ├── iot_startlog.ps1 │ ├── iot_stoplog.ps1 │ ├── query │ │ ├── etlxml_query_graph.linq │ │ ├── etlxml_query_objectType.linq │ │ ├── etlxml_summary.linq │ │ └── readme.md │ └── readme.md ├── TLS Protocols Tests │ ├── DeviceClientTests.cs │ ├── DpsClientTests.cs │ ├── IotServiceTests.cs │ ├── Program.cs │ ├── ReadMe │ │ ├── TLS 1.1 only.reg │ │ ├── TLS 1.2 only.reg │ │ └── readme.md │ ├── TLS protocol tests.csproj │ └── TLS protocol tests.sln └── diffscripts │ ├── README.md │ └── diffapi.ps1 ├── versions.csv ├── versions.json ├── versionupdate.ps1 └── vsts ├── CredScanSuppressions.json ├── PolicheckExclusionsDB.mdb ├── TpmSimulator ├── Simulator.exe ├── Tpm.dll └── readme.md ├── TsaUploadConfigFile.json ├── build-release-artifacts.yml ├── build-test-nuget.yml ├── determine_tests_to_run.ps1 ├── gatedBuild.ps1 ├── horton-e2e-fault-injection.yaml ├── horton-e2e.yaml ├── releaseTest.ps1 ├── start_tpm_windows.ps1 ├── test-release-nuget.yaml └── vsts.yaml /.gitattributes: -------------------------------------------------------------------------------- 1 | # Default behavior: if Git thinks a file is text (as opposed to binary), it 2 | # will normalize line endings to LF in the repository, but convert to your 3 | # platform's native line endings on checkout (e.g., CRLF for Windows). 4 | * text=auto 5 | # Explicitly declare text files you want to always be normalized and converted 6 | # to native line endings on checkout. E.g., 7 | #*.c text 8 | # Declare files that will always have CRLF line endings on checkout. E.g., 9 | #*.sln text eol=crlf 10 | # Declare files that will always have LF line endings on checkout. E.g., 11 | *.sh text eol=lf 12 | *.json text eol=lf 13 | # Denote all files that should not have line endings normalized, should not be 14 | # merged, and should not show in a textual diff. 15 | *.docm binary 16 | *.docx binary 17 | *.ico binary 18 | *.lib binary 19 | *.png binary 20 | *.pptx binary 21 | *.snk binary 22 | *.vsdx binary 23 | *.xps binary 24 | 25 | # Added by git lfs track "*.mdb" for the policheck ignore 26 | *.mdb binary 27 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Track1 .NET Azure IoT Hub and DPS SDKs 2 | 3 | * @timtay-microsoft @lev-i @olivakar @avishekpant 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Azure IoT support and help options 4 | url: https://aka.ms/IoTHelp 5 | about: The main landing page for all Azure IoT support options. 6 | -------------------------------------------------------------------------------- /.github/workflows/github_issues.yml: -------------------------------------------------------------------------------- 1 | name: Sync issue to Azure DevOps work item 2 | 3 | "on": 4 | issues: 5 | types: 6 | [opened, reopened] 7 | 8 | jobs: 9 | alert: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: danhellem/github-actions-issue-to-work-item@master 13 | env: 14 | ado_token: "${{ secrets.ADO_PERSONAL_ACCESS_TOKEN }}" 15 | ado_organization: "${{ secrets.ADO_ORGANIZATION }}" 16 | ado_project: "${{ secrets.ADO_PROJECT }}" 17 | ado_area_path: "${{ secrets.ADO_AREA_PATH }}" 18 | ado_wit: "Bug" 19 | ado_new_state: "New" 20 | ado_close_state: "Done" 21 | ado_bypassrules: false 22 | log_level: 300 23 | -------------------------------------------------------------------------------- /.github/workflows/issueLabeler.yml: -------------------------------------------------------------------------------- 1 | name: "Set Issue Label" 2 | on: 3 | issues: 4 | types: [opened] 5 | 6 | jobs: 7 | test: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: Naturalclar/issue-action@v1.0.0 11 | with: 12 | keywords: '[""]' 13 | labels: '["IoTSDK"]' 14 | github-token: "${{ secrets.GITHUB_TOKEN }}" 15 | -------------------------------------------------------------------------------- /35MSSharedLib1024.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/35MSSharedLib1024.snk -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. -------------------------------------------------------------------------------- /build.cmd: -------------------------------------------------------------------------------- 1 | @REM Copyright (c) Microsoft. All rights reserved. 2 | @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | @echo off 5 | 6 | if "%1" EQU "-?" goto get-help 7 | if "%1" EQU "-h" goto get-help 8 | if "%1" EQU "-help" goto get-help 9 | if "%1" EQU "--help" goto get-help 10 | 11 | powershell -noprofile -command ".\build.ps1 %*; exit $LASTEXITCODE" 12 | exit /b %ERRORLEVEL% 13 | 14 | :get-help 15 | powershell -noprofile -command "Get-Help .\build.ps1" 16 | -------------------------------------------------------------------------------- /common/src/DefaultWebProxySettings.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using System.Net; 6 | 7 | namespace Microsoft.Azure.Devices.Shared 8 | { 9 | /// 10 | /// WebProxy class for initializing default web proxy 11 | /// 12 | internal sealed class DefaultWebProxySettings : IWebProxy 13 | { 14 | private static readonly DefaultWebProxySettings s_defaultWebproxy = new DefaultWebProxySettings(); 15 | public static DefaultWebProxySettings Instance { get; } = s_defaultWebproxy; 16 | public ICredentials Credentials { get => throw new NotSupportedException(); set => throw new NotSupportedException(); } 17 | public Uri GetProxy(Uri destination) => throw new NotSupportedException(); 18 | public bool IsBypassed(Uri host) => throw new NotSupportedException(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /common/src/StreamDisposalResponsibility.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace Microsoft.Azure.Devices.Shared 5 | { 6 | // Enum that indicates if the Stream used to initialize an IoT hub message 7 | // should be disposed by the application or by the SDK. 8 | internal enum StreamDisposalResponsibility 9 | { 10 | App, 11 | Sdk, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /common/src/StreamExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System.IO; 5 | using System.Threading; 6 | using System.Threading.Tasks; 7 | 8 | namespace Microsoft.Azure.Devices.Shared 9 | { 10 | /// 11 | /// Extensions added to simplify the usage of APIs based on the .NET implementation used. 12 | /// 13 | internal static class StreamExtensions 14 | { 15 | internal static async Task WriteToStreamAsync(this Stream stream, byte[] requestBytes, CancellationToken cancellationToken) 16 | { 17 | #if NET451 || NET472 || NETSTANDARD2_0 18 | await stream.WriteAsync(requestBytes, 0, requestBytes.Length, cancellationToken).ConfigureAwait(false); 19 | #else 20 | await stream.WriteAsync(requestBytes, cancellationToken).ConfigureAwait(false); 21 | #endif 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /common/src/device/provisioning/transport/ClientApiVersionHelper.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace Microsoft.Azure.Devices.Provisioning.Client 5 | { 6 | internal class ClientApiVersionHelper 7 | { 8 | // TODO: Split ApiVersionName as it is only used by HTTP and AMQP. 9 | public const string ApiVersionName = "api-version"; 10 | public const string ApiVersion = "2019-03-31"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /common/src/device/provisioning/transport/RetryJitter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | 6 | namespace Microsoft.Azure.Devices.Provisioning.Client.Transport 7 | { 8 | /// 9 | /// return the provided delay + extra jitter ranging from 0 seconds to 5 seconds 10 | /// 11 | internal class RetryJitter 12 | { 13 | public static TimeSpan GenerateDelayWithJitterForRetry(TimeSpan defaultDelay) 14 | { 15 | const int jitterMax = 5; 16 | const int jitterMin = 0; 17 | 18 | var random = new Random(); 19 | double jitterSeconds = random.NextDouble() * jitterMax + jitterMin; 20 | TimeSpan defaultDelayWithJitter = defaultDelay.Add(TimeSpan.FromSeconds(jitterSeconds)); 21 | 22 | return defaultDelayWithJitter; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /common/src/device/provisioning/transport/SymmetricKeyRegistrationResult.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System.Diagnostics.CodeAnalysis; 5 | 6 | namespace Microsoft.Azure.Devices.Provisioning.Client.Transport.Models 7 | { 8 | /// 9 | /// Symmetric Key registration result. 10 | /// 11 | [SuppressMessage("Microsoft.Performance", "CA1812", Justification = "Used by the JSon parser.")] 12 | internal partial class SymmetricKeyRegistrationResult 13 | { 14 | /// 15 | /// Initializes a new instance of the TpmRegistrationResult class. 16 | /// 17 | public SymmetricKeyRegistrationResult() 18 | { 19 | CustomInit(); 20 | } 21 | 22 | /// 23 | /// An initialization method that performs custom operations like setting defaults 24 | /// 25 | partial void CustomInit(); 26 | } 27 | } -------------------------------------------------------------------------------- /common/src/service/CommonResources.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace Microsoft.Azure.Devices.Common 5 | { 6 | internal sealed class CommonResources : Resources 7 | { 8 | internal static string GetString(string value, params object[] args) 9 | { 10 | if (args != null && args.Length > 0) 11 | { 12 | for (int i = 0; i < args.Length; i++) 13 | { 14 | if (args[i] is string text 15 | && text != null 16 | && text.Length > 1024) 17 | { 18 | args[i] = text.Substring(0, 1021) + "..."; 19 | } 20 | } 21 | 22 | return string.Format(Culture, value, args); 23 | } 24 | 25 | return value; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /common/src/service/ExceptionDispatcher.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | 6 | namespace Microsoft.Azure.Devices.Common 7 | { 8 | internal sealed class ExceptionDispatcher 9 | { 10 | public static void Throw(Exception exception) 11 | { 12 | exception.PrepareForRethrow(); 13 | throw exception; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /common/src/service/IAuthorizationHeaderProvider.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace Microsoft.Azure.Devices 5 | { 6 | /// 7 | /// Gets the authorization header for authenticated requests, regardless of choice of authentication. 8 | /// 9 | internal interface IAuthorizationHeaderProvider 10 | { 11 | string GetAuthorizationHeader(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /common/src/service/PutOperationType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace Microsoft.Azure.Devices 5 | { 6 | enum PutOperationType 7 | { 8 | /// 9 | /// The PUT operation will create a new entity 10 | /// 11 | CreateEntity, 12 | 13 | /// 14 | /// The PUT operation will update (replace) an existing entity as per ETag rules 15 | /// 16 | UpdateEntity, 17 | 18 | /// 19 | /// The PUT operation will update (replace) an existing entity ignoring ETag rules 20 | /// 21 | ForceUpdateEntity 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /common/src/service/QuerySpecification.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace Microsoft.Azure.Devices 5 | { 6 | using Newtonsoft.Json; 7 | 8 | /// 9 | /// A Json query request 10 | /// 11 | internal class QuerySpecification 12 | { 13 | [JsonProperty(PropertyName = "query", Required = Required.Always)] 14 | public string Sql { get; set; } 15 | 16 | [JsonIgnore] 17 | public int? PageSize { get; set; } 18 | 19 | [JsonIgnore] 20 | public string ContinuationToken { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /doc/components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/components.png -------------------------------------------------------------------------------- /doc/media/PlatformToolset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/media/PlatformToolset.png -------------------------------------------------------------------------------- /doc/media/create-iot-hub1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/media/create-iot-hub1.png -------------------------------------------------------------------------------- /doc/media/create-iot-hub2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/media/create-iot-hub2.png -------------------------------------------------------------------------------- /doc/media/create-iot-hub3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/media/create-iot-hub3.png -------------------------------------------------------------------------------- /doc/media/create-iot-hub4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/media/create-iot-hub4.png -------------------------------------------------------------------------------- /doc/media/create-iot-hub5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/media/create-iot-hub5.png -------------------------------------------------------------------------------- /doc/media/device_explorer/connstr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/media/device_explorer/connstr.png -------------------------------------------------------------------------------- /doc/media/device_explorer/iotgetstart1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/media/device_explorer/iotgetstart1.png -------------------------------------------------------------------------------- /doc/media/device_explorer/iotgetstart2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/media/device_explorer/iotgetstart2.png -------------------------------------------------------------------------------- /doc/media/device_explorer/iotgetstart3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/media/device_explorer/iotgetstart3.png -------------------------------------------------------------------------------- /doc/media/device_explorer/iotgetstart4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/media/device_explorer/iotgetstart4.png -------------------------------------------------------------------------------- /doc/readme.md: -------------------------------------------------------------------------------- 1 | This folder contains documents explaining the Azure IoT SDK Developer guides and prerequisite setup. 2 | -------------------------------------------------------------------------------- /doc/workloads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/doc/workloads.png -------------------------------------------------------------------------------- /e2e/stress/IoTClientPerf/IoTClientPerf.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.1 6 | Microsoft.Azure.Devices.E2ETests 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /e2e/stress/IoTClientPerf/PerfScenarioConfig.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace Microsoft.Azure.Devices.E2ETests 5 | { 6 | public struct PerfScenarioConfig 7 | { 8 | public int Id; 9 | public ResultWriter Writer; 10 | public int SizeBytes; 11 | public string AuthType; 12 | public Client.TransportType Transport; 13 | public int PoolSize; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /e2e/stress/IoTClientPerf/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "IoTClientPerf": { 4 | "commandName": "Project", 5 | "commandLineArgs": "-o s:\\tmp\\device.csv -t 60 -n 10 -f device_d2c" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /e2e/stress/IoTClientPerf/Reporting/ResultWriter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System.Threading.Tasks; 5 | 6 | namespace Microsoft.Azure.Devices.E2ETests 7 | { 8 | public abstract class ResultWriter 9 | { 10 | protected string _header; 11 | 12 | public ResultWriter(string header = null) 13 | { 14 | _header = header; 15 | } 16 | 17 | public Task WriteAsync(TelemetryMetrics m) 18 | { 19 | return WriteLineAsync(m.ToString()); 20 | } 21 | 22 | public abstract Task FlushAsync(); 23 | 24 | protected abstract Task WriteLineAsync(string s); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /e2e/stress/IoTClientPerf/Reporting/ResultWriterConsole.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Azure.Devices.E2ETests 8 | { 9 | public class ResultWriterConsole : ResultWriter 10 | { 11 | protected override Task WriteLineAsync(string s) 12 | { 13 | Console.WriteLine(s); 14 | return Task.CompletedTask; 15 | } 16 | 17 | public override Task FlushAsync() 18 | { 19 | return Task.CompletedTask; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /e2e/stress/IoTClientPerf/Scenarios/DeviceC2DTest.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Azure.Devices.E2ETests 8 | { 9 | public class DeviceC2DTest : DeviceClientScenario 10 | { 11 | public DeviceC2DTest(PerfScenarioConfig config) : base(config) 12 | { 13 | } 14 | 15 | public override async Task SetupAsync(CancellationToken ct) 16 | { 17 | await CreateDeviceAsync().ConfigureAwait(false); 18 | await OpenDeviceAsync(ct).ConfigureAwait(false); 19 | } 20 | 21 | public override Task RunTestAsync(CancellationToken ct) 22 | { 23 | return ReceiveMessageAsync(ct); 24 | } 25 | 26 | public override Task TeardownAsync(CancellationToken ct) 27 | { 28 | return CloseAsync(ct); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /e2e/stress/IoTClientPerf/Scenarios/DeviceD2CTest.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Azure.Devices.E2ETests 8 | { 9 | public class DeviceD2CTest : DeviceClientScenario 10 | { 11 | public DeviceD2CTest(PerfScenarioConfig config) : base(config) 12 | { 13 | } 14 | 15 | public override async Task SetupAsync(CancellationToken ct) 16 | { 17 | await CreateDeviceAsync().ConfigureAwait(false); 18 | await OpenDeviceAsync(ct).ConfigureAwait(false); 19 | } 20 | 21 | public override Task RunTestAsync(CancellationToken ct) 22 | { 23 | return SendMessageAsync(ct); 24 | } 25 | 26 | public override Task TeardownAsync(CancellationToken ct) 27 | { 28 | return CloseAsync(ct); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /e2e/stress/IoTClientPerf/Scenarios/ServiceC2DTest.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Azure.Devices.E2ETests 8 | { 9 | public class ServiceC2DTest : ServiceClientScenario 10 | { 11 | public ServiceC2DTest(PerfScenarioConfig config) : base(config) 12 | { 13 | CreateServiceClient(); 14 | } 15 | 16 | public override async Task SetupAsync(CancellationToken ct) 17 | { 18 | await OpenServiceClientAsync(ct).ConfigureAwait(false); 19 | } 20 | 21 | public override Task RunTestAsync(CancellationToken ct) 22 | { 23 | return SendMessageAsync(ct); 24 | } 25 | 26 | public override Task TeardownAsync(CancellationToken ct) 27 | { 28 | return CloseAsync(ct); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /e2e/stress/IoTClientPerf/Scenarios/ServiceMethodTest.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Azure.Devices.E2ETests 8 | { 9 | public class ServiceMethodTest : ServiceClientScenario 10 | { 11 | public ServiceMethodTest(PerfScenarioConfig config) : base(config) 12 | { 13 | CreateServiceClient(); 14 | } 15 | 16 | public override async Task SetupAsync(CancellationToken ct) 17 | { 18 | await OpenServiceClientAsync(ct).ConfigureAwait(false); 19 | } 20 | 21 | public override Task RunTestAsync(CancellationToken ct) 22 | { 23 | return CallMethodAsync(ct); 24 | } 25 | 26 | public override Task TeardownAsync(CancellationToken ct) 27 | { 28 | return CloseAsync(ct); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /e2e/stress/MemoryLeakTest/MemoryLeakTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.1;net47 6 | netcoreapp2.1 7 | $(MSBuildProjectDirectory)\..\..\.. 8 | 9 | 10 | 11 | $(RootDir)\common\test 12 | 13 | 14 | 15 | 16 | Common\CodeAnalysisOverrides.cs 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /e2e/test/CodeAnalysisOverrides.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System.Diagnostics.CodeAnalysis; 5 | 6 | // Required by Configuration.* 7 | [assembly: SuppressMessage("Microsoft.Design", "CA1724:TypeNamesShouldNotMatchNamespaces")] 8 | [assembly: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")] 9 | 10 | // Test naming must be of form __ 11 | [assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")] 12 | -------------------------------------------------------------------------------- /e2e/test/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | // This file is used by Code Analysis to maintain SuppressMessage 2 | // attributes that are applied to this project. 3 | // Project-level suppressions either have no target or are given 4 | // a specific target and scoped to a namespace, type, member, etc. 5 | 6 | using System.Diagnostics.CodeAnalysis; 7 | 8 | [assembly: SuppressMessage( 9 | "Style", 10 | "IDE1006:Naming Styles", 11 | Justification = "Missing Async suffix on test method names. Test method names may be misleading when they have the Async suffix. Additionally, not changing test names help to maintain ADO history.", 12 | Scope = "module")] 13 | [assembly: SuppressMessage( 14 | "CodeQuality", 15 | "IDE0079:Remove unnecessary suppression", 16 | Justification = "Each frameworks consider certain suppressions required by other frameworks unnecessary.", 17 | Scope = "module")] 18 | -------------------------------------------------------------------------------- /e2e/test/docker/haproxy/errors/400.http: -------------------------------------------------------------------------------- 1 | HTTP/1.0 400 Bad request 2 | Cache-Control: no-cache 3 | Connection: close 4 | Content-Type: text/html 5 | 6 |

400 Bad request

7 | Your browser sent an invalid request. 8 | 9 | -------------------------------------------------------------------------------- /e2e/test/docker/haproxy/errors/403.http: -------------------------------------------------------------------------------- 1 | HTTP/1.0 403 Forbidden 2 | Cache-Control: no-cache 3 | Connection: close 4 | Content-Type: text/html 5 | 6 |

403 Forbidden

7 | Request forbidden by administrative rules. 8 | 9 | -------------------------------------------------------------------------------- /e2e/test/docker/haproxy/errors/408.http: -------------------------------------------------------------------------------- 1 | HTTP/1.0 408 Request Time-out 2 | Cache-Control: no-cache 3 | Connection: close 4 | Content-Type: text/html 5 | 6 |

408 Request Time-out

7 | Your browser didn't send a complete request in time. 8 | 9 | -------------------------------------------------------------------------------- /e2e/test/docker/haproxy/errors/500.http: -------------------------------------------------------------------------------- 1 | HTTP/1.0 500 Internal Server Error 2 | Cache-Control: no-cache 3 | Connection: close 4 | Content-Type: text/html 5 | 6 |

500 Internal Server Error

7 | An internal server error occurred. 8 | 9 | -------------------------------------------------------------------------------- /e2e/test/docker/haproxy/errors/502.http: -------------------------------------------------------------------------------- 1 | HTTP/1.0 502 Bad Gateway 2 | Cache-Control: no-cache 3 | Connection: close 4 | Content-Type: text/html 5 | 6 |

502 Bad Gateway

7 | The server returned an invalid or incomplete response. 8 | 9 | -------------------------------------------------------------------------------- /e2e/test/docker/haproxy/errors/503.http: -------------------------------------------------------------------------------- 1 | HTTP/1.0 503 Service Unavailable 2 | Cache-Control: no-cache 3 | Connection: close 4 | Content-Type: text/html 5 | 6 |

503 Service Unavailable

7 | No server is available to handle this request. 8 | 9 | -------------------------------------------------------------------------------- /e2e/test/docker/haproxy/errors/504.http: -------------------------------------------------------------------------------- 1 | HTTP/1.0 504 Gateway Time-out 2 | Cache-Control: no-cache 3 | Connection: close 4 | Content-Type: text/html 5 | 6 |

504 Gateway Time-out

7 | The server didn't respond in time. 8 | 9 | -------------------------------------------------------------------------------- /e2e/test/docker/haproxy/haproxy.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/e2e/test/docker/haproxy/haproxy.bin -------------------------------------------------------------------------------- /e2e/test/helpers/CustomWebProxy.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using System.Net; 6 | using System.Threading; 7 | 8 | namespace Microsoft.Azure.Devices.E2ETests.Helpers 9 | { 10 | public class CustomWebProxy : IWebProxy 11 | { 12 | private long _counter; 13 | 14 | public ICredentials Credentials { get; set; } 15 | 16 | public long Counter => Interlocked.Read(ref _counter); 17 | 18 | public Uri GetProxy(Uri destination) 19 | { 20 | return null; 21 | } 22 | 23 | public bool IsBypassed(Uri host) 24 | { 25 | Interlocked.Increment(ref _counter); 26 | VerboseTestLogger.WriteLine($"{nameof(CustomWebProxy)}.{nameof(IsBypassed)} Uri = {host}"); 27 | return false; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /e2e/test/helpers/HostNameHelper.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | using System.Text.RegularExpressions; 4 | 5 | namespace Microsoft.Azure.Devices.E2ETests.Helpers 6 | { 7 | internal static class HostNameHelper 8 | { 9 | // Look for "HostName=", and then grab all the characters until just before the next semi-colon. 10 | private static readonly Regex s_hostNameRegex = new Regex("(?<=HostName=).*?(?=;)", RegexOptions.Compiled); 11 | 12 | /// 13 | /// Extracts the IoT hub host name from the specified connection string 14 | /// 15 | public static string GetHostName(string iotHubConnectionString) 16 | { 17 | return s_hostNameRegex.Match(iotHubConnectionString).Value; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /e2e/test/helpers/logging/VerboseTestLogger.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using System.Diagnostics; 6 | 7 | namespace Microsoft.Azure.Devices.E2ETests 8 | { 9 | public static class VerboseTestLogger 10 | { 11 | public static void WriteLine(string message) 12 | { 13 | EventSourceTestLogger.Log.TestVerboseMessage(message); 14 | Debug.WriteLine(message); 15 | Console.WriteLine(message); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /e2e/test/iothub/FaultInjectionPoolAmqpTests.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using Microsoft.VisualStudio.TestTools.UnitTesting; 5 | 6 | namespace Microsoft.Azure.Devices.E2ETests 7 | { 8 | [TestClass] 9 | [TestCategory("E2E")] 10 | [TestCategory("IoTHub")] 11 | [TestCategory("FaultInjection")] 12 | [TestCategory("PoolAmqp")] 13 | [TestCategory("LongRunning")] 14 | public partial class FaultInjectionPoolAmqpTests : E2EMsTestBase 15 | { 16 | private static readonly string s_proxyServerAddress = TestConfiguration.IotHub.ProxyServerAddress; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /e2e/test/prerequisites/E2ETestsSetup/generateArmTemplate.ps1: -------------------------------------------------------------------------------- 1 | $bicepFile = "./test-resources.bicep" 2 | bicep build $bicepFile -------------------------------------------------------------------------------- /iothub/device/devdoc/amqppoolconnectionselection.puml: -------------------------------------------------------------------------------- 1 | @startuml csharpDeviceClientAmqpConnectionSelection 2 | AmqpTransportHandler->AmqpIoTSessionFactory: Request //AmqpIoTSession// 3 | AmqpIoTSessionFactory->AmqpIoTSessionFactory: Find or Create the correct //AmqpIoTConnectionPool// 4 | AmqpIoTSessionFactory->AmqpIoTConnectionPool: Get //AmqpIoTConnection// 5 | AmqpIoTConnectionPool->AmqpIoTConnectionPool: Find or Create the correct //AmqpIoTConnection// 6 | AmqpIoTConnectionPool->AmqpIoTSessionFactory: //AmqpIoTConnection// 7 | AmqpIoTSessionFactory->AmqpIoTConnection: Create a new //AmqpIoTSession// 8 | AmqpIoTConnection->AmqpIoTConnection: session_count++ 9 | AmqpIoTSessionFactory<-AmqpIoTConnection: Return the //AmqpIoTSession// 10 | AmqpIoTSessionFactory->AmqpTransportHandler: Return //AmqpIoTSession// 11 | AmqpTransportHandler->AmqpTransportHandler: perform operations 12 | AmqpTransportHandler->AmqpTransportHandler: session closed/disconnected 13 | AmqpIoTConnection->AmqpIoTConnection: session_count-- 14 | @enduml 15 | -------------------------------------------------------------------------------- /iothub/device/devdoc/retry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/iothub/device/devdoc/retry.png -------------------------------------------------------------------------------- /iothub/device/samples/getting started/FileUploadSample/Parameters.cs: -------------------------------------------------------------------------------- 1 | using CommandLine; 2 | 3 | namespace Microsoft.Azure.Devices.Client.Samples 4 | { 5 | /// 6 | /// Parameters for the application. 7 | /// 8 | internal class Parameters 9 | { 10 | [Option( 11 | 'c', 12 | "PrimaryConnectionString", 13 | Required = true, 14 | HelpText = "The primary connection string for the device to simulate.")] 15 | public string PrimaryConnectionString { get; set; } 16 | 17 | [Option( 18 | 't', 19 | "TransportType", 20 | Default = TransportType.Mqtt, 21 | Required = false, 22 | HelpText = "The transport to use to communicate with the IoT Hub. Possible values include Mqtt, Mqtt_WebSocket_Only, Mqtt_Tcp_Only, Amqp, Amqp_WebSocket_Only, Amqp_Tcp_only, and Http1.")] 23 | public TransportType TransportType { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /iothub/device/samples/getting started/FileUploadSample/TestPayload.txt: -------------------------------------------------------------------------------- 1 | Test Payload -------------------------------------------------------------------------------- /iothub/device/samples/getting started/MessageReceiveSample/MessageReceiveSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | 9.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /iothub/device/samples/getting started/MethodSample/MethodSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | 9.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /iothub/device/samples/getting started/SimulatedDevice/SimulatedDevice.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | 9.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /iothub/device/samples/getting started/SimulatedDeviceWithCommand/SimulatedDeviceWithCommand.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | 9.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /iothub/device/samples/getting started/TwinSample/TwinSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | 9.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /iothub/device/samples/getting started/TwinSample/readme.md: -------------------------------------------------------------------------------- 1 | # Device Twins Sample 2 | 3 | [![Documentation](../../../../docs/media/docs-link-buttons/azure-documentation.svg)](https://docs.microsoft.com/azure/iot-develop/) 4 | 5 | 6 | This sample code demonstrates device twins support with IoT hub. 7 | 8 | For more info about device twins: 9 | - [Device Twin getting started](https://docs.microsoft.com/azure/iot-hub/iot-hub-csharp-csharp-twin-getstarted) 10 | - [Device Twins Developer Guide](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-device-twins) 11 | 12 | > Note for Plug and Play (PnP) device twins support with IoT hub and IoT Central, there are specific conventions of the JSON document to follow: 13 | > - [PnP device developer guide](https://docs.microsoft.com/azure/iot-develop/concepts-developer-guide-device?pivots=programming-language-csharp) 14 | > - [PnP device samples](https://github.com/Azure-Samples/azure-iot-samples-csharp/tree/main/iot-hub/Samples/device/PnpDeviceSamples) 15 | -------------------------------------------------------------------------------- /iothub/device/samples/how to guides/HubRoutingSample/HubRoutingSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | 9.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /iothub/device/samples/how to guides/X509DeviceCertWithChainSample/X509DeviceCertWithChainSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | 9.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /iothub/device/samples/how to guides/XamarinSample/XamarinSample/XamarinSample.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /iothub/device/samples/how to guides/XamarinSample/XamarinSample/XamarinSample.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /iothub/device/samples/how to guides/XamarinSample/XamarinSample/XamarinSample.Android/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/iothub/device/samples/how to guides/XamarinSample/XamarinSample/XamarinSample.Android/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /iothub/device/samples/how to guides/XamarinSample/XamarinSample/XamarinSample.Android/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/iothub/device/samples/how to guides/XamarinSample/XamarinSample/XamarinSample.Android/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /iothub/device/samples/how to guides/XamarinSample/XamarinSample/XamarinSample.Android/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/iothub/device/samples/how to guides/XamarinSample/XamarinSample/XamarinSample.Android/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /iothub/device/samples/how to guides/XamarinSample/XamarinSample/XamarinSample.Android/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-iot-sdk-csharp/86065001a92fedb42877722c6a57ae37e45eed30/iothub/device/samples/how to guides/XamarinSample/XamarinSample/XamarinSample.Android/Resources/drawable/icon.png -------------------------------------------------------------------------------- /iothub/device/samples/how to guides/XamarinSample/XamarinSample/XamarinSample.Android/Resources/layout/Main.axml: -------------------------------------------------------------------------------- 1 |  2 | 3 |