public object GetObjectFromRecordValue(PropertyDatabaseRecordValue recordValue, PropertyStringTableView stringTableView) { if (!IsSupportedPropertyType(recordValue.propertyType)) { throw new ArgumentException($"Property type \"{recordValue.propertyType}\" of {nameof(recordValue)} is not supported."); } return(PropertyDatabaseSerializerManager.Deserialize(recordValue, stringTableView)); }
public PropertyDatabaseRecordValue CreateRecordValue(object value, PropertyStringTableView stringTableView) { if (!IsSupportedValue(value)) { throw new ArgumentException($"Type \"{value.GetType()}\" is not supported."); } return(PropertyDatabaseSerializerManager.Serialize(value, stringTableView)); }
public static bool IsSupportedPropertyType(byte propertyType) { return(PropertyDatabaseSerializerManager.DeserializerExists((PropertyDatabaseType)propertyType)); }
public static bool IsSupportedValue(object value) { var type = value.GetType(); return(PropertyDatabaseSerializerManager.SerializerExists(type)); }