/// <summary> /// Main thread of execution for obfuscation. /// </summary> private void ObfThread() { _functionsToReplace.Clear(); _classesToReplace.Clear(); // files are copied. Obfuscate those that were selected. foreach (string file in _targetFiles) { _ui.StatusUpdate("Obfuscating " + file); try { Obfuscate(file); } catch (Exception exp) { _ui.Error(exp.Message); return; } } if (_obfuscateFunctionNames) { // if the option is on, then the list of function names was constructed in the last pass. // go through the files again, and replace the function names. foreach (string file in _targetFiles) { try { _ui.StatusUpdate("Obfuscating Function Names in " + file); RenameFunctions(file); } catch (Exception exp) { _ui.Error(exp.Message); return; } } } _ui.Done(); }