Пример #1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as DocumentManifest;

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

            base.CopyTo(dest);
            if (MasterIdentifier != null)
            {
                dest.MasterIdentifier = (Hl7.Fhir.Model.Identifier)MasterIdentifier.DeepCopy();
            }
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.DocumentReferenceStatus>)StatusElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (CreatedElement != null)
            {
                dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy();
            }
            if (Author != null)
            {
                dest.Author = new List <Hl7.Fhir.Model.ResourceReference>(Author.DeepCopy());
            }
            if (Recipient != null)
            {
                dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy());
            }
            if (SourceElement != null)
            {
                dest.SourceElement = (Hl7.Fhir.Model.FhirUri)SourceElement.DeepCopy();
            }
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (Content != null)
            {
                dest.Content = new List <Hl7.Fhir.Model.ResourceReference>(Content.DeepCopy());
            }
            if (Related != null)
            {
                dest.Related = new List <Hl7.Fhir.Model.DocumentManifest.RelatedComponent>(Related.DeepCopy());
            }
            return(dest);
        }
Пример #2
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Meta;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (VersionIdElement != null)
                {
                    dest.VersionIdElement = (Hl7.Fhir.Model.Id)VersionIdElement.DeepCopy();
                }
                if (LastUpdatedElement != null)
                {
                    dest.LastUpdatedElement = (Hl7.Fhir.Model.Instant)LastUpdatedElement.DeepCopy();
                }
                if (SourceElement != null)
                {
                    dest.SourceElement = (Hl7.Fhir.Model.FhirUri)SourceElement.DeepCopy();
                }
                if (ProfileElement != null)
                {
                    dest.ProfileElement = new List <Hl7.Fhir.Model.FhirUri>(ProfileElement.DeepCopy());
                }
                if (Security != null)
                {
                    dest.Security = new List <Hl7.Fhir.Model.Coding>(Security.DeepCopy());
                }
                if (Tag != null)
                {
                    dest.Tag = new List <Hl7.Fhir.Model.Coding>(Tag.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }