コード例 #1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Quantity;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (ValueElement != null)
                {
                    dest.ValueElement = (Hl7.Fhir.Model.FhirDecimal)ValueElement.DeepCopy();
                }
                if (ComparatorElement != null)
                {
                    dest.ComparatorElement = (Code <Hl7.Fhir.Model.Quantity.QuantityComparator>)ComparatorElement.DeepCopy();
                }
                if (UnitElement != null)
                {
                    dest.UnitElement = (Hl7.Fhir.Model.FhirString)UnitElement.DeepCopy();
                }
                if (SystemElement != null)
                {
                    dest.SystemElement = (Hl7.Fhir.Model.FhirUri)SystemElement.DeepCopy();
                }
                if (CodeElement != null)
                {
                    dest.CodeElement = (Hl7.Fhir.Model.Code)CodeElement.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
コード例 #2
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Coding;

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

            base.CopyTo(dest);
            if (SystemElement != null)
            {
                dest.SystemElement = (Hl7.Fhir.Model.FhirUri)SystemElement.DeepCopy();
            }
            if (VersionElement != null)
            {
                dest.VersionElement = (Hl7.Fhir.Model.FhirString)VersionElement.DeepCopy();
            }
            if (CodeElement != null)
            {
                dest.CodeElement = (Hl7.Fhir.Model.Code)CodeElement.DeepCopy();
            }
            if (DisplayElement != null)
            {
                dest.DisplayElement = (Hl7.Fhir.Model.FhirString)DisplayElement.DeepCopy();
            }
            if (UserSelectedElement != null)
            {
                dest.UserSelectedElement = (Hl7.Fhir.Model.FhirBoolean)UserSelectedElement.DeepCopy();
            }
            return(dest);
        }
コード例 #3
0
ファイル: ConceptMap.cs プロジェクト: TonyAbell/fhir-net-api
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ConceptMapConceptComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (SystemElement != null)
                    {
                        dest.SystemElement = (Hl7.Fhir.Model.FhirUri)SystemElement.DeepCopy();
                    }
                    if (CodeElement != null)
                    {
                        dest.CodeElement = (Hl7.Fhir.Model.Code)CodeElement.DeepCopy();
                    }
                    if (DependsOn != null)
                    {
                        dest.DependsOn = new List <Hl7.Fhir.Model.ConceptMap.OtherConceptComponent>(DependsOn.DeepCopy());
                    }
                    if (Map != null)
                    {
                        dest.Map = new List <Hl7.Fhir.Model.ConceptMap.ConceptMapConceptMapComponent>(Map.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
コード例 #4
0
ファイル: ConceptMap.cs プロジェクト: TonyAbell/fhir-net-api
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ConceptMapConceptMapComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (SystemElement != null)
                    {
                        dest.SystemElement = (Hl7.Fhir.Model.FhirUri)SystemElement.DeepCopy();
                    }
                    if (CodeElement != null)
                    {
                        dest.CodeElement = (Hl7.Fhir.Model.Code)CodeElement.DeepCopy();
                    }
                    if (EquivalenceElement != null)
                    {
                        dest.EquivalenceElement = (Code <Hl7.Fhir.Model.ConceptMap.ConceptMapEquivalence>)EquivalenceElement.DeepCopy();
                    }
                    if (CommentsElement != null)
                    {
                        dest.CommentsElement = (Hl7.Fhir.Model.FhirString)CommentsElement.DeepCopy();
                    }
                    if (Product != null)
                    {
                        dest.Product = new List <Hl7.Fhir.Model.ConceptMap.OtherConceptComponent>(Product.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
コード例 #5
0
ファイル: Identifier.cs プロジェクト: wpostma/fhir-net-api
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Identifier;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (UseElement != null)
                {
                    dest.UseElement = (Code <Hl7.Fhir.Model.Identifier.IdentifierUse>)UseElement.DeepCopy();
                }
                if (Type != null)
                {
                    dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
                }
                if (SystemElement != null)
                {
                    dest.SystemElement = (Hl7.Fhir.Model.FhirUri)SystemElement.DeepCopy();
                }
                if (ValueElement != null)
                {
                    dest.ValueElement = (Hl7.Fhir.Model.FhirString)ValueElement.DeepCopy();
                }
                if (Period != null)
                {
                    dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
                }
                if (Assigner != null)
                {
                    dest.Assigner = (Hl7.Fhir.Model.ResourceReference)Assigner.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
コード例 #6
0
ファイル: Coding.cs プロジェクト: TonyAbell/fhir-net-api
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Coding;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (SystemElement != null)
                {
                    dest.SystemElement = (Hl7.Fhir.Model.FhirUri)SystemElement.DeepCopy();
                }
                if (VersionElement != null)
                {
                    dest.VersionElement = (Hl7.Fhir.Model.FhirString)VersionElement.DeepCopy();
                }
                if (CodeElement != null)
                {
                    dest.CodeElement = (Hl7.Fhir.Model.Code)CodeElement.DeepCopy();
                }
                if (DisplayElement != null)
                {
                    dest.DisplayElement = (Hl7.Fhir.Model.FhirString)DisplayElement.DeepCopy();
                }
                if (PrimaryElement != null)
                {
                    dest.PrimaryElement = (Hl7.Fhir.Model.FhirBoolean)PrimaryElement.DeepCopy();
                }
                if (ValueSet != null)
                {
                    dest.ValueSet = (Hl7.Fhir.Model.ResourceReference)ValueSet.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
コード例 #7
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ContactPoint;

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

            base.CopyTo(dest);
            if (SystemElement != null)
            {
                dest.SystemElement = (Code <Hl7.Fhir.Model.ContactPoint.ContactPointSystem>)SystemElement.DeepCopy();
            }
            if (ValueElement != null)
            {
                dest.ValueElement = (Hl7.Fhir.Model.FhirString)ValueElement.DeepCopy();
            }
            if (UseElement != null)
            {
                dest.UseElement = (Code <Hl7.Fhir.Model.ContactPoint.ContactPointUse>)UseElement.DeepCopy();
            }
            if (RankElement != null)
            {
                dest.RankElement = (Hl7.Fhir.Model.PositiveInt)RankElement.DeepCopy();
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            return(dest);
        }