public virtual IAutoSaveAndLoad CloneObject() { IAutoSaveAndLoad result = (IAutoSaveAndLoad)System.Activator.CreateInstance(this.GetType()); var desc = IAutoSLClassDescManager.Instance.GetClassDesc(this.GetType()); foreach (IAutoSLField f in desc.Fields) { var i = f.Property; System.Type type = i.PropertyType; i.SetValue(result, i.GetValue(this, null), null); } return(result); }
public void Write(IAutoSaveAndLoad data) { data.PackageWrite(this); }
//void DeepCopy(byte[] addr) //{ // mHandle = new byte[addr.Length + 4]; // Buffer.BlockCopy(addr, 0, mHandle, 0, addr.Length); // mPos = 0; // mIsDeepCopy = true; //} #region Data Reader public void Read(IAutoSaveAndLoad result, bool bToClient) { result.DataRead(this, bToClient); }
public void Read(IAutoSaveAndLoad data) { data.PackageRead(this); }
public void Write(IAutoSaveAndLoad data, bool bToClient) { data.DataWrite(this, bToClient); }