private void updateConfiguration(string path, string[] arguments) { var args = parseArguments(arguments); if (args == null) return; if (args.Global) path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); if (!Configuration.IsConfigured(path)) { Console.WriteLine("There is no config point at " + path); return; } var config = new Configuration(path, false); Console.WriteLine("Writing to " + config.ConfigurationFile); Console.WriteLine("\t{0} setting: {1}", args.Delete ? "Deleting" : "Updating", args.Setting); if (args.Delete) config.Delete(args.Setting); else config.Write(args.Setting); }
private void updateConfiguration(string path, string[] arguments) { var args = parseArguments(arguments); if (args == null) return; if (args.Global) path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); if (!Configuration.IsConfigured(path)) { Console.WriteLine("There is no config point at " + path); return; } var config = new Configuration(path, false); if (args.Delete) { config.Delete(args.Settings[0]); _eventDispatcher( string.Format( "builtin configitem deleted \"{0}\" \"{1}\"", path, args.Settings[0])); } else { config.Write(args.Settings[0]); _eventDispatcher( string.Format( "builtin configitem updated \"{0}\" \"{1}\"", path, args.Settings[0])); } }