Skip to content

Commit 8ececba

Browse files
authored
enable SetTag method. (Azure#50987)
* enable SetTag method.
1 parent dbd24ac commit 8ececba

File tree

6 files changed

+96
-7
lines changed

6 files changed

+96
-7
lines changed

eng/packages/http-client-csharp-mgmt/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ extends:
5050
SparseCheckoutPaths:
5151
- /sdk/core/Azure.Core/src/Shared
5252
- /sdk/core/Azure.Core.TestFramework/src
53+
- /sdk/resourcemanager/Azure.ResourceManager/src/Shared
5354
BuildPrereleaseVersion: true
5455
UseTypeSpecNext: ${{ parameters.UseTypeSpecNext }}
5556
${{ if eq(variables['System.TeamProject'], 'internal') }}:

eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/NewManagementProjectScaffolding.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ protected override IReadOnlyList<CSharpProjectCompileInclude> BuildCompileInclud
2424
compileIncludes.Add(new CSharpProjectCompileInclude(GetCompileInclude(coreShareFile), SharedCoreLinkBase));
2525
}
2626

27-
// foreach (var armShareFile in armSharedFiles)
28-
// {
29-
// compileIncludes.Add(new CSharpProjectCompileInclude(GetCompileInclude(armShareFile, RelativeArmSegment), SharedArmLinkBase));
30-
// }
27+
foreach (var armShareFile in armSharedFiles)
28+
{
29+
compileIncludes.Add(new CSharpProjectCompileInclude(GetCompileInclude(armShareFile, RelativeArmSegment), SharedArmLinkBase));
30+
}
3131

3232
return compileIncludes;
3333
}

eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,8 @@ protected override MethodProvider[] BuildMethods()
292292
methods.AddRange([
293293
new AddTagMethodProvider(this, true),
294294
new AddTagMethodProvider(this, false),
295-
// Disabled SetTag methods generation temporarily: The extension method ReplaceWith for IDictionary<string, string> is defined in SharedExtensions.cs, which is not included in the project yet.
296-
// new SetTagsMethodProvider(this, true),
297-
// new SetTagsMethodProvider(this, false),
295+
new SetTagsMethodProvider(this, true),
296+
new SetTagsMethodProvider(this, false),
298297
new RemoveTagMethodProvider(this, true),
299298
new RemoveTagMethodProvider(this, false)
300299
]);

eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local.Tests/TestProjects.Local.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
<Compile Include="$(MSBuildThisFileDirectory)../../../../../../sdk/core/Azure.Core/src/Shared/TypeFormatters.cs" LinkBase="Shared/Core" />
4848
<Compile Include="$(MSBuildThisFileDirectory)../../../../../../sdk/core/Azure.Core/src/Shared/RequestHeaderExtensions.cs" LinkBase="Shared/Core" />
4949
<Compile Include="$(MSBuildThisFileDirectory)../../../../../../sdk/core/Azure.Core/src/Shared/NoValueResponseOfT.cs" LinkBase="Shared/Core" />
50+
<Compile Include="$(MSBuildThisFileDirectory)../../../../../../sdk/resourcemanager/Azure.ResourceManager/src/Shared/SharedExtensions.cs" LinkBase="Shared/Arm" />
5051
</ItemGroup>
5152

5253
</Project>

eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooResource.cs

Lines changed: 87 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/MgmtTypeSpec.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<Compile Include="$(MSBuildThisFileDirectory)../../../../../../../../sdk/core/Azure.Core/src/Shared/VoidValue.cs" LinkBase="Shared/Core" />
3535
<Compile Include="$(MSBuildThisFileDirectory)../../../../../../../../sdk/core/Azure.Core/src/Shared/ForwardsClientCallsAttribute.cs" LinkBase="Shared/Core" />
3636
<Compile Include="$(MSBuildThisFileDirectory)../../../../../../../../sdk/core/Azure.Core/src/Shared/NoValueResponseOfT.cs" LinkBase="Shared/Core" />
37+
<Compile Include="$(MSBuildThisFileDirectory)../../../../../../../../sdk/resourcemanager/Azure.ResourceManager/src/Shared/SharedExtensions.cs" LinkBase="Shared/Arm" />
3738
</ItemGroup>
3839

3940
<ItemGroup>

0 commit comments

Comments
 (0)