@azure-typespec/http-client-csharp 1.0.0-alpha.20260211.1 → 1.0.0-alpha.20260212.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generator/Azure.Generator.StubLibrary.deps.json +25 -25
- package/dist/generator/Azure.Generator.StubLibrary.dll +0 -0
- package/dist/generator/Azure.Generator.StubLibrary.pdb +0 -0
- package/dist/generator/Azure.Generator.deps.json +20 -20
- package/dist/generator/Azure.Generator.dll +0 -0
- package/dist/generator/Azure.Generator.pdb +0 -0
- package/dist/generator/Azure.Generator.xml +28 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.dll +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.Input.dll +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.dll +0 -0
- package/dist/generator/Shared/Core/IXmlSerializable.cs +14 -0
- package/dist/generator/Shared/Core/XmlWriterContent.cs +54 -0
- package/dist/generator/net10.0/Azure.Generator.StubLibrary.deps.json +25 -25
- package/dist/generator/net10.0/Azure.Generator.StubLibrary.dll +0 -0
- package/dist/generator/net10.0/Azure.Generator.StubLibrary.pdb +0 -0
- package/dist/generator/net10.0/Azure.Generator.deps.json +20 -20
- package/dist/generator/net10.0/Azure.Generator.dll +0 -0
- package/dist/generator/net10.0/Azure.Generator.pdb +0 -0
- package/dist/generator/net10.0/Azure.Generator.xml +28 -0
- package/dist/generator/net10.0/Microsoft.TypeSpec.Generator.ClientModel.dll +0 -0
- package/dist/generator/net10.0/Microsoft.TypeSpec.Generator.Input.dll +0 -0
- package/dist/generator/net10.0/Microsoft.TypeSpec.Generator.dll +0 -0
- package/dist/generator/net10.0/Shared/Core/IXmlSerializable.cs +14 -0
- package/dist/generator/net10.0/Shared/Core/XmlWriterContent.cs +54 -0
- package/package.json +2 -2
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"compilationOptions": {},
|
|
7
7
|
"targets": {
|
|
8
8
|
".NETCoreApp,Version=v10.0": {
|
|
9
|
-
"Azure.Generator.StubLibrary/1.0.0-alpha.
|
|
9
|
+
"Azure.Generator.StubLibrary/1.0.0-alpha.20260212.2": {
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"Azure.Generator": "1.0.0-alpha.
|
|
12
|
-
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.
|
|
11
|
+
"Azure.Generator": "1.0.0-alpha.20260212.2",
|
|
12
|
+
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.20260212.3",
|
|
13
13
|
"System.ClientModel": "1.9.0"
|
|
14
14
|
},
|
|
15
15
|
"runtime": {
|
|
@@ -404,12 +404,12 @@
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
},
|
|
407
|
-
"Microsoft.TypeSpec.Generator/1.0.0-alpha.
|
|
407
|
+
"Microsoft.TypeSpec.Generator/1.0.0-alpha.20260212.3": {
|
|
408
408
|
"dependencies": {
|
|
409
409
|
"CommandLineParser": "2.9.1",
|
|
410
410
|
"Microsoft.Build": "17.9.5",
|
|
411
411
|
"Microsoft.CodeAnalysis.CSharp.Workspaces": "4.8.0",
|
|
412
|
-
"Microsoft.TypeSpec.Generator.Input": "1.0.0-alpha.
|
|
412
|
+
"Microsoft.TypeSpec.Generator.Input": "1.0.0-alpha.20260212.3",
|
|
413
413
|
"NuGet.Configuration": "6.14.0",
|
|
414
414
|
"NuGet.Protocol": "6.14.0",
|
|
415
415
|
"NuGet.Versioning": "6.14.0",
|
|
@@ -423,9 +423,9 @@
|
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
},
|
|
426
|
-
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.
|
|
426
|
+
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.20260212.3": {
|
|
427
427
|
"dependencies": {
|
|
428
|
-
"Microsoft.TypeSpec.Generator": "1.0.0-alpha.
|
|
428
|
+
"Microsoft.TypeSpec.Generator": "1.0.0-alpha.20260212.3",
|
|
429
429
|
"System.ClientModel": "1.9.0"
|
|
430
430
|
},
|
|
431
431
|
"runtime": {
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
|
-
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.
|
|
438
|
+
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.20260212.3": {
|
|
439
439
|
"dependencies": {
|
|
440
440
|
"Microsoft.CodeAnalysis.CSharp.Workspaces": "4.8.0",
|
|
441
441
|
"System.Memory.Data": "10.0.1"
|
|
@@ -675,24 +675,24 @@
|
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
},
|
|
678
|
-
"Azure.Generator/1.0.0-alpha.
|
|
678
|
+
"Azure.Generator/1.0.0-alpha.20260212.2": {
|
|
679
679
|
"dependencies": {
|
|
680
680
|
"Azure.Core": "1.51.1",
|
|
681
681
|
"Azure.Core.Expressions.DataFactory": "1.0.0",
|
|
682
682
|
"Azure.ResourceManager": "1.13.2",
|
|
683
|
-
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.
|
|
683
|
+
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.20260212.3"
|
|
684
684
|
},
|
|
685
685
|
"runtime": {
|
|
686
686
|
"Azure.Generator.dll": {
|
|
687
687
|
"assemblyVersion": "1.0.0.0",
|
|
688
|
-
"fileVersion": "1.0.26.
|
|
688
|
+
"fileVersion": "1.0.26.11202"
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
},
|
|
694
694
|
"libraries": {
|
|
695
|
-
"Azure.Generator.StubLibrary/1.0.0-alpha.
|
|
695
|
+
"Azure.Generator.StubLibrary/1.0.0-alpha.20260212.2": {
|
|
696
696
|
"type": "project",
|
|
697
697
|
"serviceable": false,
|
|
698
698
|
"sha512": ""
|
|
@@ -844,26 +844,26 @@
|
|
|
844
844
|
"path": "microsoft.net.stringtools/17.9.5",
|
|
845
845
|
"hashPath": "microsoft.net.stringtools.17.9.5.nupkg.sha512"
|
|
846
846
|
},
|
|
847
|
-
"Microsoft.TypeSpec.Generator/1.0.0-alpha.
|
|
847
|
+
"Microsoft.TypeSpec.Generator/1.0.0-alpha.20260212.3": {
|
|
848
848
|
"type": "package",
|
|
849
849
|
"serviceable": true,
|
|
850
|
-
"sha512": "sha512-
|
|
851
|
-
"path": "microsoft.typespec.generator/1.0.0-alpha.
|
|
852
|
-
"hashPath": "microsoft.typespec.generator.1.0.0-alpha.
|
|
850
|
+
"sha512": "sha512-U6Sq+zZ1yY6Gdmx1WUYnuNKuycsqWF9Gfjeb1E5RrBfizLfOxtVvGWLnqO/gtqNpHyv8fhNcZuPUEH7r+ZIbkw==",
|
|
851
|
+
"path": "microsoft.typespec.generator/1.0.0-alpha.20260212.3",
|
|
852
|
+
"hashPath": "microsoft.typespec.generator.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
853
853
|
},
|
|
854
|
-
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.
|
|
854
|
+
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.20260212.3": {
|
|
855
855
|
"type": "package",
|
|
856
856
|
"serviceable": true,
|
|
857
|
-
"sha512": "sha512-
|
|
858
|
-
"path": "microsoft.typespec.generator.clientmodel/1.0.0-alpha.
|
|
859
|
-
"hashPath": "microsoft.typespec.generator.clientmodel.1.0.0-alpha.
|
|
857
|
+
"sha512": "sha512-PP/1r4+nN3QPzO2uc05CW1Jm1XNA4g91eMFfWIBAxKj3XVxvfILvud5v+mmwiL/2sBmfQ6cZWDJjBfZUTmI+/Q==",
|
|
858
|
+
"path": "microsoft.typespec.generator.clientmodel/1.0.0-alpha.20260212.3",
|
|
859
|
+
"hashPath": "microsoft.typespec.generator.clientmodel.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
860
860
|
},
|
|
861
|
-
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.
|
|
861
|
+
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.20260212.3": {
|
|
862
862
|
"type": "package",
|
|
863
863
|
"serviceable": true,
|
|
864
|
-
"sha512": "sha512-
|
|
865
|
-
"path": "microsoft.typespec.generator.input/1.0.0-alpha.
|
|
866
|
-
"hashPath": "microsoft.typespec.generator.input.1.0.0-alpha.
|
|
864
|
+
"sha512": "sha512-MwvXNcaQwRQVzCWqGIPv9LDDnV75FoEvNPokLOriE+pcOq/y6qdfmMW2W8raXuIDKavKUHNnvHMDu2CIEyADcg==",
|
|
865
|
+
"path": "microsoft.typespec.generator.input/1.0.0-alpha.20260212.3",
|
|
866
|
+
"hashPath": "microsoft.typespec.generator.input.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
867
867
|
},
|
|
868
868
|
"Newtonsoft.Json/13.0.3": {
|
|
869
869
|
"type": "package",
|
|
@@ -1012,7 +1012,7 @@
|
|
|
1012
1012
|
"path": "system.security.cryptography.protecteddata/8.0.0",
|
|
1013
1013
|
"hashPath": "system.security.cryptography.protecteddata.8.0.0.nupkg.sha512"
|
|
1014
1014
|
},
|
|
1015
|
-
"Azure.Generator/1.0.0-alpha.
|
|
1015
|
+
"Azure.Generator/1.0.0-alpha.20260212.2": {
|
|
1016
1016
|
"type": "project",
|
|
1017
1017
|
"serviceable": false,
|
|
1018
1018
|
"sha512": ""
|
|
Binary file
|
|
Binary file
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"compilationOptions": {},
|
|
7
7
|
"targets": {
|
|
8
8
|
".NETCoreApp,Version=v10.0": {
|
|
9
|
-
"Azure.Generator/1.0.0-alpha.
|
|
9
|
+
"Azure.Generator/1.0.0-alpha.20260212.2": {
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"Azure.Core": "1.51.1",
|
|
12
12
|
"Azure.Core.Expressions.DataFactory": "1.0.0",
|
|
13
13
|
"Azure.ResourceManager": "1.13.2",
|
|
14
|
-
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.
|
|
14
|
+
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.20260212.3"
|
|
15
15
|
},
|
|
16
16
|
"runtime": {
|
|
17
17
|
"Azure.Generator.dll": {}
|
|
@@ -405,12 +405,12 @@
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
},
|
|
408
|
-
"Microsoft.TypeSpec.Generator/1.0.0-alpha.
|
|
408
|
+
"Microsoft.TypeSpec.Generator/1.0.0-alpha.20260212.3": {
|
|
409
409
|
"dependencies": {
|
|
410
410
|
"CommandLineParser": "2.9.1",
|
|
411
411
|
"Microsoft.Build": "17.9.5",
|
|
412
412
|
"Microsoft.CodeAnalysis.CSharp.Workspaces": "4.8.0",
|
|
413
|
-
"Microsoft.TypeSpec.Generator.Input": "1.0.0-alpha.
|
|
413
|
+
"Microsoft.TypeSpec.Generator.Input": "1.0.0-alpha.20260212.3",
|
|
414
414
|
"NuGet.Configuration": "6.14.0",
|
|
415
415
|
"NuGet.Protocol": "6.14.0",
|
|
416
416
|
"NuGet.Versioning": "6.14.0",
|
|
@@ -424,9 +424,9 @@
|
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
},
|
|
427
|
-
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.
|
|
427
|
+
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.20260212.3": {
|
|
428
428
|
"dependencies": {
|
|
429
|
-
"Microsoft.TypeSpec.Generator": "1.0.0-alpha.
|
|
429
|
+
"Microsoft.TypeSpec.Generator": "1.0.0-alpha.20260212.3",
|
|
430
430
|
"System.ClientModel": "1.9.0"
|
|
431
431
|
},
|
|
432
432
|
"runtime": {
|
|
@@ -436,7 +436,7 @@
|
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
},
|
|
439
|
-
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.
|
|
439
|
+
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.20260212.3": {
|
|
440
440
|
"dependencies": {
|
|
441
441
|
"Microsoft.CodeAnalysis.CSharp.Workspaces": "4.8.0",
|
|
442
442
|
"System.Memory.Data": "10.0.1"
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
}
|
|
680
680
|
},
|
|
681
681
|
"libraries": {
|
|
682
|
-
"Azure.Generator/1.0.0-alpha.
|
|
682
|
+
"Azure.Generator/1.0.0-alpha.20260212.2": {
|
|
683
683
|
"type": "project",
|
|
684
684
|
"serviceable": false,
|
|
685
685
|
"sha512": ""
|
|
@@ -831,26 +831,26 @@
|
|
|
831
831
|
"path": "microsoft.net.stringtools/17.9.5",
|
|
832
832
|
"hashPath": "microsoft.net.stringtools.17.9.5.nupkg.sha512"
|
|
833
833
|
},
|
|
834
|
-
"Microsoft.TypeSpec.Generator/1.0.0-alpha.
|
|
834
|
+
"Microsoft.TypeSpec.Generator/1.0.0-alpha.20260212.3": {
|
|
835
835
|
"type": "package",
|
|
836
836
|
"serviceable": true,
|
|
837
|
-
"sha512": "sha512-
|
|
838
|
-
"path": "microsoft.typespec.generator/1.0.0-alpha.
|
|
839
|
-
"hashPath": "microsoft.typespec.generator.1.0.0-alpha.
|
|
837
|
+
"sha512": "sha512-U6Sq+zZ1yY6Gdmx1WUYnuNKuycsqWF9Gfjeb1E5RrBfizLfOxtVvGWLnqO/gtqNpHyv8fhNcZuPUEH7r+ZIbkw==",
|
|
838
|
+
"path": "microsoft.typespec.generator/1.0.0-alpha.20260212.3",
|
|
839
|
+
"hashPath": "microsoft.typespec.generator.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
840
840
|
},
|
|
841
|
-
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.
|
|
841
|
+
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.20260212.3": {
|
|
842
842
|
"type": "package",
|
|
843
843
|
"serviceable": true,
|
|
844
|
-
"sha512": "sha512-
|
|
845
|
-
"path": "microsoft.typespec.generator.clientmodel/1.0.0-alpha.
|
|
846
|
-
"hashPath": "microsoft.typespec.generator.clientmodel.1.0.0-alpha.
|
|
844
|
+
"sha512": "sha512-PP/1r4+nN3QPzO2uc05CW1Jm1XNA4g91eMFfWIBAxKj3XVxvfILvud5v+mmwiL/2sBmfQ6cZWDJjBfZUTmI+/Q==",
|
|
845
|
+
"path": "microsoft.typespec.generator.clientmodel/1.0.0-alpha.20260212.3",
|
|
846
|
+
"hashPath": "microsoft.typespec.generator.clientmodel.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
847
847
|
},
|
|
848
|
-
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.
|
|
848
|
+
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.20260212.3": {
|
|
849
849
|
"type": "package",
|
|
850
850
|
"serviceable": true,
|
|
851
|
-
"sha512": "sha512-
|
|
852
|
-
"path": "microsoft.typespec.generator.input/1.0.0-alpha.
|
|
853
|
-
"hashPath": "microsoft.typespec.generator.input.1.0.0-alpha.
|
|
851
|
+
"sha512": "sha512-MwvXNcaQwRQVzCWqGIPv9LDDnV75FoEvNPokLOriE+pcOq/y6qdfmMW2W8raXuIDKavKUHNnvHMDu2CIEyADcg==",
|
|
852
|
+
"path": "microsoft.typespec.generator.input/1.0.0-alpha.20260212.3",
|
|
853
|
+
"hashPath": "microsoft.typespec.generator.input.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
854
854
|
},
|
|
855
855
|
"Newtonsoft.Json/13.0.3": {
|
|
856
856
|
"type": "package",
|
|
Binary file
|
|
Binary file
|
|
@@ -190,6 +190,34 @@
|
|
|
190
190
|
Azure libraries.
|
|
191
191
|
</summary>
|
|
192
192
|
</member>
|
|
193
|
+
<member name="T:Azure.Generator.Visitors.XmlSerializableVisitor">
|
|
194
|
+
<summary>
|
|
195
|
+
Visitor that adds <see cref="T:Azure.Core.IXmlSerializable"/> interface implementation to models that support XML serialization.
|
|
196
|
+
</summary>
|
|
197
|
+
<remarks>
|
|
198
|
+
This visitor performs the following modifications:
|
|
199
|
+
<list type="number">
|
|
200
|
+
<item>
|
|
201
|
+
<description>
|
|
202
|
+
For models with <see cref="F:Microsoft.TypeSpec.Generator.Input.InputModelTypeUsage.Xml"/> usage, adds the <see cref="T:Azure.Core.IXmlSerializable"/> interface
|
|
203
|
+
and implements the explicit <c>void IXmlSerializable.Write(XmlWriter writer, string nameHint)</c> method.
|
|
204
|
+
</description>
|
|
205
|
+
</item>
|
|
206
|
+
<item>
|
|
207
|
+
<description>
|
|
208
|
+
Updates the <c>WriteObjectValue</c> extension method in <see cref="T:Microsoft.TypeSpec.Generator.ClientModel.Providers.ModelSerializationExtensionsDefinition"/>
|
|
209
|
+
to add a case for <see cref="T:Azure.Core.IXmlSerializable"/> in the switch statement.
|
|
210
|
+
</description>
|
|
211
|
+
</item>
|
|
212
|
+
<item>
|
|
213
|
+
<description>
|
|
214
|
+
For models that ONLY support XML serialization (not JSON), updates the implicit <c>RequestContent</c> operator
|
|
215
|
+
to use <see cref="T:Azure.Core.XmlWriterContent"/>.
|
|
216
|
+
</description>
|
|
217
|
+
</item>
|
|
218
|
+
</list>
|
|
219
|
+
</remarks>
|
|
220
|
+
</member>
|
|
193
221
|
<member name="M:Azure.Core.AzureKeyCredentialPolicy.#ctor(Azure.AzureKeyCredential,System.String,System.String)">
|
|
194
222
|
<summary>
|
|
195
223
|
Initializes a new instance of the <see cref="T:Azure.Core.AzureKeyCredentialPolicy"/> class.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
#nullable enable
|
|
5
|
+
|
|
6
|
+
using System.Xml;
|
|
7
|
+
|
|
8
|
+
namespace Azure.Core
|
|
9
|
+
{
|
|
10
|
+
internal interface IXmlSerializable
|
|
11
|
+
{
|
|
12
|
+
void Write(XmlWriter writer, string? nameHint);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
#nullable enable
|
|
5
|
+
|
|
6
|
+
using System.IO;
|
|
7
|
+
using System.Text;
|
|
8
|
+
using System.Threading;
|
|
9
|
+
using System.Threading.Tasks;
|
|
10
|
+
using System.Xml;
|
|
11
|
+
|
|
12
|
+
namespace Azure.Core
|
|
13
|
+
{
|
|
14
|
+
internal class XmlWriterContent : RequestContent
|
|
15
|
+
{
|
|
16
|
+
private readonly MemoryStream _stream;
|
|
17
|
+
private readonly RequestContent _content;
|
|
18
|
+
|
|
19
|
+
public XmlWriterContent()
|
|
20
|
+
{
|
|
21
|
+
_stream = new MemoryStream();
|
|
22
|
+
_content = Create(_stream);
|
|
23
|
+
XmlWriter = new XmlTextWriter(_stream, Encoding.UTF8);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public XmlWriter XmlWriter { get; }
|
|
27
|
+
|
|
28
|
+
public override async Task WriteToAsync(Stream stream, CancellationToken cancellation)
|
|
29
|
+
{
|
|
30
|
+
XmlWriter.Flush();
|
|
31
|
+
await _content.WriteToAsync(stream, cancellation).ConfigureAwait(false);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public override void WriteTo(Stream stream, CancellationToken cancellation)
|
|
35
|
+
{
|
|
36
|
+
XmlWriter.Flush();
|
|
37
|
+
_content.WriteTo(stream, cancellation);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public override bool TryComputeLength(out long length)
|
|
41
|
+
{
|
|
42
|
+
XmlWriter.Flush();
|
|
43
|
+
length = _stream.Length;
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public override void Dispose()
|
|
48
|
+
{
|
|
49
|
+
XmlWriter.Dispose();
|
|
50
|
+
_content.Dispose();
|
|
51
|
+
_stream.Dispose();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"compilationOptions": {},
|
|
7
7
|
"targets": {
|
|
8
8
|
".NETCoreApp,Version=v10.0": {
|
|
9
|
-
"Azure.Generator.StubLibrary/1.0.0-alpha.
|
|
9
|
+
"Azure.Generator.StubLibrary/1.0.0-alpha.20260212.2": {
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"Azure.Generator": "1.0.0-alpha.
|
|
12
|
-
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.
|
|
11
|
+
"Azure.Generator": "1.0.0-alpha.20260212.2",
|
|
12
|
+
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.20260212.3",
|
|
13
13
|
"System.ClientModel": "1.9.0"
|
|
14
14
|
},
|
|
15
15
|
"runtime": {
|
|
@@ -404,12 +404,12 @@
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
},
|
|
407
|
-
"Microsoft.TypeSpec.Generator/1.0.0-alpha.
|
|
407
|
+
"Microsoft.TypeSpec.Generator/1.0.0-alpha.20260212.3": {
|
|
408
408
|
"dependencies": {
|
|
409
409
|
"CommandLineParser": "2.9.1",
|
|
410
410
|
"Microsoft.Build": "17.9.5",
|
|
411
411
|
"Microsoft.CodeAnalysis.CSharp.Workspaces": "4.8.0",
|
|
412
|
-
"Microsoft.TypeSpec.Generator.Input": "1.0.0-alpha.
|
|
412
|
+
"Microsoft.TypeSpec.Generator.Input": "1.0.0-alpha.20260212.3",
|
|
413
413
|
"NuGet.Configuration": "6.14.0",
|
|
414
414
|
"NuGet.Protocol": "6.14.0",
|
|
415
415
|
"NuGet.Versioning": "6.14.0",
|
|
@@ -423,9 +423,9 @@
|
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
},
|
|
426
|
-
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.
|
|
426
|
+
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.20260212.3": {
|
|
427
427
|
"dependencies": {
|
|
428
|
-
"Microsoft.TypeSpec.Generator": "1.0.0-alpha.
|
|
428
|
+
"Microsoft.TypeSpec.Generator": "1.0.0-alpha.20260212.3",
|
|
429
429
|
"System.ClientModel": "1.9.0"
|
|
430
430
|
},
|
|
431
431
|
"runtime": {
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
|
-
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.
|
|
438
|
+
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.20260212.3": {
|
|
439
439
|
"dependencies": {
|
|
440
440
|
"Microsoft.CodeAnalysis.CSharp.Workspaces": "4.8.0",
|
|
441
441
|
"System.Memory.Data": "10.0.1"
|
|
@@ -675,24 +675,24 @@
|
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
},
|
|
678
|
-
"Azure.Generator/1.0.0-alpha.
|
|
678
|
+
"Azure.Generator/1.0.0-alpha.20260212.2": {
|
|
679
679
|
"dependencies": {
|
|
680
680
|
"Azure.Core": "1.51.1",
|
|
681
681
|
"Azure.Core.Expressions.DataFactory": "1.0.0",
|
|
682
682
|
"Azure.ResourceManager": "1.13.2",
|
|
683
|
-
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.
|
|
683
|
+
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.20260212.3"
|
|
684
684
|
},
|
|
685
685
|
"runtime": {
|
|
686
686
|
"Azure.Generator.dll": {
|
|
687
687
|
"assemblyVersion": "1.0.0.0",
|
|
688
|
-
"fileVersion": "1.0.26.
|
|
688
|
+
"fileVersion": "1.0.26.11202"
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
},
|
|
694
694
|
"libraries": {
|
|
695
|
-
"Azure.Generator.StubLibrary/1.0.0-alpha.
|
|
695
|
+
"Azure.Generator.StubLibrary/1.0.0-alpha.20260212.2": {
|
|
696
696
|
"type": "project",
|
|
697
697
|
"serviceable": false,
|
|
698
698
|
"sha512": ""
|
|
@@ -844,26 +844,26 @@
|
|
|
844
844
|
"path": "microsoft.net.stringtools/17.9.5",
|
|
845
845
|
"hashPath": "microsoft.net.stringtools.17.9.5.nupkg.sha512"
|
|
846
846
|
},
|
|
847
|
-
"Microsoft.TypeSpec.Generator/1.0.0-alpha.
|
|
847
|
+
"Microsoft.TypeSpec.Generator/1.0.0-alpha.20260212.3": {
|
|
848
848
|
"type": "package",
|
|
849
849
|
"serviceable": true,
|
|
850
|
-
"sha512": "sha512-
|
|
851
|
-
"path": "microsoft.typespec.generator/1.0.0-alpha.
|
|
852
|
-
"hashPath": "microsoft.typespec.generator.1.0.0-alpha.
|
|
850
|
+
"sha512": "sha512-U6Sq+zZ1yY6Gdmx1WUYnuNKuycsqWF9Gfjeb1E5RrBfizLfOxtVvGWLnqO/gtqNpHyv8fhNcZuPUEH7r+ZIbkw==",
|
|
851
|
+
"path": "microsoft.typespec.generator/1.0.0-alpha.20260212.3",
|
|
852
|
+
"hashPath": "microsoft.typespec.generator.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
853
853
|
},
|
|
854
|
-
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.
|
|
854
|
+
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.20260212.3": {
|
|
855
855
|
"type": "package",
|
|
856
856
|
"serviceable": true,
|
|
857
|
-
"sha512": "sha512-
|
|
858
|
-
"path": "microsoft.typespec.generator.clientmodel/1.0.0-alpha.
|
|
859
|
-
"hashPath": "microsoft.typespec.generator.clientmodel.1.0.0-alpha.
|
|
857
|
+
"sha512": "sha512-PP/1r4+nN3QPzO2uc05CW1Jm1XNA4g91eMFfWIBAxKj3XVxvfILvud5v+mmwiL/2sBmfQ6cZWDJjBfZUTmI+/Q==",
|
|
858
|
+
"path": "microsoft.typespec.generator.clientmodel/1.0.0-alpha.20260212.3",
|
|
859
|
+
"hashPath": "microsoft.typespec.generator.clientmodel.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
860
860
|
},
|
|
861
|
-
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.
|
|
861
|
+
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.20260212.3": {
|
|
862
862
|
"type": "package",
|
|
863
863
|
"serviceable": true,
|
|
864
|
-
"sha512": "sha512-
|
|
865
|
-
"path": "microsoft.typespec.generator.input/1.0.0-alpha.
|
|
866
|
-
"hashPath": "microsoft.typespec.generator.input.1.0.0-alpha.
|
|
864
|
+
"sha512": "sha512-MwvXNcaQwRQVzCWqGIPv9LDDnV75FoEvNPokLOriE+pcOq/y6qdfmMW2W8raXuIDKavKUHNnvHMDu2CIEyADcg==",
|
|
865
|
+
"path": "microsoft.typespec.generator.input/1.0.0-alpha.20260212.3",
|
|
866
|
+
"hashPath": "microsoft.typespec.generator.input.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
867
867
|
},
|
|
868
868
|
"Newtonsoft.Json/13.0.3": {
|
|
869
869
|
"type": "package",
|
|
@@ -1012,7 +1012,7 @@
|
|
|
1012
1012
|
"path": "system.security.cryptography.protecteddata/8.0.0",
|
|
1013
1013
|
"hashPath": "system.security.cryptography.protecteddata.8.0.0.nupkg.sha512"
|
|
1014
1014
|
},
|
|
1015
|
-
"Azure.Generator/1.0.0-alpha.
|
|
1015
|
+
"Azure.Generator/1.0.0-alpha.20260212.2": {
|
|
1016
1016
|
"type": "project",
|
|
1017
1017
|
"serviceable": false,
|
|
1018
1018
|
"sha512": ""
|
|
Binary file
|
|
Binary file
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"compilationOptions": {},
|
|
7
7
|
"targets": {
|
|
8
8
|
".NETCoreApp,Version=v10.0": {
|
|
9
|
-
"Azure.Generator/1.0.0-alpha.
|
|
9
|
+
"Azure.Generator/1.0.0-alpha.20260212.2": {
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"Azure.Core": "1.51.1",
|
|
12
12
|
"Azure.Core.Expressions.DataFactory": "1.0.0",
|
|
13
13
|
"Azure.ResourceManager": "1.13.2",
|
|
14
|
-
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.
|
|
14
|
+
"Microsoft.TypeSpec.Generator.ClientModel": "1.0.0-alpha.20260212.3"
|
|
15
15
|
},
|
|
16
16
|
"runtime": {
|
|
17
17
|
"Azure.Generator.dll": {}
|
|
@@ -405,12 +405,12 @@
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
},
|
|
408
|
-
"Microsoft.TypeSpec.Generator/1.0.0-alpha.
|
|
408
|
+
"Microsoft.TypeSpec.Generator/1.0.0-alpha.20260212.3": {
|
|
409
409
|
"dependencies": {
|
|
410
410
|
"CommandLineParser": "2.9.1",
|
|
411
411
|
"Microsoft.Build": "17.9.5",
|
|
412
412
|
"Microsoft.CodeAnalysis.CSharp.Workspaces": "4.8.0",
|
|
413
|
-
"Microsoft.TypeSpec.Generator.Input": "1.0.0-alpha.
|
|
413
|
+
"Microsoft.TypeSpec.Generator.Input": "1.0.0-alpha.20260212.3",
|
|
414
414
|
"NuGet.Configuration": "6.14.0",
|
|
415
415
|
"NuGet.Protocol": "6.14.0",
|
|
416
416
|
"NuGet.Versioning": "6.14.0",
|
|
@@ -424,9 +424,9 @@
|
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
},
|
|
427
|
-
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.
|
|
427
|
+
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.20260212.3": {
|
|
428
428
|
"dependencies": {
|
|
429
|
-
"Microsoft.TypeSpec.Generator": "1.0.0-alpha.
|
|
429
|
+
"Microsoft.TypeSpec.Generator": "1.0.0-alpha.20260212.3",
|
|
430
430
|
"System.ClientModel": "1.9.0"
|
|
431
431
|
},
|
|
432
432
|
"runtime": {
|
|
@@ -436,7 +436,7 @@
|
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
},
|
|
439
|
-
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.
|
|
439
|
+
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.20260212.3": {
|
|
440
440
|
"dependencies": {
|
|
441
441
|
"Microsoft.CodeAnalysis.CSharp.Workspaces": "4.8.0",
|
|
442
442
|
"System.Memory.Data": "10.0.1"
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
}
|
|
680
680
|
},
|
|
681
681
|
"libraries": {
|
|
682
|
-
"Azure.Generator/1.0.0-alpha.
|
|
682
|
+
"Azure.Generator/1.0.0-alpha.20260212.2": {
|
|
683
683
|
"type": "project",
|
|
684
684
|
"serviceable": false,
|
|
685
685
|
"sha512": ""
|
|
@@ -831,26 +831,26 @@
|
|
|
831
831
|
"path": "microsoft.net.stringtools/17.9.5",
|
|
832
832
|
"hashPath": "microsoft.net.stringtools.17.9.5.nupkg.sha512"
|
|
833
833
|
},
|
|
834
|
-
"Microsoft.TypeSpec.Generator/1.0.0-alpha.
|
|
834
|
+
"Microsoft.TypeSpec.Generator/1.0.0-alpha.20260212.3": {
|
|
835
835
|
"type": "package",
|
|
836
836
|
"serviceable": true,
|
|
837
|
-
"sha512": "sha512-
|
|
838
|
-
"path": "microsoft.typespec.generator/1.0.0-alpha.
|
|
839
|
-
"hashPath": "microsoft.typespec.generator.1.0.0-alpha.
|
|
837
|
+
"sha512": "sha512-U6Sq+zZ1yY6Gdmx1WUYnuNKuycsqWF9Gfjeb1E5RrBfizLfOxtVvGWLnqO/gtqNpHyv8fhNcZuPUEH7r+ZIbkw==",
|
|
838
|
+
"path": "microsoft.typespec.generator/1.0.0-alpha.20260212.3",
|
|
839
|
+
"hashPath": "microsoft.typespec.generator.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
840
840
|
},
|
|
841
|
-
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.
|
|
841
|
+
"Microsoft.TypeSpec.Generator.ClientModel/1.0.0-alpha.20260212.3": {
|
|
842
842
|
"type": "package",
|
|
843
843
|
"serviceable": true,
|
|
844
|
-
"sha512": "sha512-
|
|
845
|
-
"path": "microsoft.typespec.generator.clientmodel/1.0.0-alpha.
|
|
846
|
-
"hashPath": "microsoft.typespec.generator.clientmodel.1.0.0-alpha.
|
|
844
|
+
"sha512": "sha512-PP/1r4+nN3QPzO2uc05CW1Jm1XNA4g91eMFfWIBAxKj3XVxvfILvud5v+mmwiL/2sBmfQ6cZWDJjBfZUTmI+/Q==",
|
|
845
|
+
"path": "microsoft.typespec.generator.clientmodel/1.0.0-alpha.20260212.3",
|
|
846
|
+
"hashPath": "microsoft.typespec.generator.clientmodel.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
847
847
|
},
|
|
848
|
-
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.
|
|
848
|
+
"Microsoft.TypeSpec.Generator.Input/1.0.0-alpha.20260212.3": {
|
|
849
849
|
"type": "package",
|
|
850
850
|
"serviceable": true,
|
|
851
|
-
"sha512": "sha512-
|
|
852
|
-
"path": "microsoft.typespec.generator.input/1.0.0-alpha.
|
|
853
|
-
"hashPath": "microsoft.typespec.generator.input.1.0.0-alpha.
|
|
851
|
+
"sha512": "sha512-MwvXNcaQwRQVzCWqGIPv9LDDnV75FoEvNPokLOriE+pcOq/y6qdfmMW2W8raXuIDKavKUHNnvHMDu2CIEyADcg==",
|
|
852
|
+
"path": "microsoft.typespec.generator.input/1.0.0-alpha.20260212.3",
|
|
853
|
+
"hashPath": "microsoft.typespec.generator.input.1.0.0-alpha.20260212.3.nupkg.sha512"
|
|
854
854
|
},
|
|
855
855
|
"Newtonsoft.Json/13.0.3": {
|
|
856
856
|
"type": "package",
|
|
Binary file
|
|
Binary file
|
|
@@ -190,6 +190,34 @@
|
|
|
190
190
|
Azure libraries.
|
|
191
191
|
</summary>
|
|
192
192
|
</member>
|
|
193
|
+
<member name="T:Azure.Generator.Visitors.XmlSerializableVisitor">
|
|
194
|
+
<summary>
|
|
195
|
+
Visitor that adds <see cref="T:Azure.Core.IXmlSerializable"/> interface implementation to models that support XML serialization.
|
|
196
|
+
</summary>
|
|
197
|
+
<remarks>
|
|
198
|
+
This visitor performs the following modifications:
|
|
199
|
+
<list type="number">
|
|
200
|
+
<item>
|
|
201
|
+
<description>
|
|
202
|
+
For models with <see cref="F:Microsoft.TypeSpec.Generator.Input.InputModelTypeUsage.Xml"/> usage, adds the <see cref="T:Azure.Core.IXmlSerializable"/> interface
|
|
203
|
+
and implements the explicit <c>void IXmlSerializable.Write(XmlWriter writer, string nameHint)</c> method.
|
|
204
|
+
</description>
|
|
205
|
+
</item>
|
|
206
|
+
<item>
|
|
207
|
+
<description>
|
|
208
|
+
Updates the <c>WriteObjectValue</c> extension method in <see cref="T:Microsoft.TypeSpec.Generator.ClientModel.Providers.ModelSerializationExtensionsDefinition"/>
|
|
209
|
+
to add a case for <see cref="T:Azure.Core.IXmlSerializable"/> in the switch statement.
|
|
210
|
+
</description>
|
|
211
|
+
</item>
|
|
212
|
+
<item>
|
|
213
|
+
<description>
|
|
214
|
+
For models that ONLY support XML serialization (not JSON), updates the implicit <c>RequestContent</c> operator
|
|
215
|
+
to use <see cref="T:Azure.Core.XmlWriterContent"/>.
|
|
216
|
+
</description>
|
|
217
|
+
</item>
|
|
218
|
+
</list>
|
|
219
|
+
</remarks>
|
|
220
|
+
</member>
|
|
193
221
|
<member name="M:Azure.Core.AzureKeyCredentialPolicy.#ctor(Azure.AzureKeyCredential,System.String,System.String)">
|
|
194
222
|
<summary>
|
|
195
223
|
Initializes a new instance of the <see cref="T:Azure.Core.AzureKeyCredentialPolicy"/> class.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
#nullable enable
|
|
5
|
+
|
|
6
|
+
using System.Xml;
|
|
7
|
+
|
|
8
|
+
namespace Azure.Core
|
|
9
|
+
{
|
|
10
|
+
internal interface IXmlSerializable
|
|
11
|
+
{
|
|
12
|
+
void Write(XmlWriter writer, string? nameHint);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
#nullable enable
|
|
5
|
+
|
|
6
|
+
using System.IO;
|
|
7
|
+
using System.Text;
|
|
8
|
+
using System.Threading;
|
|
9
|
+
using System.Threading.Tasks;
|
|
10
|
+
using System.Xml;
|
|
11
|
+
|
|
12
|
+
namespace Azure.Core
|
|
13
|
+
{
|
|
14
|
+
internal class XmlWriterContent : RequestContent
|
|
15
|
+
{
|
|
16
|
+
private readonly MemoryStream _stream;
|
|
17
|
+
private readonly RequestContent _content;
|
|
18
|
+
|
|
19
|
+
public XmlWriterContent()
|
|
20
|
+
{
|
|
21
|
+
_stream = new MemoryStream();
|
|
22
|
+
_content = Create(_stream);
|
|
23
|
+
XmlWriter = new XmlTextWriter(_stream, Encoding.UTF8);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public XmlWriter XmlWriter { get; }
|
|
27
|
+
|
|
28
|
+
public override async Task WriteToAsync(Stream stream, CancellationToken cancellation)
|
|
29
|
+
{
|
|
30
|
+
XmlWriter.Flush();
|
|
31
|
+
await _content.WriteToAsync(stream, cancellation).ConfigureAwait(false);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public override void WriteTo(Stream stream, CancellationToken cancellation)
|
|
35
|
+
{
|
|
36
|
+
XmlWriter.Flush();
|
|
37
|
+
_content.WriteTo(stream, cancellation);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public override bool TryComputeLength(out long length)
|
|
41
|
+
{
|
|
42
|
+
XmlWriter.Flush();
|
|
43
|
+
length = _stream.Length;
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public override void Dispose()
|
|
48
|
+
{
|
|
49
|
+
XmlWriter.Dispose();
|
|
50
|
+
_content.Dispose();
|
|
51
|
+
_stream.Dispose();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-typespec/http-client-csharp",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.20260212.2",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec library for emitting Azure libraries for C#.",
|
|
6
6
|
"readme": "https://github.com/Azure/azure-sdk-for-net/blob/main/eng/packages/http-client-csharp/README.md",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dist/generator/**"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@typespec/http-client-csharp": "1.0.0-alpha.
|
|
41
|
+
"@typespec/http-client-csharp": "1.0.0-alpha.20260212.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@azure-tools/azure-http-specs": "0.1.0-alpha.35",
|