Skip to content

Commit 526eba8

Browse files
Add new constructor for ArmResource (Azure#23864)
1 parent 023a892 commit 526eba8

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ protected ArmContainer(Azure.ResourceManager.Core.ArmResource parent) { }
179179
public abstract partial class ArmResource
180180
{
181181
protected ArmResource() { }
182+
protected ArmResource(Azure.ResourceManager.ArmClientOptions clientOptions, Azure.Core.TokenCredential credential, System.Uri uri, Azure.Core.Pipeline.HttpPipeline pipeline, Azure.ResourceManager.ResourceIdentifier id) { }
182183
protected ArmResource(Azure.ResourceManager.Core.ArmResource parentOperations, Azure.ResourceManager.ResourceIdentifier id) { }
183184
protected internal virtual System.Uri BaseUri { get { throw null; } }
184185
protected internal virtual Azure.ResourceManager.ArmClientOptions ClientOptions { get { throw null; } }

sdk/resourcemanager/Azure.ResourceManager/src/ArmResource.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ protected ArmResource(ArmResource parentOperations, ResourceIdentifier id)
3939
{
4040
}
4141

42+
/// <summary>
43+
/// Initializes a new instance of the <see cref="ArmResource"/> class.
44+
/// </summary>
45+
/// <param name="clientOptions"></param>
46+
/// <param name="credential"></param>
47+
/// <param name="uri"></param>
48+
/// <param name="pipeline"></param>
49+
/// <param name="id"> The identifier of the resource that is the target of operations. </param>
50+
protected ArmResource(ArmClientOptions clientOptions, TokenCredential credential, Uri uri, HttpPipeline pipeline, ResourceIdentifier id)
51+
: this(new ClientContext(clientOptions, credential, uri, pipeline), id)
52+
{
53+
}
54+
4255
/// <summary>
4356
/// Initializes a new instance of the <see cref="ArmResource"/> class.
4457
/// </summary>

0 commit comments

Comments
 (0)