Example #1
0
        /// <summary>
        ///     Provides the set of rules which uses this variable
        /// </summary>
        /// <param name="node">the element to find in rules</param>
        /// <returns>the list of rules which use the element provided</returns>
        public static HashSet <RuleCondition> RulesUsingThisElement(IVariable node)
        {
            UsageVisitor visitor = new UsageVisitor(node);

            EfsSystem efsSystem = EnclosingFinder <EfsSystem> .find(node);

            if (efsSystem != null)
            {
                foreach (Dictionary dictionary in efsSystem.Dictionaries)
                {
                    visitor.visit(dictionary);
                }
            }

            return(visitor.Usages);
        }
Example #2
0
 public StabilityVisitor(IAssemblySymbol assembly, HashSet <string> solutionAssemblyNames)
 {
     CoreUsageVisitor = new UsageVisitor(assembly, solutionAssemblyNames);
 }
Example #3
0
        /// <summary>
        ///     Provides the set of rules which uses this variable
        /// </summary>
        /// <param name="node">the element to find in rules</param>
        /// <returns>the list of rules which use the element provided</returns>
        public static HashSet<RuleCondition> RulesUsingThisElement(IVariable node)
        {
            UsageVisitor visitor = new UsageVisitor(node);

            EFSSystem efsSystem = EnclosingFinder<EFSSystem>.find(node);
            if (efsSystem != null)
            {
                foreach (Dictionary dictionary in efsSystem.Dictionaries)
                {
                    visitor.visit(dictionary);
                }
            }

            return visitor.Usages;
        }
 public void AddQuery(UsageVisitor visitor)
 {
     this.myVisitors.Add(visitor);
 }