From 6780d799ac980fc859c5c578eb61fdd705536830 Mon Sep 17 00:00:00 2001 From: sonathan Date: Tue, 5 Sep 2017 16:19:23 +0530 Subject: [PATCH 1/3] Added customization on RecoveryServices client and updated Microsoft.Rest.ClientRuntime to 2.3.10 --- .../Customizations/RecoveryServicesClient.cs | 9 +++++++-- .../Microsoft.Azure.Management.RecoveryServices.csproj | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/SDKs/RecoveryServices/Management.RecoveryServices/Customizations/RecoveryServicesClient.cs b/src/SDKs/RecoveryServices/Management.RecoveryServices/Customizations/RecoveryServicesClient.cs index db2a6433f0ab6..0a4a845e14db0 100644 --- a/src/SDKs/RecoveryServices/Management.RecoveryServices/Customizations/RecoveryServicesClient.cs +++ b/src/SDKs/RecoveryServices/Management.RecoveryServices/Customizations/RecoveryServicesClient.cs @@ -11,7 +11,7 @@ namespace Microsoft.Azure.Management.RecoveryServices { public partial class RecoveryServicesClient { - bool DisableDispose { get; set; } + public bool DisableDispose { get; set; } = false; protected RecoveryServicesClient(HttpClient httpClient, params DelegatingHandler[] handlers) { @@ -39,9 +39,14 @@ public RecoveryServicesClient(System.Uri baseUri, ServiceClientCredentials crede DisableDispose = disableDispose; } + public void SetHttpClient(HttpClient client) + { + HttpClient = client; + } + protected override void Dispose(bool disposing) { - if (DisableDispose) + if (!DisableDispose) { base.Dispose(disposing); } diff --git a/src/SDKs/RecoveryServices/Management.RecoveryServices/Microsoft.Azure.Management.RecoveryServices.csproj b/src/SDKs/RecoveryServices/Management.RecoveryServices/Microsoft.Azure.Management.RecoveryServices.csproj index 8d670f2047c6d..c6ef2a0f8361e 100644 --- a/src/SDKs/RecoveryServices/Management.RecoveryServices/Microsoft.Azure.Management.RecoveryServices.csproj +++ b/src/SDKs/RecoveryServices/Management.RecoveryServices/Microsoft.Azure.Management.RecoveryServices.csproj @@ -11,6 +11,9 @@ net452;netstandard1.4 + + +