/// <summary> /// Deserialize from a specific file location. /// </summary> /// <param name="outputFileName"></param> public void Deserialize(string indexFileName) { using (var fs = new FileStream(indexFileName, FileMode.Open)) { using (var zip = new ZipArchive(fs)) { using (StreamReader sr = new StreamReader(zip.Entries.First().Open())) { using (var input = new CodedInputStream(sr.BaseStream)) { KeyWordsDictionary = StringToArticlesDictionary.Parser.ParseFrom(input); } } } } }
/// <summary> /// Ctor. /// </summary> public ArticlesHub() { KeyWordsDictionary = new StringToArticlesDictionary(); }