public static void reopen(PartOfSpeech p) { WNDBpart w = WNDBpart.of(p); w.index.Close(); w.data.Close(); w.index = new StreamReader(IndexFile(p)); w.data = new StreamReader(DataFile(p)); }
public static MemoryStream index(PartOfSpeech p) //StreamReader index(PartOfSpeech p) { if (laststr == ((System.IO.FileStream)(WNDBpart.of(p).index.BaseStream)).Name) { return(ms); //WNDBpart.of(p).index; } else { laststr = ((System.IO.FileStream)(WNDBpart.of(p).index.BaseStream)).Name; StreamReader fs = WNDBpart.of(p).index; fs.BaseStream.Position = 0; Byte[] b = System.Text.Encoding.Unicode.GetBytes(fs.ReadToEnd()); ms = new MemoryStream(b); return(ms); //WNDBpart.of(p).index; } }
public static StreamReader data(PartOfSpeech p) { return(WNDBpart.of(p).data); }
public static StreamReader index(PartOfSpeech p) { return(WNDBpart.of(p).index); }