public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ChannelComponent;

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

                base.CopyTo(dest);
                if (TypeElement != null)
                {
                    dest.TypeElement = (Code <Hl7.Fhir.Model.Subscription.SubscriptionChannelType>)TypeElement.DeepCopy();
                }
                if (EndpointElement != null)
                {
                    dest.EndpointElement = (Hl7.Fhir.Model.FhirUri)EndpointElement.DeepCopy();
                }
                if (PayloadElement != null)
                {
                    dest.PayloadElement = (Hl7.Fhir.Model.FhirString)PayloadElement.DeepCopy();
                }
                if (HeaderElement != null)
                {
                    dest.HeaderElement = (Hl7.Fhir.Model.FhirString)HeaderElement.DeepCopy();
                }
                return(dest);
            }
示例#2
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);
        }
示例#3
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as GroupComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (Name != null)
                    {
                        dest.Name = (Hl7.Fhir.Model.CodeableConcept)Name.DeepCopy();
                    }
                    if (HeaderElement != null)
                    {
                        dest.HeaderElement = (Hl7.Fhir.Model.FhirString)HeaderElement.DeepCopy();
                    }
                    if (TextElement != null)
                    {
                        dest.TextElement = (Hl7.Fhir.Model.FhirString)TextElement.DeepCopy();
                    }
                    if (Subject != null)
                    {
                        dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
                    }
                    if (Group != null)
                    {
                        dest.Group = new List <Hl7.Fhir.Model.Questionnaire.GroupComponent>(Group.DeepCopy());
                    }
                    if (Question != null)
                    {
                        dest.Question = new List <Hl7.Fhir.Model.Questionnaire.QuestionComponent>(Question.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
示例#4
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Subscription;

            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 (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.SubscriptionState>)StatusElement.DeepCopy();
            }
            if (Topic != null)
            {
                dest.Topic = (Hl7.Fhir.Model.ResourceReference)Topic.DeepCopy();
            }
            if (Contact != null)
            {
                dest.Contact = new List <Hl7.Fhir.Model.ContactPoint>(Contact.DeepCopy());
            }
            if (EndElement != null)
            {
                dest.EndElement = (Hl7.Fhir.Model.Instant)EndElement.DeepCopy();
            }
            if (ReasonElement != null)
            {
                dest.ReasonElement = (Hl7.Fhir.Model.FhirString)ReasonElement.DeepCopy();
            }
            if (FilterBy != null)
            {
                dest.FilterBy = new List <Hl7.Fhir.Model.Subscription.FilterByComponent>(FilterBy.DeepCopy());
            }
            if (Error != null)
            {
                dest.Error = new List <Hl7.Fhir.Model.CodeableConcept>(Error.DeepCopy());
            }
            if (ChannelType != null)
            {
                dest.ChannelType = (Hl7.Fhir.Model.Coding)ChannelType.DeepCopy();
            }
            if (EndpointElement != null)
            {
                dest.EndpointElement = (Hl7.Fhir.Model.FhirUrl)EndpointElement.DeepCopy();
            }
            if (HeaderElement != null)
            {
                dest.HeaderElement = new List <Hl7.Fhir.Model.FhirString>(HeaderElement.DeepCopy());
            }
            if (HeartbeatPeriodElement != null)
            {
                dest.HeartbeatPeriodElement = (Hl7.Fhir.Model.UnsignedInt)HeartbeatPeriodElement.DeepCopy();
            }
            if (TimeoutElement != null)
            {
                dest.TimeoutElement = (Hl7.Fhir.Model.UnsignedInt)TimeoutElement.DeepCopy();
            }
            if (ContentTypeElement != null)
            {
                dest.ContentTypeElement = (Hl7.Fhir.Model.Code)ContentTypeElement.DeepCopy();
            }
            if (ContentElement != null)
            {
                dest.ContentElement = (Code <Hl7.Fhir.Model.Subscription.SubscriptionPayloadContent>)ContentElement.DeepCopy();
            }
            return(dest);
        }