Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added customization in RecoveryServices client and updated Microsoft.Rest.ClientRuntime to 2.3.10 #3657

Merged
merged 3 commits into from
Sep 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -39,9 +39,14 @@ public RecoveryServicesClient(System.Uri baseUri, ServiceClientCredentials crede
DisableDispose = disableDispose;
}

public void SetHttpClient(HttpClient client)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI
@sonathan the new version 2.3.9 has an overload that will allow you to control disposing of the provided client

{
HttpClient = client;
}

protected override void Dispose(bool disposing)
{
if (DisableDispose)
if (!DisableDispose)
{
base.Dispose(disposing);
}
Expand Down