You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -120,7 +119,7 @@ public static ILocoStruct ReadLocoStruct(ReadOnlySpan<byte> data, Type t)
120
119
vararrLength=0;
121
120
if(p.PropertyType.IsArray)
122
121
{
123
-
vararrLengthAttr=AttributeHelper.Get<LocoArrayLengthAttribute>(p)??thrownewArgumentOutOfRangeException(nameof(LocoArrayLengthAttribute),$"type {t} with property {p} didn't have LocoArrayLength attribute specified");
122
+
vararrLengthAttr=AttributeHelper.Get<LocoArrayLengthAttribute>(p)??thrownewArgumentOutOfRangeException(nameof(data),$"type {t} with property {p} didn't have LocoArrayLength attribute specified");
@@ -89,7 +80,6 @@ public static ReadOnlySpan<byte> WriteLocoStruct(ILocoStruct obj)
89
80
vart=obj.GetType();
90
81
varobjSize=ByteHelpers.GetObjectSize(t);
91
82
varbuf=newbyte[objSize];
92
-
varspan=buf.AsSpan();
93
83
94
84
foreach(varpint.GetProperties())
95
85
{
@@ -112,7 +102,7 @@ public static ReadOnlySpan<byte> WriteLocoStruct(ILocoStruct obj)
112
102
vararrLength=0;
113
103
if(p.PropertyType.IsArray)
114
104
{
115
-
vararrLengthAttr=AttributeHelper.Get<LocoArrayLengthAttribute>(p)??thrownewArgumentOutOfRangeException(nameof(LocoArrayLengthAttribute),$"type {t} with property {p} didn't have LocoArrayLength attribute specified");
105
+
vararrLengthAttr=AttributeHelper.Get<LocoArrayLengthAttribute>(p)??thrownewArgumentOutOfRangeException(nameof(obj),$"type {t} with property {p} didn't have LocoArrayLength attribute specified");
0 commit comments