public static ITextBufferStrategy CreateTextBufferFromFile(string fileName) { if (!File.Exists(fileName)) { throw new System.IO.FileNotFoundException(fileName); } StringTextBufferStrategy s = new StringTextBufferStrategy(); s.SetContent(Util.FileReader.ReadFileContent(fileName, Encoding.Default)); return s; }
public static ITextBufferStrategy CreateTextBufferFromFile(string fileName) { if (!File.Exists(fileName)) { throw new System.IO.FileNotFoundException(fileName); } StringTextBufferStrategy s = new StringTextBufferStrategy(); s.SetContent(Util.FileReader.ReadFileContent(fileName, Encoding.Default)); return(s); }