Ejemplo n.º 1
0
        private void Refactor()
        {
            codeBase.References.Clear();
            Diagnostics.Set("Phase", "Refactoring");
            CallVisitor(typeof(AccessorRefactoring), "Refactoring");
            CallVisitor(typeof(ReferenceTransformer), "Refactoring");

            CallVisitor(typeof(RenameMethodInvocationRefactoring), "Refactoring");
            CallVisitor(typeof(RenameMethodDeclarationRefactoring), "Refactoring");

            CallVisitor(typeof(SameFieldAndMethodNameTransformer), "Refactoring");
            CallVisitor(typeof(SameFieldAndMethodUsagesTransformer), "Refactoring");

            if (Package != null && Namespace != null)
            {
                RenameNamespaceRefactoring rns = new RenameNamespaceRefactoring();
                rns.From = Package;
                rns.To   = Namespace;
                CallVisitor(rns, "Refactoring");
            }
        }
Ejemplo n.º 2
0
        private void Refactor()
        {
            codeBase.References.Clear();
            Diagnostics.Set("Phase", "Refactoring");
            CallVisitor(typeof(AccessorRefactoring), "Refactoring");
            CallVisitor(typeof(ReferenceTransformer), "Refactoring");

            CallVisitor(typeof(RenameMethodInvocationRefactoring), "Refactoring");
            CallVisitor(typeof(RenameMethodDeclarationRefactoring), "Refactoring");

            CallVisitor(typeof(SameFieldAndMethodNameTransformer), "Refactoring");
            CallVisitor(typeof(SameFieldAndMethodUsagesTransformer), "Refactoring");

            if (Package != null && Namespace != null)
            {
                RenameNamespaceRefactoring rns = new RenameNamespaceRefactoring();
                rns.From = Package;
                rns.To = Namespace;
                CallVisitor(rns, "Refactoring");
            }
        }