Beispiel #1
0
        /// <summary>Checks for the given type. Optionally allow multiple passes
        /// (e.g. if searching for a type requires other types to be ready to go).</summary>
        public void FindAllSubTypes(int pass, Type type, OnFoundTypeEvent found, bool allowGeneric)
        {
            // Create:
            TypeToFind ttf = new TypeToFind(type, found);

            ttf.AllowGeneric = allowGeneric;

            // Add:
            Add(pass, ttf);
        }
Beispiel #2
0
        /// <summary>Adds a type to find to the given pass.</summary>
        private void Add(int pass, TypeToFind ttf)
        {
            // Create the set if it's needed:
            List <TypeToFind> set;

            if (!ToFind.TryGetValue(pass, out set))
            {
                set          = new List <TypeToFind>();
                ToFind[pass] = set;
            }

            // Add:
            set.Add(ttf);
        }