Add conversion support for long type in ObjectConverter

The ObjectConverter file has been updated to support conversion of 'long' type. This is done by adding an additional conditional statement for checking the underlying source type for 'long', then returning the converted value.
This commit is contained in:
Sipke Schoorstra 2023-12-18 16:12:01 +01:00
parent 3aedf27727
commit 8ceb76ddbe

View file

@ -167,6 +167,9 @@ public static class ObjectConverter
if (underlyingSourceType == typeof(double))
return Enum.ToObject(underlyingTargetType, Convert.ChangeType(value, typeof(int)));
if (underlyingSourceType == typeof(long))
return Enum.ToObject(underlyingTargetType, Convert.ChangeType(value, typeof(int)));
}
if (value is string s)