public static Nested.Any0 WriteToTS(object obj) { Nested.Any0 ab = new Nested.Any0(); ab.dataKey = ".root"; BinarySerializable.GetByInstance(obj).WriteTo(obj, ab); return(ab); }
public void BytesToAnyValue() { if (string.IsNullOrEmpty(typeName)) { return; } var rt = new RefType(typeName); MonoSerialize.MergeFrom(rt.Instance, bytes, objs); anyValue = MonoSerialize.WriteToTS(rt.Instance); }
public void SaveToTS() { if (string.IsNullOrEmpty(typeName)) { return; } var rt = new RefType(typeName); MonoSerialize.MergeFrom(rt.Instance, bytes, objs); anyValue = MonoSerialize.WriteToTS(rt.Instance); bytesCrc32 = Crc32.To(bytes); bytesLength = bytes.Length; }
public void OnBeforeSerialize() { if (instance == null) { if (string.IsNullOrEmpty(typeName)) { bytes = null; if (objs != null) { objs.Clear(); } else { objs = new List <Object>(); } refType_ = null; instance = null; #if !CloseNested bytesLength = 0; bytesCrc32 = 0; anyValue = null; #endif } } else { if (!isDllChange()) { var ms = MonoSerialize.WriteTo(instance); bytes = ms.GetBytes(); objs = ms.objs; #if !CloseNested bytesCrc32 = Crc32.To(bytes); var ab = MonoSerialize.WriteToTS(instance); Nested.Any0.Blend(ab, anyValue); anyValue = (Nested.Any0)ab.clone(); bytesLength = bytes.Length; #endif } else { refType_ = null; instance = null; } } }
public void ResetNested() { anyValue = null; bytesCrc32 = 0; bytesLength = 0; }
public void ResetNested() { anyValue = null; }
public static void Blend(Any0 now, Any0 old) { AnyBase.Blend(now, old); }