private void WriteCaptions(CaptionModule module) { myWriter.Write(module.Items.Count()); foreach (var caption in module.Items) { myWriter.Write(caption.OwnerId); myWriter.Write(caption.Label); myWriter.Write(caption.DisplayText); } }
private void ReadCaptions(CaptionModule module) { var count = myReader.ReadInt32(); for (int i = 0; i < count; ++i) { var caption = new Caption(myReader.ReadString(), myReader.ReadString()); caption.DisplayText = myReader.ReadString(); module.Add(caption); } }