See PRM-1425
Abstract
Question/request: to remove an argument from calls to a local method
Here, "local" means a method declared in the same VBP rather than in an IDF.
...
It is also a request for general help with migrating local symbols..
Background
I am trying to migrate a local method so that one of the arguments is no longer passed to calls. I put together a sample to illustrate the desired effect.
...
- the method is declared and called locally in a module
- the method is declared and called locally in a class
- the method is declared in a class and called from a module
- the method is declared in a module and called from a class
...
Solution
Code Block |
---|
<Compile <Compile Project="%SrcPath%"> <Refactor> <Remove identifier="LocalMigrateArg.test" migPattern="%1d(%2d,%4o)\c" /> <Remove identifier="LocalMigrateArg.Class1.test" migPattern="%1d(%2d,%4o)\c"/> </Refactor> </Compile> <Refactor> <Reauthor subprogram="LocalMigrateArg.test"><![CDATA[ public static void test(string arg1,string arg3) // UPGRADE_INFO: hand-coded replacement; removed arg2 { writeLog("running test"); writeLog("arg1 = " + arg1); writeLog("arg3 = " + arg3); } ]]></Reauthor> <Reauthor subprogram="LocalMigrateArg.Class1.test"><![CDATA[ public void test(string arg1,string arg3) // UPGRADE_INFO: hand-coded replacement; removed arg2 { modLocalMigrateArg.writeLog("running test"); modLocalMigrateArg.writeLog("arg1 = " + arg1); modLocalMigrateArg.writeLog("arg3 = " + arg3); } ]]></Reauthor> </Refactor> |