Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DictionaryDetokenizer"/> class.
        /// </summary>
        /// <param name="dictionaryFile">The dictionary file.</param>
        /// <exception cref="System.ArgumentNullException"><paramref name="dictionaryFile"/></exception>
        /// <exception cref="System.IO.FileNotFoundException">The dictionary file does not exist.</exception>
        public DictionaryDetokenizer(FileInfo dictionaryFile)
        {
            if (dictionaryFile == null)
            {
                throw new ArgumentNullException("dictionaryFile");
            }

            if (!dictionaryFile.Exists)
            {
                throw new FileNotFoundException("The dictionary file does not exist.", dictionaryFile.FullName);
            }

            dictionary = new DetokenizationDictionary(dictionaryFile.OpenRead());
        }
Ejemplo n.º 2
0
 public DictionaryDetokenizer(DetokenizationDictionary dictionary)
 {
     this.dictionary = dictionary;
 }