Saxonite 1.2.11.12
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user