public static OptionConfiguration GetConfiguration(Zongsoft.Plugins.Plugin plugin)
        {
            if (plugin == null)
            {
                return(null);
            }

            string filePath = GetAssistedFilePath(plugin, ".option");

            return(OptionConfigurationManager.Open(filePath));
        }
Exemple #2
0
        public static OptionConfiguration GetConfiguration(Tiandao.Plugins.Plugin plugin)
        {
            if (plugin == null)
            {
                return(null);
            }

            string filePath = GetAssistedFilePath(plugin, ".option");

            return(OptionConfigurationManager.Open(filePath));

            //OptionConfiguration configuration = OptionConfigurationManager.Open(filePath, true);

            //var section = configuration.GetSection("/") ?? configuration.Sections.Add("/");
            //var settings = section["settings"] as SettingElementCollection;

            //if(settings == null)
            //{
            //	settings = new SettingElementCollection();
            //	section.Children.Add("settings", settings);
            //}

            //return configuration;
        }