public virtual string ToString(object @object) { string classId = GetClassId(@object.GetType()); NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.ISerializer serializer = serializers[classId]; if (serializer != null) { return(serializer.ToString(@object)); } throw new System.Exception("toString not implemented for " + @object.GetType().FullName ); }
/// <exception cref="System.Exception"></exception> public virtual object FromOneString(string data) { int index = data.IndexOf(";"); if (index == -1) { return(null); } string type = NeoDatis.Tool.Wrappers.OdbString.Substring(data, 0, index); NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.ISerializer serializer = serializers[type]; if (serializer != null) { return(serializer.FromString(data)); } throw new System.Exception("fromString unimplemented for " + type); }