public override void Save(RSFileWriter bw) { bw.WriteInt32(Nodes.Count); foreach (KeyValuePair <string, MNReferencedCore> obj in Nodes) { bw.WriteString(obj.Key); bw.WriteString(GOFile.InstanceToTag(obj.Value)); obj.Value.Save(bw); obj.Value.Modified = false; } Modified = false; }
public override void Load(RSFileReader br) { int count = br.ReadInt32(); string key = ""; string objType = ""; Nodes.Clear(); for (int i = 0; i < count; i++) { MNReferencedCore obj = null; key = br.ReadString(); objType = br.ReadString(); obj = GOFile.CreateInstance(objType); obj.Load(br); Nodes.Add(key, obj); } }