diff --git a/SystemExtensions.NetStandard.Generators/FixedArrayGenerator.cs b/SystemExtensions.NetStandard.Generators/FixedArrayGenerator.cs index 89e2cd5..8d1b48e 100644 --- a/SystemExtensions.NetStandard.Generators/FixedArrayGenerator.cs +++ b/SystemExtensions.NetStandard.Generators/FixedArrayGenerator.cs @@ -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());"); diff --git a/SystemExtensions.NetStandard.Generators/SystemExtensions.NetStandard.Generators.csproj b/SystemExtensions.NetStandard.Generators/SystemExtensions.NetStandard.Generators.csproj index 0a80532..65f4ba1 100644 --- a/SystemExtensions.NetStandard.Generators/SystemExtensions.NetStandard.Generators.csproj +++ b/SystemExtensions.NetStandard.Generators/SystemExtensions.NetStandard.Generators.csproj @@ -5,7 +5,7 @@ true Alexandru Macocian Source generators extensions for netstandard2.0. - 0.1.4 + 0.1.5 latest true true