Exemple #1
0
        public IEnumerable <string> GetKeys(Type t)
        {
            var keys = Enumerable.Empty <string>();

            if (parent != null)
            {
                keys = keys.Concat(parent.GetKeys(t));
            }

            if (registeredKeys.ContainsKey(t))
            {
                keys = keys.Concat(registeredKeys[t]);
            }

            return(keys);
        }
Exemple #2
0
        private void FillTypeRegistrationDictionary(IDictionary <Type, List <string> > typeRegistrations)
        {
            if (parent != null)
            {
                parent.FillTypeRegistrationDictionary(typeRegistrations);
            }

            foreach (Type t in registeredNames.RegisteredTypes)
            {
                if (!typeRegistrations.ContainsKey(t))
                {
                    typeRegistrations[t] = new List <string>();
                }

                typeRegistrations[t] =
                    (typeRegistrations[t].Concat(registeredNames.GetKeys(t))).Distinct().ToList();
            }
        }