Skip to content

Commit

Permalink
Added customization on RecoveryServices backup client (Azure#3655)
Browse files Browse the repository at this point in the history
- Added explicit setter to set custom HttpClient
- Added property DisableDispose to avoid disposal of HttpClient
- Bumped version to 2.1.1-preview
  • Loading branch information
DheerendraRathor authored and JasonYang-MSFT committed Nov 17, 2017
1 parent 340c338 commit a17f1cd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System.Net.Http;

namespace Microsoft.Azure.Management.RecoveryServices.Backup
{
public partial class RecoveryServicesBackupClient
{
partial void CustomInitialize()
public bool DisableDispose { get; set; } = false;

public void SetHttpClient(HttpClient client)
{
HttpClient = client;
}

public new void Dispose()
{
if (!DisableDispose)
{
base.Dispose();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<PackageId>Microsoft.Azure.Management.RecoveryServices.Backup</PackageId>
<Description>Provides developers with libraries for the updated recovery services backup feature under Azure Resource manager.</Description>
<VersionPrefix>2.1.0-preview</VersionPrefix>
<VersionPrefix>2.1.1-preview</VersionPrefix>
<AssemblyName>Microsoft.Azure.Management.RecoveryServices.Backup</AssemblyName>
<PackageTags>Microsoft Azure resource management</PackageTags>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Recovery Services Backup Resources.")]

[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.1.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Microsoft Azure .NET SDK")]
Expand Down

0 comments on commit a17f1cd

Please sign in to comment.