/// <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(); }
/// <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 AIMLBot.Utils.Node(); }