Ejemplo n.º 1
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as UniqueIdComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (TypeElement != null)
                    {
                        dest.TypeElement = (Code <Hl7.Fhir.Model.NamingSystem.NamingSystemIdentifierType>)TypeElement.DeepCopy();
                    }
                    if (ValueElement != null)
                    {
                        dest.ValueElement = (Hl7.Fhir.Model.FhirString)ValueElement.DeepCopy();
                    }
                    if (PreferredElement != null)
                    {
                        dest.PreferredElement = (Hl7.Fhir.Model.FhirBoolean)PreferredElement.DeepCopy();
                    }
                    if (Period != null)
                    {
                        dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Ejemplo n.º 2
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as CommunicationComponent;

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

                base.CopyTo(dest);
                if (Language != null)
                {
                    dest.Language = (Hl7.Fhir.Model.CodeableConcept)Language.DeepCopy();
                }
                if (PreferredElement != null)
                {
                    dest.PreferredElement = (Hl7.Fhir.Model.FhirBoolean)PreferredElement.DeepCopy();
                }
                return(dest);
            }