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
/// Gets whether the value of this Attribute has yet to be decoded.
@@ -125,7 +125,7 @@ public void DeferredLoad()
125
125
}
126
126
catch(Exceptionerr)
127
127
{
128
-
thrownewCodecException($"Deferred loading of attribute \"{Name}\" on element {((Element)Owner).ID} using {OwnerDatamodel.Codec} codec threw an exception.",err);
128
+
thrownewCodecException($"Deferred loading of attribute \"{Name}\" on element {((Element?)Owner)?.ID} using {OwnerDatamodel.Codec} codec threw an exception.",err);
129
129
}
130
130
Offset=0;
131
131
@@ -138,7 +138,7 @@ public void DeferredLoad()
138
138
/// </summary>
139
139
/// <exception cref="CodecException">Thrown when deferred value loading fails.</exception>
140
140
/// <exception cref="DestubException">Thrown when Element destubbing fails.</exception>
141
-
publicobjectValue
141
+
publicobject?Value
142
142
{
143
143
get
144
144
{
@@ -188,21 +188,24 @@ public object Value
188
188
if(arr_elem==null)continue;
189
189
elseif(arr_elem.Owner==null)
190
190
arr_elem.Owner=OwnerDatamodel;
191
-
elseif(arr_elem.Owner!=OwnerDatamodel)
192
-
thrownewElementOwnershipException("One or more Elements in the assigned collection are from a different Datamodel. Use ImportElement() to copy them to this one before assigning.");
191
+
192
+
// todo: remove ownership from values
193
+
// this is being printed on a debuggerdisplay output for some reason
194
+
// else if (arr_elem.Owner != OwnerDatamodel)
195
+
// throw new ElementOwnershipException("One or more Elements in the assigned collection are from a different Datamodel. Use ImportElement() to copy them to this one before assigning.");
193
196
}
194
197
}
195
198
196
199
_Value=value;
197
200
Offset=0;
198
201
}
199
202
}
200
-
object_Value;
203
+
object?_Value=null;
201
204
202
205
/// <summary>
203
206
/// Gets the Attribute's Value without attempting deferred loading or destubbing.
0 commit comments