示例#1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Coverage;

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

            base.CopyTo(dest);
            if (Issuer != null)
            {
                dest.Issuer = (Hl7.Fhir.Model.ResourceReference)Issuer.DeepCopy();
            }
            if (Bin != null)
            {
                dest.Bin = (Hl7.Fhir.Model.Identifier)Bin.DeepCopy();
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.Coding)Type.DeepCopy();
            }
            if (SubscriberId != null)
            {
                dest.SubscriberId = (Hl7.Fhir.Model.Identifier)SubscriberId.DeepCopy();
            }
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (GroupElement != null)
            {
                dest.GroupElement = (Hl7.Fhir.Model.FhirString)GroupElement.DeepCopy();
            }
            if (PlanElement != null)
            {
                dest.PlanElement = (Hl7.Fhir.Model.FhirString)PlanElement.DeepCopy();
            }
            if (SubPlanElement != null)
            {
                dest.SubPlanElement = (Hl7.Fhir.Model.FhirString)SubPlanElement.DeepCopy();
            }
            if (DependentElement != null)
            {
                dest.DependentElement = (Hl7.Fhir.Model.PositiveInt)DependentElement.DeepCopy();
            }
            if (SequenceElement != null)
            {
                dest.SequenceElement = (Hl7.Fhir.Model.PositiveInt)SequenceElement.DeepCopy();
            }
            if (Subscriber != null)
            {
                dest.Subscriber = (Hl7.Fhir.Model.ResourceReference)Subscriber.DeepCopy();
            }
            if (Network != null)
            {
                dest.Network = (Hl7.Fhir.Model.Identifier)Network.DeepCopy();
            }
            if (Contract != null)
            {
                dest.Contract = new List <Hl7.Fhir.Model.ResourceReference>(Contract.DeepCopy());
            }
            return(dest);
        }