Пример #1
0
 private TextFile(string fileName, int codePage, bool useBOM, string[] lines, IO.LineEndings lineEnding)
 {
     this._fileName = fileName;
     this._codePage = codePage;
     this._useBOM = useBOM;
     if ((lines == null) || (lines.Length == 0))
         this._lines = new List<IO.TextLine>();
     else
     {
         this._lines = new List<IO.TextLine>(lines.Length);
         foreach (string l in lines)
             this._lines.Add(new IO.TextLine(l));
     }
     this._lineEnding = lineEnding;
 }
Пример #2
0
 private TextFile(string fileName, int codePage, bool useBOM, string[] lines, IO.LineEndings lineEnding)
 {
     this._fileName = fileName;
     this._codePage = codePage;
     this._useBOM   = useBOM;
     if ((lines == null) || (lines.Length == 0))
     {
         this._lines = new List <IO.TextLine>();
     }
     else
     {
         this._lines = new List <IO.TextLine>(lines.Length);
         foreach (string l in lines)
         {
             this._lines.Add(new IO.TextLine(l));
         }
     }
     this._lineEnding = lineEnding;
 }