示例#1
0
        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();
        }
示例#2
0
 public Memory(Friend friend)
 {
     this.Friend = friend;
     this.Persistent = new LongTermMemory();
 }
示例#3
0
 public Friend(LongTermMemory memory, Overseer overseer)
     : this(overseer)
 {
     Memory.Persistent = memory;
 }