Adopt collection expression syntax in generated code

このコミットが含まれているのは:
Sergio Pedri committed 2023-11-20 23:28:50 +01:00
1 親 d79fdeab71
コミット 48f3b847a7
7ファイル変更
+17 -17

検索条件に一致するファイルはありません

@@ -28,8 +28,8 @@ partial class D2DPixelShaderDescriptorGenerator
using (writer.WriteBlock())
{
writer.WriteLine("global::System.ReadOnlySpan<byte> bytes = new byte[]");
writer.WriteLine("{");
writer.WriteLine("global::System.ReadOnlySpan<byte> bytes =");
writer.WriteLine("[");
writer.IncreaseIndent();
// Write the bytes like so:
@@ -60,7 +60,7 @@ partial class D2DPixelShaderDescriptorGenerator
writer.WriteLine($"{SyntaxFormattingHelper.GetByteExpression(info.EffectId[14])},");
writer.WriteLine(SyntaxFormattingHelper.GetByteExpression(info.EffectId[15]));
writer.DecreaseIndent();
writer.WriteLine("};");
writer.WriteLine("];");
writer.WriteLine();
writer.WriteLine("return ref global::System.Runtime.CompilerServices.Unsafe.As<byte, global::System.Guid>(ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(bytes));");