public override void LoadData(BinaryReader reader, StructInstance instance) { StructDef structDef = GetIncludedStruct(); if (structDef.FieldLike) { instance.PushAddedCellHandler(cell => cell.Tag = Tag); } bool oldHidden = instance.HideAddedCells(_hidden); try { structDef.LoadInstanceData(instance, reader.BaseStream); } finally { if (structDef.FieldLike) { instance.PopAddedCellHandler(); } instance.HideAddedCells(oldHidden); } if (GetBoolAttribute("replace")) { instance.SetNodeName(structDef.Name); } }
public override void LoadData(BinaryReader reader, StructInstance instance) { StructDef structDef = GetIncludedStruct(); if (structDef.FieldLike) instance.PushAddedCellHandler(cell => cell.Tag = Tag); bool oldHidden = instance.HideAddedCells(_hidden); try { structDef.LoadInstanceData(instance, reader.BaseStream); } finally { if (structDef.FieldLike) instance.PopAddedCellHandler(); instance.HideAddedCells(oldHidden); } if (GetBoolAttribute("replace")) instance.SetNodeName(structDef.Name); }
public override void LoadData(BinaryReader reader, StructInstance instance) { instance.SetNodeName(GetExpressionAttribute("name").EvaluateString(instance)); }