Fix from managed to fixed array

This commit is contained in:
2025-05-20 18:41:39 +02:00
parent 7ec573098b
commit c63fd45e38
2 changed files with 2 additions and 2 deletions
@@ -127,7 +127,7 @@ public class FixedArrayGenerator : IIncrementalGenerator
builder.AppendLine(" }");
builder.AppendLine(" }");
builder.AppendLine();
builder.AppendLine($" public static {structName} FromBytes(byte[] array)");
builder.AppendLine($" public static {structName} From{capitalizedType}Array({targetType}[] array)");
builder.AppendLine(" {");
builder.AppendLine($" var arr = default({structName});");
builder.AppendLine(" array.AsSpan().CopyTo(arr.AsSpan());");
@@ -5,7 +5,7 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Alexandru Macocian</Authors>
<Description>Source generators extensions for netstandard2.0.</Description>
<Version>0.1.4</Version>
<Version>0.1.5</Version>
<LangVersion>latest</LangVersion>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>