Disabled some error handling that was throwing errors erroneously
This commit is contained in:
@@ -4,12 +4,12 @@
|
|||||||
{
|
{
|
||||||
public void SetProperty<T>(ref T storage, T value, string name)
|
public void SetProperty<T>(ref T storage, T value, string name)
|
||||||
{
|
{
|
||||||
if (storage == null)
|
//if (storage == null)
|
||||||
throw new InvalidCastException("osrs_toolbox.ModelBase.UpdateProperty\nStorage cannot be null.");
|
//throw new InvalidCastException("osrs_toolbox.ModelBase.UpdateProperty\nStorage cannot be null.");
|
||||||
if (value == null)
|
if (value == null)
|
||||||
throw new InvalidCastException("osrs_toolbox.ModelBase.UpdateProperty\nValue cannot be null.");
|
throw new InvalidCastException("osrs_toolbox.ModelBase.UpdateProperty\nValue cannot be null.");
|
||||||
if (storage.GetType() != value.GetType())
|
//if (storage.GetType() != value.GetType())
|
||||||
throw new InvalidCastException("osrs_toolbox.ModelBase.UpdateProperty\nVariable type mismatch between storage and value.");
|
//throw new InvalidCastException("osrs_toolbox.ModelBase.UpdateProperty\nVariable type mismatch between storage and value.");
|
||||||
storage = value;
|
storage = value;
|
||||||
OnPropertyChanged(name);
|
OnPropertyChanged(name);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user