public string DehydrateValue(object obj, IGraph uow) { Condition.Requires(obj).IsNotNull(); var name = obj.GetType().AssemblyQualifiedName; var data = BinarySerializationUtil.Serialize(obj); return(LengthEncoder.LengthEncodeList(name, data)); }
public string DehydrateValue(object obj, IGraph uow) { var ser = new BinarySerializationUtil(); var data = ser.Serialize(obj); //prepend the assembly qualified type name data = obj.GetType().AssemblyQualifiedName + GraphingDelimiters.DELIM_LEVEL1 + data; return data; }
public string DehydrateValue(object obj, IGraph uow) { var ser = new BinarySerializationUtil(); var data = ser.Serialize(obj); //prepend the assembly qualified type name data = obj.GetType().AssemblyQualifiedName + GraphingDelimiters.DELIM_LEVEL1 + data; return(data); }
public override string ToString() { return(BinarySerializationUtil.Serialize(this)); }
/// <summary> /// 自动序列化 /// </summary> /// <typeparam name="T">对象类型</typeparam> /// <param name="obj">对象</param> /// <returns></returns> protected virtual byte[] AutoSerialize <T>(T obj) { return(BinarySerializationUtil.Serialize(obj)); }