mirror of
https://github.com/AlexMacocian/SystemExtensions.git
synced 2026-07-15 14:19:29 +00:00
Fix from managed to fixed array
This commit is contained in:
@@ -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());");
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user