示例#1
0
        /// <summary>
        /// Provides the set of typed elements which uses this type
        /// </summary>
        /// <param name="type">the type to be referenced by the typed elements</param>
        /// <returns>the set of typed elements which have 'type' as type</returns>
        public static HashSet <ITypedElement> ElementsOfType(Types.Type type)
        {
            TypeUsageFinder visitor = new TypeUsageFinder(type);

            EFSSystem efsSystem = Utils.EnclosingFinder <EFSSystem> .find(type);

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

            return(visitor.Usages);
        }
示例#2
0
        /// <summary>
        ///     Provides the set of typed elements which uses this type
        /// </summary>
        /// <param name="type">the type to be referenced by the typed elements</param>
        /// <returns>the set of typed elements which have 'type' as type</returns>
        public static HashSet<ITypedElement> ElementsOfType(Type type)
        {
            TypeUsageFinder visitor = new TypeUsageFinder(type);

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

            return visitor.Usages;
        }