From 10f6ad0c6416ee7b84427b30a3068fec2005e6aa Mon Sep 17 00:00:00 2001 From: YalinLi0312 Date: Wed, 24 Mar 2021 16:18:02 -0700 Subject: [PATCH 1/2] Change the accessbility to virtual for Resource.Id --- .../Azure.ResourceManager.Core/src/Resources/Resource.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/Resources/Resource.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/Resources/Resource.cs index 86a35ac05cf77..a8638d1c689be 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/Resources/Resource.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/Resources/Resource.cs @@ -14,7 +14,7 @@ public abstract class Resource : IEquatable, IEquatable, IComp /// /// Gets or sets the resource identifier. /// - public abstract ResourceIdentifier Id { get; protected set; } + public virtual ResourceIdentifier Id { get; protected set; } /// /// Gets the name. From e27379811554ab4a95d000bf45690cd77de8bf55 Mon Sep 17 00:00:00 2001 From: YalinLi0312 Date: Thu, 6 May 2021 14:16:19 -0700 Subject: [PATCH 2/2] Fix a bug in ArmClient --- sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClient.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClient.cs index d695e8c05035f..bd43c37100e6c 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClient.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClient.cs @@ -90,7 +90,7 @@ private ArmClient( throw new ArgumentNullException(nameof(credential)); Credential = credential; - BaseUri = baseUri; + BaseUri = baseUri ?? new Uri(DefaultUri); ClientOptions = options?.Clone() ?? new ArmClientOptions(); Pipeline = ManagementPipelineBuilder.Build(Credential, BaseUri, ClientOptions);