static void ExtractImportInfo(string test_results_path, Managers.TagIndex ti, TagInterface.TagGroup group, params string[] files) { int ti_dir_length = ti.Directory.Length; int group_length = group.Name.Length; foreach (string f in files) { var t = f.Substring(ti_dir_length); // remove tags dir t = t.Remove(t.Length - group_length - 1); // remove extension var tag_index = ti.Open(t, group); if (Managers.TagIndex.IsSentinel(tag_index)) continue; Assert.IsTrue(tag_index != Blam.DatumIndex.Null); var tagman = ti[tag_index]; var import_def = tagman.TagDefinition as Blam.Halo2.Tags.ITagImportInfo; ExtractImportInfo(import_def.GetImportInfo(), test_results_path); ti.Unload(tag_index); } }