public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as MedicinalProductManufactured; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (ManufacturedDoseForm != null) { dest.ManufacturedDoseForm = (Hl7.Fhir.Model.CodeableConcept)ManufacturedDoseForm.DeepCopy(); } if (UnitOfPresentation != null) { dest.UnitOfPresentation = (Hl7.Fhir.Model.CodeableConcept)UnitOfPresentation.DeepCopy(); } if (Quantity != null) { dest.Quantity = (Hl7.Fhir.Model.Quantity)Quantity.DeepCopy(); } if (Manufacturer != null) { dest.Manufacturer = new List <Hl7.Fhir.Model.ResourceReference>(Manufacturer.DeepCopy()); } if (Ingredient != null) { dest.Ingredient = new List <Hl7.Fhir.Model.ResourceReference>(Ingredient.DeepCopy()); } if (PhysicalCharacteristics != null) { dest.PhysicalCharacteristics = (Hl7.Fhir.Model.ProdCharacteristic)PhysicalCharacteristics.DeepCopy(); } if (OtherCharacteristics != null) { dest.OtherCharacteristics = new List <Hl7.Fhir.Model.CodeableConcept>(OtherCharacteristics.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as PackageItemComponent; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Quantity != null) { dest.Quantity = (Hl7.Fhir.Model.Quantity)Quantity.DeepCopy(); } if (Material != null) { dest.Material = new List <Hl7.Fhir.Model.CodeableConcept>(Material.DeepCopy()); } if (AlternateMaterial != null) { dest.AlternateMaterial = new List <Hl7.Fhir.Model.CodeableConcept>(AlternateMaterial.DeepCopy()); } if (Device != null) { dest.Device = new List <Hl7.Fhir.Model.ResourceReference>(Device.DeepCopy()); } if (ManufacturedItem != null) { dest.ManufacturedItem = new List <Hl7.Fhir.Model.ResourceReference>(ManufacturedItem.DeepCopy()); } if (PackageItem != null) { dest.PackageItem = new List <Hl7.Fhir.Model.MedicinalProductPackaged.PackageItemComponent>(PackageItem.DeepCopy()); } if (PhysicalCharacteristics != null) { dest.PhysicalCharacteristics = (Hl7.Fhir.Model.ProdCharacteristic)PhysicalCharacteristics.DeepCopy(); } if (OtherCharacteristics != null) { dest.OtherCharacteristics = new List <Hl7.Fhir.Model.CodeableConcept>(OtherCharacteristics.DeepCopy()); } if (ShelfLifeStorage != null) { dest.ShelfLifeStorage = new List <Hl7.Fhir.Model.ProductShelfLife>(ShelfLifeStorage.DeepCopy()); } if (Manufacturer != null) { dest.Manufacturer = new List <Hl7.Fhir.Model.ResourceReference>(Manufacturer.DeepCopy()); } return(dest); }