예제 #1
0
파일: RenameStep.cs 프로젝트: Cadla/OBFSCTR
        public RenameStep(RenamingOptions renamingOptions, ReflectionOptions reflectionOptions)
        {
            _renamingOptions = renamingOptions;
            _reflectionOptions = reflectionOptions;

            bool keepNamespaces = _renamingOptions.HasFlag(RenamingOptions.KeepNamespaces);
            INameGenerator nameGenerator = GetNameGenerator(new StringGenerator(ALPHABET), keepNamespaces);

            _pipeline = new Pipeline();
            _pipeline.AppendStep(new FillMethodImplTablesStep());
            _pipeline.AppendStep(new BuildRenameMapStep(nameGenerator));

            if (_renamingOptions.HasFlag(RenamingOptions.Reflection))
                _pipeline.AppendStep(new InjectReflectionMethodProxies(_reflectionOptions, keepNamespaces));

            if (_renamingOptions.HasFlag(RenamingOptions.SaveRenameMap))
                _pipeline.AppendStep(new SaveRenameMap());

            _pipeline.AppendStep(new RenameReferencesStep(_renamingOptions));
            _pipeline.AppendStep(new RenameDefinitionsStep(_renamingOptions));
        }
예제 #2
0
 public RenameReferencesStep(RenamingOptions options)
 {
     _options = options;
 }