public static void Main(string[] args) { Rpx r = new Rpx(args[0], args[1]); if (args[2].Equals("mappings")) { Console.WriteLine("Mappings for " + args[3] + ":"); foreach (string s in r.Mappings(args[3])) { Console.WriteLine(s); } } if (args[2].Equals("all_mappings")) { Console.WriteLine("All mappings:"); foreach (KeyValuePair <string, ArrayList> pair in r.AllMappings()) { Console.WriteLine(pair.Key + ":"); foreach (string identifier in pair.Value) { Console.WriteLine(" " + identifier); } } } if (args[2].Equals("map")) { Console.WriteLine(args[3] + " mapped to " + args[4]); r.Map(args[3], args[4]); } if (args[2].Equals("unmap")) { Console.WriteLine(args[3] + " unmapped from " + args[4]); r.Unmap(args[3], args[4]); } }
public static void Main(string[] args) { Rpx r = new Rpx(args[0], args[1]); if (args[2].Equals("mappings")) { Console.WriteLine("Mappings for " + args[3] + ":"); foreach (string s in r.Mappings(args[3])) { Console.WriteLine(s); } } if (args[2].Equals("all_mappings")) { Console.WriteLine("All mappings:"); foreach (KeyValuePair<string, ArrayList> pair in r.AllMappings()) { Console.WriteLine(pair.Key + ":"); foreach (string identifier in pair.Value) { Console.WriteLine(" " + identifier); } } } if (args[2].Equals("map")) { Console.WriteLine(args[3] + " mapped to " + args[4]); r.Map(args[3], args[4]); } if (args[2].Equals("unmap")) { Console.WriteLine(args[3] + " unmapped from " + args[4]); r.Unmap(args[3], args[4]); } }