Update latest-codegen to be net8.0
This commit is contained in:
Родитель
03da09d5e0
Коммит
b427ef7262
|
@ -201,9 +201,9 @@ Options:
|
|||
# Codegen Options
|
||||
|
||||
compatible-codegen Bindings should be generated with .NET Standard 2.0 compatibility. Setting this disables preview code generation.
|
||||
default-codegen Bindings should be generated for the current LTS version of .NET/C#. This is currently .NET 6/C# 10.
|
||||
latest-codegen Bindings should be generated for the current STS version of .NET/C#. This is currently .NET 7/C# 11.
|
||||
preview-codegen Bindings should be generated for the preview version of .NET/C#. This is currently .NET 8/C# 12.
|
||||
default-codegen Bindings should be generated for the previous LTS version of .NET/C#. This is currently .NET 6/C# 10.
|
||||
latest-codegen Bindings should be generated for the current LTS/STS version of .NET/C#. This is currently .NET 8/C# 12.
|
||||
preview-codegen Bindings should be generated for the preview version of .NET/C#. This is currently .NET 9/C# 13.
|
||||
|
||||
# File Options
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ internal partial class CSharpOutputBuilder
|
|||
|
||||
WriteIndented("ReadOnlySpan<byte> data = ");
|
||||
|
||||
if (_config.GeneratePreviewCode)
|
||||
if (_config.GenerateLatestCode)
|
||||
{
|
||||
WriteLine('[');
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ internal partial class CSharpOutputBuilder
|
|||
WriteNewline();
|
||||
DecreaseIndentation();
|
||||
|
||||
if (_config.GeneratePreviewCode)
|
||||
if (_config.GenerateLatestCode)
|
||||
{
|
||||
WriteIndented(']');
|
||||
}
|
||||
|
|
|
@ -2903,7 +2903,7 @@ public partial class PInvokeGenerator
|
|||
AddDiagnostic(DiagnosticLevel.Info, $"{escapedName} (constant array field) has a size of 0", constantOrIncompleteArray);
|
||||
}
|
||||
|
||||
if (!_config.GeneratePreviewCode || (totalSize <= 1) || isUnsafeElementType)
|
||||
if (!_config.GenerateLatestCode || (totalSize <= 1) || isUnsafeElementType)
|
||||
{
|
||||
totalSizeString = null;
|
||||
}
|
||||
|
|
|
@ -1503,7 +1503,7 @@ public partial class PInvokeGenerator
|
|||
|
||||
outputBuilder.WriteIndented("ReadOnlySpan<byte> data = ");
|
||||
|
||||
if (_config.GeneratePreviewCode)
|
||||
if (_config.GenerateLatestCode)
|
||||
{
|
||||
outputBuilder.WriteLine("[");
|
||||
}
|
||||
|
@ -1519,7 +1519,7 @@ public partial class PInvokeGenerator
|
|||
outputBuilder.WriteNewline();
|
||||
outputBuilder.DecreaseIndentation();
|
||||
|
||||
if (_config.GeneratePreviewCode)
|
||||
if (_config.GenerateLatestCode)
|
||||
{
|
||||
outputBuilder.WriteIndented(']');
|
||||
}
|
||||
|
@ -2553,7 +2553,7 @@ public partial class PInvokeGenerator
|
|||
|
||||
case CX_CLK_UTF32:
|
||||
{
|
||||
if (_config.GeneratePreviewCode)
|
||||
if (_config.GenerateLatestCode)
|
||||
{
|
||||
outputBuilder.Write('[');
|
||||
}
|
||||
|
@ -2574,7 +2574,7 @@ public partial class PInvokeGenerator
|
|||
|
||||
outputBuilder.Write("0x00000000");
|
||||
|
||||
if (_config.GeneratePreviewCode)
|
||||
if (_config.GenerateLatestCode)
|
||||
{
|
||||
outputBuilder.Write(']');
|
||||
}
|
||||
|
|
|
@ -174,7 +174,9 @@ public static class Program
|
|||
new TwoColumnHelpRow("generate-unmanaged-constants", "Unmanaged constants should be generated using static ref readonly properties. This is currently experimental."),
|
||||
new TwoColumnHelpRow("generate-vtbl-index-attribute", "[VtblIndex(#)] attribute should be generated to document the underlying VTBL index for a helper method."),
|
||||
|
||||
// Logging Options
|
||||
new TwoColumnHelpRow("", ""),
|
||||
new TwoColumnHelpRow("# Logging Options", ""),
|
||||
new TwoColumnHelpRow("", ""),
|
||||
|
||||
new TwoColumnHelpRow("log-exclusions", "A list of excluded declaration types should be generated. This will also log if the exclusion was due to an exact or partial match."),
|
||||
new TwoColumnHelpRow("log-potential-typedef-remappings", "A list of potential typedef remappings should be generated. This can help identify missing remappings."),
|
||||
|
|
|
@ -591,9 +591,7 @@ struct MyOtherStruct
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
{{
|
||||
|
@ -607,23 +605,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyStruct[3]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyStruct e0;
|
||||
public MyStruct e1;
|
||||
public MyStruct e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyStruct this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyStruct> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -645,9 +630,7 @@ struct MyOtherStruct
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
{{
|
||||
|
@ -661,55 +644,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyStruct[2][1][3][4]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(2 * 1 * 3 * 4)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyStruct e0_0_0_0;
|
||||
public MyStruct e1_0_0_0;
|
||||
|
||||
public MyStruct e0_0_1_0;
|
||||
public MyStruct e1_0_1_0;
|
||||
|
||||
public MyStruct e0_0_2_0;
|
||||
public MyStruct e1_0_2_0;
|
||||
|
||||
public MyStruct e0_0_0_1;
|
||||
public MyStruct e1_0_0_1;
|
||||
|
||||
public MyStruct e0_0_1_1;
|
||||
public MyStruct e1_0_1_1;
|
||||
|
||||
public MyStruct e0_0_2_1;
|
||||
public MyStruct e1_0_2_1;
|
||||
|
||||
public MyStruct e0_0_0_2;
|
||||
public MyStruct e1_0_0_2;
|
||||
|
||||
public MyStruct e0_0_1_2;
|
||||
public MyStruct e1_0_1_2;
|
||||
|
||||
public MyStruct e0_0_2_2;
|
||||
public MyStruct e1_0_2_2;
|
||||
|
||||
public MyStruct e0_0_0_3;
|
||||
public MyStruct e1_0_0_3;
|
||||
|
||||
public MyStruct e0_0_1_3;
|
||||
public MyStruct e1_0_1_3;
|
||||
|
||||
public MyStruct e0_0_2_3;
|
||||
public MyStruct e1_0_2_3;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyStruct this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyStruct> AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -733,9 +671,7 @@ struct MyOtherStruct
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
{{
|
||||
|
@ -749,23 +685,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyBuffer"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyStruct e0;
|
||||
public MyStruct e1;
|
||||
public MyStruct e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyStruct this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyStruct> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -787,9 +710,7 @@ struct MyOtherStruct
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
{{
|
||||
|
@ -804,23 +725,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyStruct[3]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyStruct e0;
|
||||
public MyStruct e1;
|
||||
public MyStruct e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyStruct this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyStruct> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -1136,6 +1044,7 @@ struct MyStruct
|
|||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
|
@ -1274,24 +1183,10 @@ namespace ClangSharp.Test
|
|||
public {expectedManagedType} value2;
|
||||
}}
|
||||
|
||||
[InlineArray(4)]
|
||||
public partial struct _buffer2_e__FixedBuffer
|
||||
{{
|
||||
public MyUnion e0;
|
||||
public MyUnion e1;
|
||||
public MyUnion e2;
|
||||
public MyUnion e3;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyUnion this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyUnion> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
|
|
@ -350,8 +350,7 @@ union MyOtherUnion
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
|
@ -370,23 +369,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyUnion[3]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyUnion e0;
|
||||
public MyUnion e1;
|
||||
public MyUnion e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyUnion this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyUnion> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -408,8 +394,7 @@ union MyOtherUnion
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
|
@ -428,55 +413,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyUnion[2][1][3][4]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(2 * 1 * 3 * 4)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyUnion e0_0_0_0;
|
||||
public MyUnion e1_0_0_0;
|
||||
|
||||
public MyUnion e0_0_1_0;
|
||||
public MyUnion e1_0_1_0;
|
||||
|
||||
public MyUnion e0_0_2_0;
|
||||
public MyUnion e1_0_2_0;
|
||||
|
||||
public MyUnion e0_0_0_1;
|
||||
public MyUnion e1_0_0_1;
|
||||
|
||||
public MyUnion e0_0_1_1;
|
||||
public MyUnion e1_0_1_1;
|
||||
|
||||
public MyUnion e0_0_2_1;
|
||||
public MyUnion e1_0_2_1;
|
||||
|
||||
public MyUnion e0_0_0_2;
|
||||
public MyUnion e1_0_0_2;
|
||||
|
||||
public MyUnion e0_0_1_2;
|
||||
public MyUnion e1_0_1_2;
|
||||
|
||||
public MyUnion e0_0_2_2;
|
||||
public MyUnion e1_0_2_2;
|
||||
|
||||
public MyUnion e0_0_0_3;
|
||||
public MyUnion e1_0_0_3;
|
||||
|
||||
public MyUnion e0_0_1_3;
|
||||
public MyUnion e1_0_1_3;
|
||||
|
||||
public MyUnion e0_0_2_3;
|
||||
public MyUnion e1_0_2_3;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyUnion this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyUnion> AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -500,8 +440,7 @@ union MyOtherUnion
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
|
@ -520,23 +459,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyBuffer"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyUnion e0;
|
||||
public MyUnion e1;
|
||||
public MyUnion e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyUnion this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyUnion> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -558,8 +484,7 @@ union MyOtherUnion
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
|
@ -579,23 +504,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyUnion[3]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyUnion e0;
|
||||
public MyUnion e1;
|
||||
public MyUnion e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyUnion this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyUnion> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
|
|
@ -599,9 +599,7 @@ struct MyOtherStruct
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
{{
|
||||
|
@ -615,23 +613,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyStruct[3]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyStruct e0;
|
||||
public MyStruct e1;
|
||||
public MyStruct e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyStruct this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyStruct> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -653,9 +638,7 @@ struct MyOtherStruct
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
{{
|
||||
|
@ -669,55 +652,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyStruct[2][1][3][4]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(2 * 1 * 3 * 4)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyStruct e0_0_0_0;
|
||||
public MyStruct e1_0_0_0;
|
||||
|
||||
public MyStruct e0_0_1_0;
|
||||
public MyStruct e1_0_1_0;
|
||||
|
||||
public MyStruct e0_0_2_0;
|
||||
public MyStruct e1_0_2_0;
|
||||
|
||||
public MyStruct e0_0_0_1;
|
||||
public MyStruct e1_0_0_1;
|
||||
|
||||
public MyStruct e0_0_1_1;
|
||||
public MyStruct e1_0_1_1;
|
||||
|
||||
public MyStruct e0_0_2_1;
|
||||
public MyStruct e1_0_2_1;
|
||||
|
||||
public MyStruct e0_0_0_2;
|
||||
public MyStruct e1_0_0_2;
|
||||
|
||||
public MyStruct e0_0_1_2;
|
||||
public MyStruct e1_0_1_2;
|
||||
|
||||
public MyStruct e0_0_2_2;
|
||||
public MyStruct e1_0_2_2;
|
||||
|
||||
public MyStruct e0_0_0_3;
|
||||
public MyStruct e1_0_0_3;
|
||||
|
||||
public MyStruct e0_0_1_3;
|
||||
public MyStruct e1_0_1_3;
|
||||
|
||||
public MyStruct e0_0_2_3;
|
||||
public MyStruct e1_0_2_3;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyStruct this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyStruct> AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -741,9 +679,7 @@ struct MyOtherStruct
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
{{
|
||||
|
@ -757,23 +693,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyBuffer"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyStruct e0;
|
||||
public MyStruct e1;
|
||||
public MyStruct e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyStruct this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyStruct> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -795,9 +718,7 @@ struct MyOtherStruct
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
{{
|
||||
|
@ -812,23 +733,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyStruct[3]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyStruct e0;
|
||||
public MyStruct e1;
|
||||
public MyStruct e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyStruct this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyStruct> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -1144,6 +1052,7 @@ struct MyStruct
|
|||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
|
@ -1282,24 +1191,10 @@ namespace ClangSharp.Test
|
|||
public {expectedManagedType} value2;
|
||||
}}
|
||||
|
||||
[InlineArray(4)]
|
||||
public partial struct _buffer2_e__FixedBuffer
|
||||
{{
|
||||
public MyUnion e0;
|
||||
public MyUnion e1;
|
||||
public MyUnion e2;
|
||||
public MyUnion e3;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyUnion this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyUnion> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
|
|
@ -356,8 +356,7 @@ union MyOtherUnion
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
|
@ -376,23 +375,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyUnion[3]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyUnion e0;
|
||||
public MyUnion e1;
|
||||
public MyUnion e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyUnion this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyUnion> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -414,8 +400,7 @@ union MyOtherUnion
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
|
@ -434,55 +419,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyUnion[2][1][3][4]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(2 * 1 * 3 * 4)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyUnion e0_0_0_0;
|
||||
public MyUnion e1_0_0_0;
|
||||
|
||||
public MyUnion e0_0_1_0;
|
||||
public MyUnion e1_0_1_0;
|
||||
|
||||
public MyUnion e0_0_2_0;
|
||||
public MyUnion e1_0_2_0;
|
||||
|
||||
public MyUnion e0_0_0_1;
|
||||
public MyUnion e1_0_0_1;
|
||||
|
||||
public MyUnion e0_0_1_1;
|
||||
public MyUnion e1_0_1_1;
|
||||
|
||||
public MyUnion e0_0_2_1;
|
||||
public MyUnion e1_0_2_1;
|
||||
|
||||
public MyUnion e0_0_0_2;
|
||||
public MyUnion e1_0_0_2;
|
||||
|
||||
public MyUnion e0_0_1_2;
|
||||
public MyUnion e1_0_1_2;
|
||||
|
||||
public MyUnion e0_0_2_2;
|
||||
public MyUnion e1_0_2_2;
|
||||
|
||||
public MyUnion e0_0_0_3;
|
||||
public MyUnion e1_0_0_3;
|
||||
|
||||
public MyUnion e0_0_1_3;
|
||||
public MyUnion e1_0_1_3;
|
||||
|
||||
public MyUnion e0_0_2_3;
|
||||
public MyUnion e1_0_2_3;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyUnion this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyUnion> AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -506,8 +446,7 @@ union MyOtherUnion
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
|
@ -526,23 +465,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyBuffer"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyUnion e0;
|
||||
public MyUnion e1;
|
||||
public MyUnion e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyUnion this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyUnion> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
@ -564,8 +490,7 @@ union MyOtherUnion
|
|||
}};
|
||||
";
|
||||
|
||||
var expectedOutputContents = $@"using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
var expectedOutputContents = $@"using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ClangSharp.Test
|
||||
|
@ -585,23 +510,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""MyUnion[3]"")]
|
||||
public _c_e__FixedBuffer c;
|
||||
|
||||
[InlineArray(3)]
|
||||
public partial struct _c_e__FixedBuffer
|
||||
{{
|
||||
public MyUnion e0;
|
||||
public MyUnion e1;
|
||||
public MyUnion e2;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref MyUnion this[int index]
|
||||
{{
|
||||
get
|
||||
{{
|
||||
return ref AsSpan()[index];
|
||||
}}
|
||||
}}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<MyUnion> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
|
|
@ -541,28 +541,10 @@ struct MyOtherStruct
|
|||
<type native=""MyStruct[3]"" count=""3"" fixed=""_c_e__FixedBuffer"">MyStruct</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyStruct</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyStruct></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -598,91 +580,10 @@ struct MyOtherStruct
|
|||
<type native=""MyStruct[2][1][3][4]"" count=""2 * 1 * 3 * 4"" fixed=""_c_e__FixedBuffer"">MyStruct</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(2 * 1 * 3 * 4)</attribute>
|
||||
<field name=""e0_0_0_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyStruct</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyStruct></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0_0_0_0, 24);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -720,28 +621,10 @@ struct MyOtherStruct
|
|||
<type native=""MyBuffer"" count=""3"" fixed=""_c_e__FixedBuffer"">MyStruct</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyStruct</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyStruct></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -777,28 +660,10 @@ struct MyOtherStruct
|
|||
<type native=""MyStruct[3]"" count=""3"" fixed=""_c_e__FixedBuffer"">MyStruct</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyStruct</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyStruct></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -1189,31 +1054,10 @@ struct MyStruct
|
|||
</field>
|
||||
</struct>
|
||||
<struct name=""_buffer2_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(4)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyUnion</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyUnion></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 4);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</struct>
|
||||
|
|
|
@ -308,28 +308,10 @@ union MyOtherUnion
|
|||
<type native=""MyUnion[3]"" count=""3"" fixed=""_c_e__FixedBuffer"">MyUnion</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyUnion</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyUnion></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -365,91 +347,10 @@ union MyOtherUnion
|
|||
<type native=""MyUnion[2][1][3][4]"" count=""2 * 1 * 3 * 4"" fixed=""_c_e__FixedBuffer"">MyUnion</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(2 * 1 * 3 * 4)</attribute>
|
||||
<field name=""e0_0_0_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyUnion</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyUnion></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0_0_0_0, 24);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -487,28 +388,10 @@ union MyOtherUnion
|
|||
<type native=""MyBuffer"" count=""3"" fixed=""_c_e__FixedBuffer"">MyUnion</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyUnion</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyUnion></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -544,28 +427,10 @@ union MyOtherUnion
|
|||
<type native=""MyUnion[3]"" count=""3"" fixed=""_c_e__FixedBuffer"">MyUnion</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyUnion</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyUnion></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
|
|
@ -553,28 +553,10 @@ struct MyOtherStruct
|
|||
<type native=""MyStruct[3]"" count=""3"" fixed=""_c_e__FixedBuffer"">MyStruct</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyStruct</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyStruct></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -610,91 +592,10 @@ struct MyOtherStruct
|
|||
<type native=""MyStruct[2][1][3][4]"" count=""2 * 1 * 3 * 4"" fixed=""_c_e__FixedBuffer"">MyStruct</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(2 * 1 * 3 * 4)</attribute>
|
||||
<field name=""e0_0_0_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_3"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyStruct</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyStruct></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0_0_0_0, 24);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -732,28 +633,10 @@ struct MyOtherStruct
|
|||
<type native=""MyBuffer"" count=""3"" fixed=""_c_e__FixedBuffer"">MyStruct</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyStruct</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyStruct></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -789,28 +672,10 @@ struct MyOtherStruct
|
|||
<type native=""MyStruct[3]"" count=""3"" fixed=""_c_e__FixedBuffer"">MyStruct</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyStruct</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyStruct</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyStruct></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -1201,31 +1066,10 @@ struct MyStruct
|
|||
</field>
|
||||
</struct>
|
||||
<struct name=""_buffer2_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(4)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyUnion</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyUnion></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 4);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</struct>
|
||||
|
|
|
@ -314,28 +314,10 @@ union MyOtherUnion
|
|||
<type native=""MyUnion[3]"" count=""3"" fixed=""_c_e__FixedBuffer"">MyUnion</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyUnion</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyUnion></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -371,91 +353,10 @@ union MyOtherUnion
|
|||
<type native=""MyUnion[2][1][3][4]"" count=""2 * 1 * 3 * 4"" fixed=""_c_e__FixedBuffer"">MyUnion</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(2 * 1 * 3 * 4)</attribute>
|
||||
<field name=""e0_0_0_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_0_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_0_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_1_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_1_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e0_0_2_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1_0_2_3"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyUnion</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyUnion></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0_0_0_0, 24);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -493,28 +394,10 @@ union MyOtherUnion
|
|||
<type native=""MyBuffer"" count=""3"" fixed=""_c_e__FixedBuffer"">MyUnion</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyUnion</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyUnion></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
@ -550,28 +433,10 @@ union MyOtherUnion
|
|||
<type native=""MyUnion[3]"" count=""3"" fixed=""_c_e__FixedBuffer"">MyUnion</type>
|
||||
</field>
|
||||
<struct name=""_c_e__FixedBuffer"" access=""public"">
|
||||
<attribute>InlineArray(3)</attribute>
|
||||
<field name=""e0"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e1"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<field name=""e2"" access=""public"">
|
||||
<type>MyUnion</type>
|
||||
</field>
|
||||
<indexer access=""public"">
|
||||
<type>ref MyUnion</type>
|
||||
<param name=""index"">
|
||||
<type>int</type>
|
||||
</param>
|
||||
<get>
|
||||
<code>return ref AsSpan()[index];</code>
|
||||
</get>
|
||||
</indexer>
|
||||
<function name=""AsSpan"" access=""public"">
|
||||
<type>Span<MyUnion></type>
|
||||
<code>MemoryMarshal.CreateSpan(ref e0, 3);</code>
|
||||
</function>
|
||||
</struct>
|
||||
</struct>
|
||||
</namespace>
|
||||
|
|
Загрузка…
Ссылка в новой задаче