示例#1
0
 public static void Add(string key, string value)
 {
     if (value.Contains("\""))
     {
         value.Replace('"', '\"');
     }
     if (csvLoader == null)
     {
         csvLoader = new CSVLoader();
     }
     csvLoader.LoadCSV();
     csvLoader.Add(key, value);
     UpdateDictionaries();
 }
    public static void Add(string key, string[] values)
    {
        CheckValues(ref values);

        if (csvLoader == null)
        {
            csvLoader = new CSVLoader();
        }

        csvLoader.LoadCSV();
        csvLoader.Add(key, values);
        csvLoader.LoadCSV();

        UpdateDictionaries();
    }
    public static void Add(string key, string value) //Process the new value and add on necessary regex to identify it in the CSV file, and then add it to the CSV
    {
        if (value.Contains("\""))
        {
            value.Replace('"', '\"');
        }

        if (csvLoader == null)
        {
            csvLoader = new CSVLoader();
        }

        csvLoader.LoadCSV();
        csvLoader.Add(key, value);
        csvLoader.LoadCSV();

        UpdateDictionaries();
    }