public static void SaveToFile(LongTermMemory memoryPersistent) { EnsureFolderExists(); XmlSerializer serializer = new XmlSerializer(typeof(LongTermMemory)); StreamWriter sw = new StreamWriter(Path.Combine(FolderName, memoryPersistent.InternalId + ".xml")); serializer.Serialize(sw, memoryPersistent); sw.Close(); }
public Memory(Friend friend) { this.Friend = friend; this.Persistent = new LongTermMemory(); }
public Friend(LongTermMemory memory, Overseer overseer) : this(overseer) { Memory.Persistent = memory; }