public PublicationItem(PublicationType publicationType, string accession) { if (publicationType == null){ throw new NullReferenceException("Publication PublicationType can not set null!"); } if (accession == null){ throw new NullReferenceException("Publication accession can not empty!"); } this.publicationType = publicationType; this.accession = accession; }
public void AddPublicationItem(int id, PublicationType type, string accession) { Publication publication; if (!_publicationMap.ContainsKey(id)){ publication = new Publication(id); _publicationMap.Add(id, publication); } else{ publication = _publicationMap[id]; } publication.AddPublicationItem(new PublicationItem(type, accession)); }