Exemple #1
0
            public bool Validate(ITextPosition pos)
            {
                ent = fileElem.GetMethodCodeElemFromFilePos(pos);
                if (ent == null)
                {
                    return(false);
                }
                VCCodeClass targetClass = GetClassCodeElem();

                if (targetClass != null && !classElem.Validate(targetClass))
                {
                    return(false);
                }

                return(true);
            }
Exemple #2
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (Identifier != null)
            {
                Identifier.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (StatusElement != null)
            {
                result.AddRange(StatusElement.Validate());
            }
            if (ClassElement != null)
            {
                result.AddRange(ClassElement.Validate());
            }
            if (Type != null)
            {
                Type.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Subject != null)
            {
                result.AddRange(Subject.Validate());
            }
            if (Participant != null)
            {
                Participant.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Fulfills != null)
            {
                result.AddRange(Fulfills.Validate());
            }
            if (StartElement != null)
            {
                result.AddRange(StartElement.Validate());
            }
            if (Length != null)
            {
                result.AddRange(Length.Validate());
            }
            if (Reason != null)
            {
                result.AddRange(Reason.Validate());
            }
            if (Indication != null)
            {
                result.AddRange(Indication.Validate());
            }
            if (Priority != null)
            {
                result.AddRange(Priority.Validate());
            }
            if (Hospitalization != null)
            {
                result.AddRange(Hospitalization.Validate());
            }
            if (Location != null)
            {
                Location.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (ServiceProvider != null)
            {
                result.AddRange(ServiceProvider.Validate());
            }
            if (PartOf != null)
            {
                result.AddRange(PartOf.Validate());
            }

            return(result);
        }