Example #1
0
        private bool MatchesRelationshipByTraversalName(string name, Relationship relationship, IList <Argument> arguments)
        {
            bool result = false;

            foreach (Argument argument in arguments)
            {
                if (StringUtils.IsNotBlank(name) && StringUtils.IsNotBlank(relationship.TemplateParameterName))
                {
                    if (relationship.TemplateParameterName.Equals(argument.TemplateParameterName) && name.Equals(argument.TraversalName))
                    {
                        result = true;
                    }
                    else
                    {
                        result = MatchesRelationshipByTraversalName(name, relationship, argument.Arguments);
                    }
                    if (!result)
                    {
                        Relationship choice = argument.FindChoiceOption(ChoiceSupport.ChoiceOptionNamePredicate(name));
                        if (choice != null)
                        {
                            result = true;
                        }
                    }
                }
                if (result)
                {
                    break;
                }
            }
            return(result);
        }
Example #2
0
 private bool MatchesRelationshipByChoiceOptionName(string name, Relationship relationship)
 {
     return(relationship.Choice && relationship.FindChoiceOption(ChoiceSupport.ChoiceOptionNamePredicate(name)) != null);
 }