protected AbstractFile(GenericCharMap charmap, FFTTextFactory.FileInfo layout, IList <IList <string> > strings, string fileComments, IList <string> sectionComments, bool compressible) : this(charmap, layout, fileComments, sectionComments, compressible) { List <IList <string> > sections = new List <IList <string> >(NumberOfSections); for (int i = 0; i < NumberOfSections; i++) { int numEntries = Math.Max(strings[i].Count, layout.SectionLengths[i]); string[] thisSection = new string[numEntries]; strings[i].CopyTo(thisSection, 0); for (int index = strings[i].Count; index < numEntries; index++) { thisSection[index] = ""; } for (int j = 0; j < thisSection.Length; j++) { if (!CharMap.ValidateString(thisSection[j], layout.AllowedTerminators[0])) { throw new InvalidStringException(layout.Guid.ToString(), i, j, thisSection[j]); } } sections.Add(thisSection); } this.Sections = sections.AsReadOnly(); PopulateDisallowedSections(); }
protected AbstractFile(GenericCharMap charmap, FFTTextFactory.FileInfo layout, IList <IList <string> > strings, bool compressible) : this(charmap, layout, compressible) { List <IList <string> > sections = new List <IList <string> >(NumberOfSections); for (int i = 0; i < NumberOfSections; i++) { string[] thisSection = new string[strings[i].Count]; strings[i].CopyTo(thisSection, 0); for (int j = 0; j < thisSection.Length; j++) { if (!CharMap.ValidateString(thisSection[j])) { throw new InvalidStringException(layout.Guid.ToString(), i, j, thisSection[j]); } } sections.Add(thisSection); } this.Sections = sections.AsReadOnly(); PopulateDisallowedSections(); }
public SectionedFile(GenericCharMap map, FFTTextFactory.FileInfo layout, IList <IList <string> > strings, string fileComments, IList <string> sectionComments, bool compressed) : base(map, layout, strings, fileComments, sectionComments, compressed) { }
public SectionedFile(GenericCharMap map, FFTTextFactory.FileInfo layout, IList <IList <string> > strings, string fileComments, IList <string> sectionComments) : this(map, layout, strings, fileComments, sectionComments, false) { }
public PartitionedFile(GenericCharMap map, FFTTextFactory.FileInfo layout, IList <IList <string> > strings, string fileComments, IList <string> sectionComments) : base(map, layout, strings, fileComments, sectionComments, false) { PartitionSize = layout.Size / NumberOfSections; }
public CompressibleOneShotFile(GenericCharMap map, FFTTextFactory.FileInfo layout, IList <IList <string> > strings, string fileComments, IList <string> sectionComments) : base(map, layout, strings, fileComments, sectionComments, true) { }