From deb5dce6c21ee1accbd6c7a5f388dbb3871d35f6 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 4 Jul 2024 03:57:01 +0000 Subject: [PATCH 1/9] Update Generator Version 3.0.0-beta.20240703.5 --- eng/Packages.Data.props | 2 +- eng/emitter-package-lock.json | 16 ++++++++-------- eng/emitter-package.json | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 08e715b098970..35c4736369fbf 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -222,7 +222,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index fbfb2984ee22c..6f10f44f79d9e 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240701.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240703.5" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", @@ -22,9 +22,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240701.2", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240701.2.tgz", - "integrity": "sha512-7lgsJPvRM4tx0z6qeCPe2OxBEZ8qhwmRnNZUX/0BH8N9geKYMSiqfHep8eBR+RGLWxdnqa3NZWiR97xUV4VAww==" + "version": "3.0.0-beta.20240703.5", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240703.5.tgz", + "integrity": "sha512-M5vJUlEUMerJhX+kI+bqB7suetxjScbBhIPKZLfRZwZTyrFfMn/zICvn2scTPByr3SK9ykvOPg3KpSBmcEI3oA==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.43.0", @@ -117,11 +117,11 @@ } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240701.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240701.2.tgz", - "integrity": "sha512-9yt9gie9MRUjcZ2yTTOF4RPpGQRvOrVorQ3BVbpV2sJJFtCt9oMQOZnxE0KIqLvpTPwmm8H2+xuPIBHj2G/r1g==", + "version": "0.2.0-beta.20240703.5", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240703.5.tgz", + "integrity": "sha512-ML5MtoH516AWFlvPyaLJ2QWVHhI70KbnCmZHef4e1G6Yr1VklXn7L9ZzCkMvqrkmGPadQBI5wfwJqySSgDfi7g==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240701.2", + "@autorest/csharp": "3.0.0-beta.20240703.5", "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index b5878ee800c25..72735e1ea0bb3 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240701.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240703.5" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", From 0a83770d9b1c405d3e96cc7a126f419c80227645 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 4 Jul 2024 04:34:48 +0000 Subject: [PATCH 2/9] Update SDK codes de_he_2 --- .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ 4 files changed, 56 insertions(+) diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Internal/RequestContentHelper.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Internal/RequestContentHelper.cs index 09d0c39d98559..bb466089af5de 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContentHelper.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContentHelper.cs index 4055e2410d0d4..61d8e1dae3f7e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i], ModelSerializationExtensions.WireOptions); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Internal/RequestContentHelper.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Internal/RequestContentHelper.cs index b231d111adc5b..d9a0acdc189f9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Internal/RequestContentHelper.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Internal/RequestContentHelper.cs index 643791f47357d..8785aa5cb62de 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { From fafe1aa14bc18196c5ee104037908975eb3aa4de Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 4 Jul 2024 04:35:22 +0000 Subject: [PATCH 3/9] Update SDK codes he_me_3 --- .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ 8 files changed, 112 insertions(+) diff --git a/sdk/iot/Azure.IoT.Hub.Service/src/Generated/Internal/RequestContentHelper.cs b/sdk/iot/Azure.IoT.Hub.Service/src/Generated/Internal/RequestContentHelper.cs index 77a31bb562168..3eb9f727a3fb4 100644 --- a/sdk/iot/Azure.IoT.Hub.Service/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/iot/Azure.IoT.Hub.Service/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/RequestContentHelper.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/RequestContentHelper.cs index c4ba0bba356fc..482217bba2c2a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/keyvault/samples/sharelink/Generated/Internal/RequestContentHelper.cs b/sdk/keyvault/samples/sharelink/Generated/Internal/RequestContentHelper.cs index 04829b2318342..1c9ec285beed0 100644 --- a/sdk/keyvault/samples/sharelink/Generated/Internal/RequestContentHelper.cs +++ b/sdk/keyvault/samples/sharelink/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/maps/Azure.Maps.Geolocation/src/Generated/Internal/RequestContentHelper.cs b/sdk/maps/Azure.Maps.Geolocation/src/Generated/Internal/RequestContentHelper.cs index ac6ca966b77e6..a0348a2154253 100644 --- a/sdk/maps/Azure.Maps.Geolocation/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/maps/Azure.Maps.Geolocation/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/maps/Azure.Maps.Rendering/src/Generated/Internal/RequestContentHelper.cs b/sdk/maps/Azure.Maps.Rendering/src/Generated/Internal/RequestContentHelper.cs index ac6ca966b77e6..a0348a2154253 100644 --- a/sdk/maps/Azure.Maps.Rendering/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/maps/Azure.Maps.Rendering/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/maps/Azure.Maps.Routing/src/Generated/Internal/RequestContentHelper.cs b/sdk/maps/Azure.Maps.Routing/src/Generated/Internal/RequestContentHelper.cs index ac6ca966b77e6..a0348a2154253 100644 --- a/sdk/maps/Azure.Maps.Routing/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/maps/Azure.Maps.Routing/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/maps/Azure.Maps.Search/src/Generated/Internal/RequestContentHelper.cs b/sdk/maps/Azure.Maps.Search/src/Generated/Internal/RequestContentHelper.cs index ac6ca966b77e6..a0348a2154253 100644 --- a/sdk/maps/Azure.Maps.Search/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/maps/Azure.Maps.Search/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Internal/RequestContentHelper.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Internal/RequestContentHelper.cs index bdf116af6562a..c375a2e8e6663 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { From 47df49da9a56db9d488bb179f78fb8811f3e7c8b Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 4 Jul 2024 04:38:16 +0000 Subject: [PATCH 4/9] Update SDK codes ad_co_0 --- .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ 6 files changed, 84 insertions(+) diff --git a/sdk/attestation/Azure.Security.Attestation/src/Generated/Internal/RequestContentHelper.cs b/sdk/attestation/Azure.Security.Attestation/src/Generated/Internal/RequestContentHelper.cs index d73f0ebafc804..9a775ad63a8e0 100644 --- a/sdk/attestation/Azure.Security.Attestation/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/attestation/Azure.Security.Attestation/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Internal/RequestContentHelper.cs b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Internal/RequestContentHelper.cs index a39696c355fcd..b7ad0875e85d6 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.AlphaIds/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.AlphaIds/src/Generated/Internal/RequestContentHelper.cs index 9215aad3746e4..dffaed8447088 100644 --- a/sdk/communication/Azure.Communication.AlphaIds/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.AlphaIds/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Internal/RequestContentHelper.cs index a5fd47922bb67..32acb868978c0 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.CallingServer/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.CallingServer/src/Generated/Internal/RequestContentHelper.cs index 41ef809584321..23fd745591d58 100644 --- a/sdk/communication/Azure.Communication.CallingServer/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.CallingServer/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.Chat/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.Chat/src/Generated/Internal/RequestContentHelper.cs index 3d1fed9e16a74..92748d6626ce8 100644 --- a/sdk/communication/Azure.Communication.Chat/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.Chat/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { From 1ebf505905e79a8033649abc99d8835a580d1f9d Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 4 Jul 2024 04:40:04 +0000 Subject: [PATCH 5/9] Update SDK codes st_wo_6 --- .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ 15 files changed, 210 insertions(+) diff --git a/sdk/storage/Azure.Storage.Blobs.Batch/src/Generated/Internal/RequestContentHelper.cs b/sdk/storage/Azure.Storage.Blobs.Batch/src/Generated/Internal/RequestContentHelper.cs index e045d6d4a17f3..7c41e84001593 100644 --- a/sdk/storage/Azure.Storage.Blobs.Batch/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/storage/Azure.Storage.Blobs.Batch/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/storage/Azure.Storage.Blobs/src/Generated/Internal/RequestContentHelper.cs b/sdk/storage/Azure.Storage.Blobs/src/Generated/Internal/RequestContentHelper.cs index 8bfe0f8906e40..15d9d2a1e3df9 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Generated/Internal/RequestContentHelper.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Generated/Internal/RequestContentHelper.cs index 8bfe0f8906e40..15d9d2a1e3df9 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Internal/RequestContentHelper.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Internal/RequestContentHelper.cs index 8bfe0f8906e40..15d9d2a1e3df9 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/storage/Azure.Storage.Queues/src/Generated/Internal/RequestContentHelper.cs b/sdk/storage/Azure.Storage.Queues/src/Generated/Internal/RequestContentHelper.cs index 8bfe0f8906e40..15d9d2a1e3df9 100644 --- a/sdk/storage/Azure.Storage.Queues/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/storage/Azure.Storage.Queues/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Internal/RequestContentHelper.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Internal/RequestContentHelper.cs index 38f85b48d0258..5fdffddd9cc60 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/Internal/RequestContentHelper.cs b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/Internal/RequestContentHelper.cs index 42a710934fda3..7917b074be378 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/Internal/RequestContentHelper.cs b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/Internal/RequestContentHelper.cs index 3451799552c2f..443009e3875e1 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Internal/RequestContentHelper.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Internal/RequestContentHelper.cs index 1daaf0ea6eb6f..035f6f719254a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/tables/Azure.Data.Tables/src/Generated/Internal/RequestContentHelper.cs b/sdk/tables/Azure.Data.Tables/src/Generated/Internal/RequestContentHelper.cs index 5da7c0cbe3ba4..bff81afb96197 100644 --- a/sdk/tables/Azure.Data.Tables/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/tables/Azure.Data.Tables/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics.Legacy.Shared/src/Generated/Internal/RequestContentHelper.cs b/sdk/textanalytics/Azure.AI.TextAnalytics.Legacy.Shared/src/Generated/Internal/RequestContentHelper.cs index 646f87e097381..54c405be81228 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics.Legacy.Shared/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics.Legacy.Shared/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Internal/RequestContentHelper.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Internal/RequestContentHelper.cs index ab9fdd418ba63..e5124f4d9f42b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/src/Generated/Internal/RequestContentHelper.cs b/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/src/Generated/Internal/RequestContentHelper.cs index e123474d5543d..6241e35a59cf1 100644 --- a/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/translation/Azure.AI.Translation.Text/src/Generated/Internal/RequestContentHelper.cs b/sdk/translation/Azure.AI.Translation.Text/src/Generated/Internal/RequestContentHelper.cs index 5e15ef7289581..81db0c2c297d7 100644 --- a/sdk/translation/Azure.AI.Translation.Text/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/translation/Azure.AI.Translation.Text/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i], ModelSerializationExtensions.WireOptions); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge/src/Generated/Internal/RequestContentHelper.cs b/sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge/src/Generated/Internal/RequestContentHelper.cs index 3046a5aa6f461..005e6f7f2b2a1 100644 --- a/sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { From f5052a31f19c00034ebea85fa7ed869fc8fed500 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 4 Jul 2024 04:41:12 +0000 Subject: [PATCH 6/9] Update SDK codes mi_pu_4 --- .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ 6 files changed, 84 insertions(+) diff --git a/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/Internal/RequestContentHelper.cs b/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/Internal/RequestContentHelper.cs index 34fe020f3f0d7..e9b1f4dd18440 100644 --- a/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Generated/Internal/RequestContentHelper.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Generated/Internal/RequestContentHelper.cs index ffea7c1c374a9..f87ab0d365d8a 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Internal/RequestContentHelper.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Internal/RequestContentHelper.cs index 8e10f32bad989..288f62ba91286 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Internal/RequestContentHelper.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Internal/RequestContentHelper.cs index 1829d0583d0f5..d4e77afaa017b 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Generated/Internal/RequestContentHelper.cs b/sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Generated/Internal/RequestContentHelper.cs index 34fe020f3f0d7..e9b1f4dd18440 100644 --- a/sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Internal/RequestContentHelper.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Internal/RequestContentHelper.cs index 0aad7787b0206..2db547178d4f9 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i], ModelSerializationExtensions.WireOptions); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { From 5713e5a0783fe20b2905ad9485687b482388fcab Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 4 Jul 2024 04:44:26 +0000 Subject: [PATCH 7/9] Update SDK codes pu_sq_5 --- .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ .../src/Generated/Internal/RequestContentHelper.cs | 14 ++++++++++++++ 4 files changed, 56 insertions(+) diff --git a/sdk/quantum/Azure.Quantum.Jobs/src/Generated/Internal/RequestContentHelper.cs b/sdk/quantum/Azure.Quantum.Jobs/src/Generated/Internal/RequestContentHelper.cs index dd6853880204b..1bff975aded94 100644 --- a/sdk/quantum/Azure.Quantum.Jobs/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/quantum/Azure.Quantum.Jobs/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs index b9f83af9293c8..332ccb348d2f1 100644 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs index fb67f367f7ed2..d229188b8c8d1 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Internal/RequestContentHelper.cs b/sdk/search/Azure.Search.Documents/src/Generated/Internal/RequestContentHelper.cs index 1cdf99d0cfe96..87afb3f513b9a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { From d5b8659f9e36f9ab6e56bbf495eed71f52ff0bfb Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 4 Jul 2024 05:08:07 +0000 Subject: [PATCH 8/9] Update SDK codes co_de_1 --- .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../src/Generated/tspCodeModel.json | 35 +++++++++++++------ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ 8 files changed, 123 insertions(+), 10 deletions(-) diff --git a/sdk/communication/Azure.Communication.Email/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.Email/src/Generated/Internal/RequestContentHelper.cs index 57f5540d4d2f4..915f8f7d5a8c4 100644 --- a/sdk/communication/Azure.Communication.Email/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.Email/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.Identity/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.Identity/src/Generated/Internal/RequestContentHelper.cs index cb990847d7037..29aa09e6858a9 100644 --- a/sdk/communication/Azure.Communication.Identity/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.Identity/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json b/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json index c0883b9039b3c..ac4096b077579 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json @@ -288,10 +288,12 @@ "Type": { "$id": "43", "Kind": "array", + "Name": "Array", "ValueType": { "$id": "44", "Kind": "string" - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": true, "IsReadOnly": false @@ -477,6 +479,7 @@ "Type": { "$id": "71", "Kind": "array", + "Name": "ArrayMessageTemplateValue", "ValueType": { "$id": "72", "Kind": "model", @@ -900,7 +903,8 @@ ] } } - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": false, "IsReadOnly": false @@ -974,6 +978,7 @@ "Type": { "$id": "142", "Kind": "array", + "Name": "ArrayWhatsAppMessageTemplateBindingsComponent", "ValueType": { "$id": "143", "Kind": "model", @@ -995,7 +1000,8 @@ "IsReadOnly": false } ] - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": false, "IsReadOnly": false @@ -1008,9 +1014,11 @@ "Type": { "$id": "147", "Kind": "array", + "Name": "ArrayWhatsAppMessageTemplateBindingsComponent", "ValueType": { "$ref": "143" - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": false, "IsReadOnly": false @@ -1023,9 +1031,11 @@ "Type": { "$id": "149", "Kind": "array", + "Name": "ArrayWhatsAppMessageTemplateBindingsComponent", "ValueType": { "$ref": "143" - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": false, "IsReadOnly": false @@ -1038,6 +1048,7 @@ "Type": { "$id": "151", "Kind": "array", + "Name": "ArrayWhatsAppMessageTemplateBindingsButton", "ValueType": { "$id": "152", "Kind": "model", @@ -1070,7 +1081,8 @@ "IsReadOnly": false } ] - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": false, "IsReadOnly": false @@ -1152,6 +1164,7 @@ "Type": { "$id": "158", "Kind": "array", + "Name": "ArrayMessageReceipt", "ValueType": { "$id": "159", "Kind": "model", @@ -1185,7 +1198,8 @@ "IsReadOnly": false } ] - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": true, "IsReadOnly": false @@ -1211,6 +1225,7 @@ "Type": { "$id": "166", "Kind": "array", + "Name": "ArrayMessageTemplateItem", "ValueType": { "$id": "167", "Kind": "model", @@ -1317,7 +1332,8 @@ ] } } - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": true, "IsReadOnly": false @@ -1363,8 +1379,7 @@ "Description": "The communication resource, for example https://my-resource.communication.azure.com", "Type": { "$id": "186", - "Kind": "uri", - "IsNullable": false + "Kind": "url" }, "Location": "Uri", "IsApiVersion": false, diff --git a/sdk/communication/Azure.Communication.PhoneNumbers/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.PhoneNumbers/src/Generated/Internal/RequestContentHelper.cs index 18068f522ffcd..91958f76b5aaa 100644 --- a/sdk/communication/Azure.Communication.PhoneNumbers/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.PhoneNumbers/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.Rooms/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.Rooms/src/Generated/Internal/RequestContentHelper.cs index 0549d381562d4..82e65eccb441a 100644 --- a/sdk/communication/Azure.Communication.Rooms/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.Rooms/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.ShortCodes/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.ShortCodes/src/Generated/Internal/RequestContentHelper.cs index d450134fd7331..01b12e41ad8b2 100644 --- a/sdk/communication/Azure.Communication.ShortCodes/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.ShortCodes/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.Sms/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.Sms/src/Generated/Internal/RequestContentHelper.cs index 658d4b29c32ed..52439354697cd 100644 --- a/sdk/communication/Azure.Communication.Sms/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.Sms/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Internal/RequestContentHelper.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Internal/RequestContentHelper.cs index c2158fbacc58c..d538bf4553f96 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { From 32467e3fb84fcf148aafc188267b8726e1b729be Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Thu, 4 Jul 2024 14:31:35 +0800 Subject: [PATCH 9/9] update identity version --- .../TimeSeriesInsightsClientSample.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/samples/TimeSeriesInsightsClientSample/TimeSeriesInsightsClientSample.csproj b/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/samples/TimeSeriesInsightsClientSample/TimeSeriesInsightsClientSample.csproj index dda79dd416a2d..d577358b041d1 100644 --- a/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/samples/TimeSeriesInsightsClientSample/TimeSeriesInsightsClientSample.csproj +++ b/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/samples/TimeSeriesInsightsClientSample/TimeSeriesInsightsClientSample.csproj @@ -12,7 +12,7 @@ - +