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
Copy file name to clipboardExpand all lines: AttributeList.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -215,12 +215,12 @@ public ICollection<object> Values
215
215
/// <exception cref="ElementOwnershipException">Thrown when an attempt is made to set the value of the attribute to an Element from a different <see cref="Datamodel"/>.</exception>
216
216
/// <exception cref="AttributeTypeException">Thrown when an attempt is made to set a value that is not of a valid Datamodel attribute type.</exception>
217
217
/// <exception cref="IndexOutOfRangeException">Thrown when the maximum number of Attributes allowed in an AttributeList has been reached.</exception>
Copy file name to clipboardExpand all lines: Datamodel.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -466,7 +466,7 @@ public int EncodingVersion
466
466
/// Gets or sets the first Element of the Datamodel. Only Elements referenced by the Root element or one of its children are considered a part of the Datamodel.
467
467
/// </summary>
468
468
/// <exception cref="ElementOwnershipException">Thown when an attempt is made to assign an Element from another Datamodel to this property.</exception>
Copy file name to clipboardExpand all lines: Element.cs
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -207,10 +207,10 @@ internal set
207
207
/// <exception cref="KeyNotFoundException">Thrown when an attempt is made to get a name that is not present on this Element.</exception>
208
208
publicT?Get<T>(stringname)
209
209
{
210
-
objectvalue=this[name];
210
+
object?value=this[name];
211
211
212
212
if(valueis not T&&!(typeof(T)==typeof(Element)&&value==null))
213
-
thrownewAttributeTypeException(string.Format("Attribute \"{0}\" ({1}) does not implement {2}.",name,value.GetType().Name,typeof(T).Name));
213
+
thrownewAttributeTypeException(string.Format("Attribute \"{0}\" ({1}) does not implement {2}.",name,value?.GetType().Name,typeof(T).Name));
214
214
215
215
return(T?)value;
216
216
}
@@ -233,7 +233,7 @@ internal set
233
233
}
234
234
catch(AttributeTypeException)
235
235
{
236
-
thrownewAttributeTypeException(string.Format("Attribute \"{0}\" ({1}) is not an array.",name,this[name].GetType().Name));
236
+
thrownewAttributeTypeException(string.Format("Attribute \"{0}\" ({1}) is not an array.",name,this[name]?.GetType().Name));
237
237
}
238
238
239
239
}
@@ -249,7 +249,7 @@ internal set
249
249
/// <exception cref="ElementOwnershipException">Thrown when an attempt is made to set the value of the attribute to an Element from a different <see cref="Datamodel"/>.</exception>
250
250
/// <exception cref="AttributeTypeException">Thrown when an attempt is made to set a value that is not of a valid Datamodel attribute type.</exception>
251
251
/// <exception cref="IndexOutOfRangeException">Thrown when the maximum number of Attributes allowed in an Element has been reached.</exception>
0 commit comments