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

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

            base.CopyTo(dest);
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.Endpoint.EndpointStatus>)StatusElement.DeepCopy();
            }
            if (ConnectionType != null)
            {
                dest.ConnectionType = (Hl7.Fhir.Model.Coding)ConnectionType.DeepCopy();
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (ManagingOrganization != null)
            {
                dest.ManagingOrganization = (Hl7.Fhir.Model.ResourceReference)ManagingOrganization.DeepCopy();
            }
            if (Contact != null)
            {
                dest.Contact = new List <Hl7.Fhir.Model.ContactPoint>(Contact.DeepCopy());
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (PayloadType != null)
            {
                dest.PayloadType = new List <Hl7.Fhir.Model.CodeableConcept>(PayloadType.DeepCopy());
            }
            if (PayloadMimeTypeElement != null)
            {
                dest.PayloadMimeTypeElement = new List <Hl7.Fhir.Model.Code>(PayloadMimeTypeElement.DeepCopy());
            }
            if (AddressElement != null)
            {
                dest.AddressElement = (Hl7.Fhir.Model.FhirUrl)AddressElement.DeepCopy();
            }
            if (HeaderElement != null)
            {
                dest.HeaderElement = new List <Hl7.Fhir.Model.FhirString>(HeaderElement.DeepCopy());
            }
            return(dest);
        }