Beispiel #1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as DeviceComponent;

            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 = (Hl7.Fhir.Model.Identifier)Identifier.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (LastSystemChangeElement != null)
            {
                dest.LastSystemChangeElement = (Hl7.Fhir.Model.Instant)LastSystemChangeElement.DeepCopy();
            }
            if (Source != null)
            {
                dest.Source = (Hl7.Fhir.Model.ResourceReference)Source.DeepCopy();
            }
            if (Parent != null)
            {
                dest.Parent = (Hl7.Fhir.Model.ResourceReference)Parent.DeepCopy();
            }
            if (OperationalStatus != null)
            {
                dest.OperationalStatus = new List <Hl7.Fhir.Model.CodeableConcept>(OperationalStatus.DeepCopy());
            }
            if (ParameterGroup != null)
            {
                dest.ParameterGroup = (Hl7.Fhir.Model.CodeableConcept)ParameterGroup.DeepCopy();
            }
            if (MeasurementPrincipleElement != null)
            {
                dest.MeasurementPrincipleElement = (Code <Hl7.Fhir.Model.DeviceComponent.MeasmntPrinciple>)MeasurementPrincipleElement.DeepCopy();
            }
            if (ProductionSpecification != null)
            {
                dest.ProductionSpecification = new List <Hl7.Fhir.Model.DeviceComponent.ProductionSpecificationComponent>(ProductionSpecification.DeepCopy());
            }
            if (LanguageCode != null)
            {
                dest.LanguageCode = (Hl7.Fhir.Model.CodeableConcept)LanguageCode.DeepCopy();
            }
            return(dest);
        }