Exemplo n.º 1
0
        public static PluginItemCollection GetEmptyItems()
        {
            PluginItemCollection plugins = OpenIdPlugins.Instance().GetPlugins();
            PluginItemCollection result;

            if (plugins == null || plugins.Count == 0)
            {
                result = null;
            }
            else
            {
                IList <string> configedTypes = new OpenIdSettingDao().GetConfigedTypes();
                if (configedTypes != null && configedTypes.Count > 0)
                {
                    foreach (string current in configedTypes)
                    {
                        if (plugins.ContainsKey(current.ToLower()))
                        {
                            plugins.Remove(current.ToLower());
                        }
                    }
                }
                result = plugins;
            }
            return(result);
        }
Exemplo n.º 2
0
        public static PluginItemCollection GetConfigedItems()
        {
            IList <string>       configedTypes = new OpenIdSettingDao().GetConfigedTypes();
            PluginItemCollection result;

            if (configedTypes == null || configedTypes.Count == 0)
            {
                result = null;
            }
            else
            {
                PluginItemCollection plugins = OpenIdPlugins.Instance().GetPlugins();
                if (plugins != null && plugins.Count > 0)
                {
                    PluginItem[] items = plugins.Items;
                    PluginItem[] array = items;
                    for (int i = 0; i < array.Length; i++)
                    {
                        PluginItem pluginItem = array[i];
                        if (!configedTypes.Contains(pluginItem.FullName.ToLower()))
                        {
                            plugins.Remove(pluginItem.FullName.ToLower());
                        }
                    }
                }
                result = plugins;
            }
            return(result);
        }
Exemplo n.º 3
0
        public static PluginItemCollection GetEmptyItems()
        {
            PluginItemCollection plugins = OpenIdPlugins.Instance().GetPlugins();

            if (plugins == null || plugins.Count == 0)
            {
                return(null);
            }
            IList <string> configedTypes = new OpenIdSettingDao().GetConfigedTypes();

            if (configedTypes != null && configedTypes.Count > 0)
            {
                foreach (string item in configedTypes)
                {
                    if (plugins.ContainsKey(item.ToLower()))
                    {
                        plugins.Remove(item.ToLower());
                    }
                }
            }
            return(plugins);
        }
Exemplo n.º 4
0
        public static PluginItemCollection GetConfigedItems()
        {
            IList <string> configedTypes = new OpenIdSettingDao().GetConfigedTypes();

            if (configedTypes == null || configedTypes.Count == 0)
            {
                return(null);
            }
            PluginItemCollection plugins = OpenIdPlugins.Instance().GetPlugins();

            if (plugins != null && plugins.Count > 0)
            {
                PluginItem[] items = plugins.Items;
                PluginItem[] array = items;
                foreach (PluginItem pluginItem in array)
                {
                    if (!configedTypes.Contains(pluginItem.FullName.ToLower()))
                    {
                        plugins.Remove(pluginItem.FullName.ToLower());
                    }
                }
            }
            return(plugins);
        }