Skip to content

Commit

Permalink
Update generated code (3.0.0-beta.20240711.1) (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
joseharriaga authored Jul 22, 2024
1 parent 3e12a62 commit 984168d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Generated/Internal/BinaryContentHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ public static BinaryContent FromEnumerable(IEnumerable<BinaryData> enumerable)
return content;
}

public static BinaryContent FromEnumerable<T>(ReadOnlySpan<T> span)
where T : notnull
{
Utf8JsonBinaryContent content = new Utf8JsonBinaryContent();
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 BinaryContent FromDictionary<TValue>(IDictionary<string, TValue> dictionary)
where TValue : notnull
{
Expand Down

0 comments on commit 984168d

Please sign in to comment.