예제 #1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Expression;

            if (dest == null)
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }

            base.CopyTo(dest);
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.Id)NameElement.DeepCopy();
            }
            if (LanguageElement != null)
            {
                dest.LanguageElement = (Hl7.Fhir.Model.Code)LanguageElement.DeepCopy();
            }
            if (ExpressionElement != null)
            {
                dest.ExpressionElement = (Hl7.Fhir.Model.FhirString)ExpressionElement.DeepCopy();
            }
            if (ReferenceElement != null)
            {
                dest.ReferenceElement = (Hl7.Fhir.Model.FhirUri)ReferenceElement.DeepCopy();
            }
            return(dest);
        }
예제 #2
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as IssueComponent;

                if (dest == null)
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }

                base.CopyTo(dest);
                if (SeverityElement != null)
                {
                    dest.SeverityElement = (Code <Hl7.Fhir.Model.OperationOutcome.IssueSeverity>)SeverityElement.DeepCopy();
                }
                if (CodeElement != null)
                {
                    dest.CodeElement = (Code <Hl7.Fhir.Model.OperationOutcome.IssueType>)CodeElement.DeepCopy();
                }
                if (Details != null)
                {
                    dest.Details = (Hl7.Fhir.Model.CodeableConcept)Details.DeepCopy();
                }
                if (DiagnosticsElement != null)
                {
                    dest.DiagnosticsElement = (Hl7.Fhir.Model.FhirString)DiagnosticsElement.DeepCopy();
                }
                if (LocationElement != null)
                {
                    dest.LocationElement = new List <Hl7.Fhir.Model.FhirString>(LocationElement.DeepCopy());
                }
                if (ExpressionElement != null)
                {
                    dest.ExpressionElement = new List <Hl7.Fhir.Model.FhirString>(ExpressionElement.DeepCopy());
                }
                return(dest);
            }