public TxtSummaryParser(Stream stream, string name) { if (!stream.CheckUTF8()) stream = stream.Win1251ToUTF8(); _reader = new StreamReader(stream); _name = Regex.Replace(name, "(\\.fb2|\\.txt)(\\.zip)?$", string.Empty); }
public HtmlSummaryParser(Stream stream, string fileName) { _stream = stream; if (!stream.CheckUTF8()) stream = stream.Win1251ToUTF8(); _stream.Position = 0; _reader = new StreamReader(stream); _name = Regex.Replace(fileName, "(\\.html|\\.htm)$", string.Empty); }