<commit_before>using System;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Net;

using libsecondlife;

using OpenSim.Framework.Console;
using OpenSim.Framework.Configuration.Interfaces;

namespace OpenSim.Framework.Configuration
{
    public class ConfigurationMember
    {
        public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result);
        public delegate void ConfigurationOptionsLoad();

        private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>();
        private string configurationFilename = "";
        private string configurationDescription = "";

        private ConfigurationOptionsLoad loadFunction;
        private ConfigurationOptionResult resultFunction;

        private IGenericConfig configurationPlugin = null;
        public ConfigurationMember(string configuration_filename, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function)
        {
            this.configurationFilename = configuration_filename;
            this.configurationDescription = configuration_description;
            this.loadFunction = load_function;
            this.resultFunction = result_function;
            this.configurationPlugin = this.LoadConfigDll("OpenSim.Framework.Configuration.XML.dll");
        }

        public void setConfigurationFilename(string filename)
        {
            configurationFilename = filename;
        }
        public void setConfigurationDescription(string desc)
        {
            configurationDescription = desc;
        }

        public void setConfigurationResultFunction(ConfigurationOptionResult result)
        {
            resultFunction = result;
        }
        
        public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt)
        {
            ConfigurationOption configOption = new ConfigurationOption();
            configOption.configurationKey = configuration_key;
            configOption.configurationQuestion = configuration_question;
            configOption.configurationDefault = configuration_default;
            configOption.configurationType = configuration_type;
            configOption.configurationUseDefaultNoPrompt = use_default_no_prompt;

            if (configuration_key != "" && configuration_question != "")
            {
                if (!configurationOptions.Contains(configOption))
                {
                    configurationOptions.Add(configOption);
                }
            }
            else
            {
                MainLog.Instance.Notice("Required fields for adding a configuration option is invalid. Will not add this option (" + configuration_key + ")");
            }
        }

        public void performConfigurationRetrieve()
        {<commit_msg>*Added ability to manually set the configuration plugin dll from ConfigurationMember<commit_after>using System;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Net;

using libsecondlife;

using OpenSim.Framework.Console;
using OpenSim.Framework.Configuration.Interfaces;

namespace OpenSim.Framework.Configuration
{
    public class ConfigurationMember
    {
        public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result);
        public delegate void ConfigurationOptionsLoad();

        private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>();
        private string configurationFilename = "";
        private string configurationDescription = "";

        private ConfigurationOptionsLoad loadFunction;
        private ConfigurationOptionResult resultFunction;

        private IGenericConfig configurationPlugin = null;
        public ConfigurationMember(string configuration_filename, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function)
        {
            this.configurationFilename = configuration_filename;
            this.configurationDescription = configuration_description;
            this.loadFunction = load_function;
            this.resultFunction = result_function;
            this.configurationPlugin = this.LoadConfigDll("OpenSim.Framework.Configuration.XML.dll");
        }

        public void setConfigurationFilename(string filename)
        {
            configurationFilename = filename;
        }
        public void setConfigurationDescription(string desc)
        {
            configurationDescription = desc;
        }

        public void setConfigurationResultFunction(ConfigurationOptionResult result)
        {
            resultFunction = result;
        }

        public void forceConfigurationPluginLibrary(string dll_filename)
        {
            configurationPlugin = this.LoadConfigDll(dll_filename);
        }
        public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt)
        {
            ConfigurationOption configOption = new ConfigurationOption();
            configOption.configurationKey = configuration_key;
            configOption.configurationQuestion = configuration_question;
            configOption.configurationDefault = configuration_default;
            configOption.configurationType = configuration_type;
            configOption.configurationUseDefaultNoPrompt = use_default_no_prompt;

            if (configuration_key != "" && configuration_question != "")
            {
                if (!configurationOptions.Contains(configOption))
                {
                    configurationOptions.Add(configOption);
                }
            }
            else
            {
                MainLog.Instance.Notice("Required fields for adding a configuration option is invalid. Will not add this option (" + configuration_key + ")");
            }
        }

        public void performConfigurationRetrieve()
        {
{'fraction_non_alphanumeric': 0.057369255150554674, 'fraction_numerical': 0.0, 'mean_word_length': 2.9468417761100687, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7486300', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1232, 'n_words': 302}