Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new Engine object with the specified vocabulary.
 /// </summary>
 /// <param name="dictionary">The vocabulary to load in this instance.</param>
 public RantEngine(IRantDictionary dictionary)
 {
     if (dictionary == null)
     {
         throw new ArgumentNullException("dictionary");
     }
     _dictionary = dictionary;
 }
Ejemplo n.º 2
0
        private void LoadVocab(string path, NsfwFilter filter)
        {
            if (_dictionary != null)
            {
                return;
            }

            if (!String.IsNullOrEmpty(path))
            {
                _dictionary = RantDictionary.FromDirectory(path, filter);
            }
        }