示例#1
0
 private void ReplaceIdentifiers(Snippet snippet, Replace identifierReplacement)
 {
     // The identifierReplacement explains what the new identifier will be.
     // The map calls this method to create replacements, but also tracks for collisions or
     // whether or not an identifier should acutlly be replaced
     _map          = new ReplacementMap(_blacklist, identifierReplacement);
     _replacedCode = snippet.RenameIdentifiers(_map.Replace);
     Console.WriteLine(_replacedCode);
 }
示例#2
0
 public void Init()
 {
     _blacklist = new Blacklist();
     _reverse   = i => string.Concat(i.Reverse());
     _map       = new ReplacementMap(_blacklist, _reverse);
 }