private void WriteHeader(IWriter writer) { // Update tagname and stringid info (so. ugly.) _header.FileNameCount = _fileNames.Count; _header.StringIDCount = _stringIds.Count; // Serialize and write the header StructureValueCollection values = _header.Serialize(_languageInfo.LocaleArea); writer.SeekTo(0); StructureWriter.WriteStructure(values, _buildInfo.Layouts.GetLayout("header"), writer); }
private int WriteHeader(IWriter writer) { // Update tagname and stringid info (so. ugly.) _header.FileNameCount = _fileNames.Count; _header.StringIDCount = _stringIds.Count; // Serialize and write the header StructureValueCollection values = _header.Serialize(_languageInfo.LocaleArea); StructureLayout headerLayout = _buildInfo.Layouts.GetLayout("header"); writer.SeekTo(0); StructureWriter.WriteStructure(values, headerLayout, writer); int checksumOffset = -1; if (headerLayout.HasField("checksum")) { checksumOffset = headerLayout.GetFieldOffset("checksum"); } return(checksumOffset); }