Exemple #1
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as InstanceComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (SopClassElement != null)
                    {
                        dest.SopClassElement = (Hl7.Fhir.Model.Oid)SopClassElement.DeepCopy();
                    }
                    if (UidElement != null)
                    {
                        dest.UidElement = (Hl7.Fhir.Model.Oid)UidElement.DeepCopy();
                    }
                    if (UrlElement != null)
                    {
                        dest.UrlElement = (Hl7.Fhir.Model.FhirUri)UrlElement.DeepCopy();
                    }
                    if (Frames != null)
                    {
                        dest.Frames = new List <Hl7.Fhir.Model.ImagingObjectSelection.FramesComponent>(Frames.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Exemple #2
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as InstanceComponent;

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

                base.CopyTo(dest);
                if (SopClassElement != null)
                {
                    dest.SopClassElement = (Hl7.Fhir.Model.Oid)SopClassElement.DeepCopy();
                }
                if (UidElement != null)
                {
                    dest.UidElement = (Hl7.Fhir.Model.Oid)UidElement.DeepCopy();
                }
                return(dest);
            }