示例#1
0
文件: Bot.cs 项目: Arsslensoft/ALFX
        /// <summary>
        /// Loads a dump of the graphmaster into memory so avoiding processing the AIML files again
        /// </summary>
        /// <param name="path">the path to the dump file</param>
        public void loadFromBinaryFile(string path)
        {
            FileStream      loadFile = File.OpenRead(path);
            BinaryFormatter bf       = new BinaryFormatter();

            this.Graphmaster = (Node)bf.Deserialize(loadFile);
            loadFile.Close();
        }
示例#2
0
文件: Bot.cs 项目: Arsslensoft/ALFX
 /// <summary>
 /// Instantiates the dictionary objects and collections associated with this class
 /// </summary>
 private void setup()
 {
     this.GlobalSettings       = new SettingsDictionary(this);
     this.GenderSubstitutions  = new SettingsDictionary(this);
     this.Person2Substitutions = new SettingsDictionary(this);
     this.PersonSubstitutions  = new SettingsDictionary(this);
     this.Substitutions        = new SettingsDictionary(this);
     this.DefaultPredicates    = new SettingsDictionary(this);
     this.CustomTags           = new Dictionary <string, TagHandler>();
     this.Graphmaster          = new Al.AI.AIML.Utils.Node();
 }