public void Renaming() { var r = new Renamings(); Equal(r.y, 1); r.y = 2; Equal(r.y, 2); Equal(r.RNValue, 2); r.RNValue = 3; Equal(r.RNValue, 3); Equal(r.RNMethod(), 3); Equal(r.yy, 2); r.yy = 3; Equal(r.yy, 3); dynamic o = r; Equal(o.x, 3); Equal(o.X(), 3); Equal(o.GetX(), 3); o.set_X(4); Equal(o.x, 4); Equal(o.xx(), 3); o.set_xx(4); Equal(o.xx(), 4); }
public static IDictionary <string, string> Load(string fileName, Parameters parameters) { if (!System.IO.File.Exists(fileName)) { throw new ArgumentException("Renames file missing:" + parameters.Aliases); } Console.WriteLine("Loading renames file: " + fileName); Renamings renamings = Load(parameters.Aliases); Dictionary <string, string> aliases = new Dictionary <string, string>(); foreach (Renaming renaming in renamings.Arr) { aliases[renaming.old] = renaming.@new; } return(aliases); }