Beispiel #1
0
        /// <summary>
        /// Preloads all currently-known names for the module namespace. This
        /// can be called multiple times, to add names from assemblies that
        /// may have been loaded since the last call to the method.
        /// </summary>
        public void LoadNames()
        {
            ManagedType m = null;

            foreach (string name in AssemblyManager.GetNames(_namespace))
            {
                cache.TryGetValue(name, out m);
                if (m != null)
                {
                    continue;
                }
                IntPtr attr = Runtime.PyDict_GetItemString(dict, name);
                // If __dict__ has already set a custom property, skip it.
                if (attr != IntPtr.Zero)
                {
                    continue;
                }
                GetAttribute(name, true);
            }
        }