Пример #1
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ContainerComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (Identifier != null)
                    {
                        dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                    }
                    if (DescriptionElement != null)
                    {
                        dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                    }
                    if (Type != null)
                    {
                        dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
                    }
                    if (Capacity != null)
                    {
                        dest.Capacity = (Hl7.Fhir.Model.SimpleQuantity)Capacity.DeepCopy();
                    }
                    if (SpecimenQuantity != null)
                    {
                        dest.SpecimenQuantity = (Hl7.Fhir.Model.SimpleQuantity)SpecimenQuantity.DeepCopy();
                    }
                    if (Additive != null)
                    {
                        dest.Additive = (Hl7.Fhir.Model.Element)Additive.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }