Saxonite 1.2.11.12

This commit is contained in:
Andy Howard
2024-08-20 17:51:51 +01:00
parent 12aa285f32
commit 2eb778ac17
36 changed files with 149 additions and 121 deletions
+2 -3
View File
@@ -132,12 +132,11 @@ namespace Sarand.Net.Standard.Base.ItemData
public Data GetData () { return data.Clone(); }
public void SetData (Data data)
{
String fn = GetType().Name + ".SetData";
// Properties that cannot be changed if previously specified.
if (ItemId.Type >= 0 && ItemId.Type != data.ItemId.Type)
throw new NotSupportedException(fn + " Item type cannot be changed");
throw new NotSupportedException($"{SysUtil.Fn} Item type cannot be changed");
if (SysId.IsValid(ItemId.Id) && SysId.ToInt(ItemId.Id) != SysId.ToInt(data.ItemId.Id))
throw new NotSupportedException(fn + " Item Id cannot be changed");
throw new NotSupportedException($"{SysUtil.Fn} Item Id cannot be changed");
// Populate individual properties to ensure that 'Changed' indicator is kept up to date.
this.data.PopulateFrom(data);
}