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

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

                base.CopyTo(dest);
                if (Flag != null)
                {
                    dest.Flag = (Hl7.Fhir.Model.CodeableConcept)Flag.DeepCopy();
                }
                if (DeletedElement != null)
                {
                    dest.DeletedElement = (Hl7.Fhir.Model.FhirBoolean)DeletedElement.DeepCopy();
                }
                if (DateElement != null)
                {
                    dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                }
                if (Item != null)
                {
                    dest.Item = (Hl7.Fhir.Model.ResourceReference)Item.DeepCopy();
                }
                return(dest);
            }
Beispiel #2
0
            public override ErrorList Validate()
            {
                var result = new ErrorList();

                result.AddRange(base.Validate());

                if (Flag != null)
                {
                    Flag.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (DeletedElement != null)
                {
                    result.AddRange(DeletedElement.Validate());
                }
                if (DateElement != null)
                {
                    result.AddRange(DateElement.Validate());
                }
                if (Item != null)
                {
                    result.AddRange(Item.Validate());
                }

                return(result);
            }