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

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

            base.CopyTo(dest);
            if (Type != null)
            {
                dest.Type = new List <Hl7.Fhir.Model.Coding>(Type.DeepCopy());
            }
            if (WhenElement != null)
            {
                dest.WhenElement = (Hl7.Fhir.Model.Instant)WhenElement.DeepCopy();
            }
            if (Who != null)
            {
                dest.Who = (Hl7.Fhir.Model.DataType)Who.DeepCopy();
            }
            if (ContentTypeElement != null)
            {
                dest.ContentTypeElement = (Hl7.Fhir.Model.Code)ContentTypeElement.DeepCopy();
            }
            if (BlobElement != null)
            {
                dest.BlobElement = (Hl7.Fhir.Model.Base64Binary)BlobElement.DeepCopy();
            }
            return(dest);
        }
예제 #2
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as TimingRepeatComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (Bounds != null)
                    {
                        dest.Bounds = (Hl7.Fhir.Model.Element)Bounds.DeepCopy();
                    }
                    if (CountElement != null)
                    {
                        dest.CountElement = (Hl7.Fhir.Model.Integer)CountElement.DeepCopy();
                    }
                    if (DurationElement != null)
                    {
                        dest.DurationElement = (Hl7.Fhir.Model.FhirDecimal)DurationElement.DeepCopy();
                    }
                    if (DurationMaxElement != null)
                    {
                        dest.DurationMaxElement = (Hl7.Fhir.Model.FhirDecimal)DurationMaxElement.DeepCopy();
                    }
                    if (DurationUnitsElement != null)
                    {
                        dest.DurationUnitsElement = (Code <Hl7.Fhir.Model.Timing.UnitsOfTime>)DurationUnitsElement.DeepCopy();
                    }
                    if (FrequencyElement != null)
                    {
                        dest.FrequencyElement = (Hl7.Fhir.Model.Integer)FrequencyElement.DeepCopy();
                    }
                    if (FrequencyMaxElement != null)
                    {
                        dest.FrequencyMaxElement = (Hl7.Fhir.Model.Integer)FrequencyMaxElement.DeepCopy();
                    }
                    if (PeriodElement != null)
                    {
                        dest.PeriodElement = (Hl7.Fhir.Model.FhirDecimal)PeriodElement.DeepCopy();
                    }
                    if (PeriodMaxElement != null)
                    {
                        dest.PeriodMaxElement = (Hl7.Fhir.Model.FhirDecimal)PeriodMaxElement.DeepCopy();
                    }
                    if (PeriodUnitsElement != null)
                    {
                        dest.PeriodUnitsElement = (Code <Hl7.Fhir.Model.Timing.UnitsOfTime>)PeriodUnitsElement.DeepCopy();
                    }
                    if (WhenElement != null)
                    {
                        dest.WhenElement = (Code <Hl7.Fhir.Model.Timing.EventTiming>)WhenElement.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
예제 #3
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Signature;

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

            base.CopyTo(dest);
            if (Type != null)
            {
                dest.Type = new List <Hl7.Fhir.Model.Coding>(Type.DeepCopy());
            }
            if (WhenElement != null)
            {
                dest.WhenElement = (Hl7.Fhir.Model.Instant)WhenElement.DeepCopy();
            }
            if (Who != null)
            {
                dest.Who = (Hl7.Fhir.Model.ResourceReference)Who.DeepCopy();
            }
            if (OnBehalfOf != null)
            {
                dest.OnBehalfOf = (Hl7.Fhir.Model.ResourceReference)OnBehalfOf.DeepCopy();
            }
            if (TargetFormatElement != null)
            {
                dest.TargetFormatElement = (Hl7.Fhir.Model.Code)TargetFormatElement.DeepCopy();
            }
            if (SigFormatElement != null)
            {
                dest.SigFormatElement = (Hl7.Fhir.Model.Code)SigFormatElement.DeepCopy();
            }
            if (DataElement != null)
            {
                dest.DataElement = (Hl7.Fhir.Model.Base64Binary)DataElement.DeepCopy();
            }
            return(dest);
        }
예제 #4
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ScheduleRepeatComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (FrequencyElement != null)
                    {
                        dest.FrequencyElement = (Hl7.Fhir.Model.Integer)FrequencyElement.DeepCopy();
                    }
                    if (WhenElement != null)
                    {
                        dest.WhenElement = (Code <Hl7.Fhir.Model.Schedule.EventTiming>)WhenElement.DeepCopy();
                    }
                    if (DurationElement != null)
                    {
                        dest.DurationElement = (Hl7.Fhir.Model.FhirDecimal)DurationElement.DeepCopy();
                    }
                    if (UnitsElement != null)
                    {
                        dest.UnitsElement = (Code <Hl7.Fhir.Model.Schedule.UnitsOfTime>)UnitsElement.DeepCopy();
                    }
                    if (CountElement != null)
                    {
                        dest.CountElement = (Hl7.Fhir.Model.Integer)CountElement.DeepCopy();
                    }
                    if (EndElement != null)
                    {
                        dest.EndElement = (Hl7.Fhir.Model.FhirDateTime)EndElement.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }