Exemplo n.º 1
0
            public override ErrorList Validate()
            {
                var result = new ErrorList();

                result.AddRange(base.Validate());

                if (FrequencyElement != null)
                {
                    result.AddRange(FrequencyElement.Validate());
                }
                if (WhenElement != null)
                {
                    result.AddRange(WhenElement.Validate());
                }
                if (DurationElement != null)
                {
                    result.AddRange(DurationElement.Validate());
                }
                if (UnitsElement != null)
                {
                    result.AddRange(UnitsElement.Validate());
                }
                if (CountElement != null)
                {
                    result.AddRange(CountElement.Validate());
                }
                if (EndElement != null)
                {
                    result.AddRange(EndElement.Validate());
                }

                return(result);
            }
Exemplo n.º 2
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (ValueElement != null)
            {
                result.AddRange(ValueElement.Validate());
            }
            if (ComparatorElement != null)
            {
                result.AddRange(ComparatorElement.Validate());
            }
            if (UnitsElement != null)
            {
                result.AddRange(UnitsElement.Validate());
            }
            if (SystemElement != null)
            {
                result.AddRange(SystemElement.Validate());
            }
            if (CodeElement != null)
            {
                result.AddRange(CodeElement.Validate());
            }

            return(result);
        }
Exemplo n.º 3
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Quantity;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (ValueElement != null)
                {
                    dest.ValueElement = (Hl7.Fhir.Model.FhirDecimal)ValueElement.DeepCopy();
                }
                if (ComparatorElement != null)
                {
                    dest.ComparatorElement = (Code <Hl7.Fhir.Model.Quantity.QuantityCompararator>)ComparatorElement.DeepCopy();
                }
                if (UnitsElement != null)
                {
                    dest.UnitsElement = (Hl7.Fhir.Model.FhirString)UnitsElement.DeepCopy();
                }
                if (SystemElement != null)
                {
                    dest.SystemElement = (Hl7.Fhir.Model.FhirUri)SystemElement.DeepCopy();
                }
                if (CodeElement != null)
                {
                    dest.CodeElement = (Hl7.Fhir.Model.Code)CodeElement.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Exemplo n.º 4
0
 public void WriteTo(System.IO.BinaryWriter writer)
 {
     writer.Write(CurrentTick);
     Properties.WriteTo(writer);
     Level.WriteTo(writer);
     writer.Write(Players.Length);
     foreach (var PlayersElement in Players)
     {
         PlayersElement.WriteTo(writer);
     }
     writer.Write(Units.Length);
     foreach (var UnitsElement in Units)
     {
         UnitsElement.WriteTo(writer);
     }
     writer.Write(Bullets.Length);
     foreach (var BulletsElement in Bullets)
     {
         BulletsElement.WriteTo(writer);
     }
     writer.Write(Mines.Length);
     foreach (var MinesElement in Mines)
     {
         MinesElement.WriteTo(writer);
     }
     writer.Write(LootBoxes.Length);
     foreach (var LootBoxesElement in LootBoxes)
     {
         LootBoxesElement.WriteTo(writer);
     }
 }
            public override ErrorList Validate()
            {
                var result = new ErrorList();

                result.AddRange(base.Validate());

                if (TypeElement != null)
                {
                    result.AddRange(TypeElement.Validate());
                }
                if (UnitsElement != null)
                {
                    result.AddRange(UnitsElement.Validate());
                }
                if (UcumElement != null)
                {
                    result.AddRange(UcumElement.Validate());
                }
                if (Template != null)
                {
                    result.AddRange(Template.Validate());
                }
                if (SystemElement != null)
                {
                    result.AddRange(SystemElement.Validate());
                }

                return(result);
            }
Exemplo n.º 6
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ScheduleRepeatComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (FrequencyElement != null)
                    {
                        dest.FrequencyElement = (Hl7.Fhir.Model.Integer)FrequencyElement.DeepCopy();
                    }
                    if (WhenElement != null)
                    {
                        dest.WhenElement = (Code <Hl7.Fhir.Model.Schedule.EventTiming>)WhenElement.DeepCopy();
                    }
                    if (DurationElement != null)
                    {
                        dest.DurationElement = (Hl7.Fhir.Model.FhirDecimal)DurationElement.DeepCopy();
                    }
                    if (UnitsElement != null)
                    {
                        dest.UnitsElement = (Code <Hl7.Fhir.Model.Schedule.UnitsOfTime>)UnitsElement.DeepCopy();
                    }
                    if (CountElement != null)
                    {
                        dest.CountElement = (Hl7.Fhir.Model.Integer)CountElement.DeepCopy();
                    }
                    if (EndElement != null)
                    {
                        dest.EndElement = (Hl7.Fhir.Model.FhirDateTime)EndElement.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }