void ReadTargetTables(BinaryReader br) { int dep_len = br.ReadInt32(); dep_data = BinaryHelper.ReadRawInts(br, dep_len); BinaryHelper.ExpectDelimiter(br); int name_len = br.ReadInt32(); target_name_data = br.ReadBytes(name_len); }
bool LoadInternal(Stream s, IWarningLogger log) { BinaryReader br = new BinaryReader(s); // 4-byte identification header. byte[] b = br.ReadBytes(4); if (b[0] != (byte)'M' || b[1] != (byte)'B' || b[2] != (byte)'G' || b[3] != BinaryFormatIdent) { log.Error(1012, "Invalid header in saved graph file", null); return(true); } // 32-bit int check for endianness if (BinaryHelper.ReadRawInt(br) != 0x01B2C3D4) { log.Error(1012, "Endianness change in saved graph file", null); return(true); } // Actual data ReadProjectInfo(br); BinaryHelper.ExpectDelimiter(br); ReadDependents(br); BinaryHelper.ExpectDelimiter(br); ReadTags(br); BinaryHelper.ExpectDelimiter(br); ReadTargetTables(br); BinaryHelper.ExpectDelimiter(br); ReadProviders(br); BinaryHelper.ExpectDelimiter(br); ReadTagTable(br); BinaryHelper.ExpectDelimiter(br); ReadTypeTable(br); BinaryHelper.ExpectDelimiter(br); ReadResultTable(br); return(false); }