Skip to content

Commit 38a13d1

Browse files
introduce the modelfactory for resourcemanager (Azure#32749)
* introduce the modelfactory * fix namespace
1 parent 0061693 commit 38a13d1

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,11 @@ protected ResourceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core
449449
public Azure.Core.ResourceType ResourceType { get { throw null; } }
450450
public Azure.ResourceManager.Models.SystemData SystemData { get { throw null; } }
451451
}
452+
public static partial class ResourceManagerModelFactory
453+
{
454+
public static Azure.ResourceManager.Resources.Models.SubResource SubResource(Azure.Core.ResourceIdentifier id = null) { throw null; }
455+
public static Azure.ResourceManager.Resources.Models.WritableSubResource WritableSubResource(Azure.Core.ResourceIdentifier id = null) { throw null; }
456+
}
452457
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
453458
[System.ObsoleteAttribute("This type is obsolete and will be removed in a future release.", false)]
454459
public partial class SystemAssignedServiceIdentity
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using Azure.Core;
5+
using Azure.ResourceManager.Resources.Models;
6+
7+
namespace Azure.ResourceManager.Models
8+
{
9+
/// <summary> Model factory for read-only models. </summary>
10+
public static partial class ResourceManagerModelFactory
11+
{
12+
/// <summary> Initializes a new instance of SubResource. </summary>
13+
/// <param name="id"></param>
14+
/// <returns> A new <see cref="Resources.Models.SubResource"/> instance for mocking. </returns>
15+
public static SubResource SubResource(ResourceIdentifier id = null)
16+
{
17+
return new SubResource(id);
18+
}
19+
20+
/// <summary> Initializes a new instance of WritableSubResource. </summary>
21+
/// <param name="id"></param>
22+
/// <returns> A new <see cref="Resources.Models.WritableSubResource"/> instance for mocking. </returns>
23+
public static WritableSubResource WritableSubResource(ResourceIdentifier id = null)
24+
{
25+
return new WritableSubResource(id);
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)