private void CopyMembers(Card old) { this.keyword = old.keyword; this.rawValue = old.rawValue; this.comments = old.comments; }
public Card(Card old) { CopyMembers(old); }
public void ReadHeader() { // Make sure header is read only once if (!headerRead) { // Save start position headerPosition = Fits.ForwardStream.Position; Card card; do { card = new Card(); card.Read(Fits.ForwardStream); if (!cards.ContainsKey(card.Keyword)) { // *** TODO: handle comments if (!card.IsComment) { cards.Add(card.Keyword.ToUpper(), card); } } else { // *** TODO: Duplicate keys, throw new Exception(); } } while (!card.IsEnd); // Skip block Fits.SkipBlock(); dataPosition = Fits.ForwardStream.Position; headerRead = true; } }