Example #1
0
            public override ErrorList Validate()
            {
                var result = new ErrorList();

                result.AddRange(base.Validate());

                if (IdentifierElement != null)
                {
                    result.AddRange(IdentifierElement.Validate());
                }
                if (OutcomeElement != null)
                {
                    result.AddRange(OutcomeElement.Validate());
                }
                if (TotalElement != null)
                {
                    result.AddRange(TotalElement.Validate());
                }
                if (Parameter != null)
                {
                    Parameter.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (First != null)
                {
                    First.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (Previous != null)
                {
                    Previous.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (Next != null)
                {
                    Next.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (Last != null)
                {
                    Last.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (Reference != null)
                {
                    Reference.ForEach(elem => result.AddRange(elem.Validate()));
                }

                return(result);
            }