Example #1
0
        public override void Fix()
        {
            using (var dialog = new RemoveParametersDialog(new RemoveParametersViewModel(_state)))
            {
                var refactoring = new RemoveParametersRefactoring(_vbe,
                                                                  new RemoveParametersPresenterFactory(_vbe, dialog, _state, _messageBox));

                refactoring.QuickFix(_state, Selection);
            }
        }
        //The rewriteSession is optional since it is not used in this particular quickfix because it is a refactoring quickfix.
        public override void Fix(IInspectionResult result, IRewriteSession rewriteSession = null)
        {
            using (var dialog = new RemoveParametersDialog(new RemoveParametersViewModel(_state)))
            {
                var refactoring = new RemoveParametersRefactoring(
                    _vbe,
                    new RemoveParametersPresenterFactory(_vbe, dialog, _state, _messageBox),
                    _rewritingManager);

                refactoring.QuickFix(_state, result.QualifiedSelection);
            }
        }
Example #3
0
 public override void Fix()
 {
     _quickFixRefactoring.QuickFix(_parseResult, Selection);
 }
        //The rewriteSession is optional since it is not used in this particular quickfix because it is a refactoring quickfix.
        public override void Fix(IInspectionResult result, IRewriteSession rewriteSession = null)
        {
            var refactoring = new RemoveParametersRefactoring(_declarationFinderProvider, _factory, _rewritingManager, _selectionService);

            refactoring.QuickFix(result.QualifiedSelection);
        }
 public override void Fix()
 {
     _quickFixRefactoring.QuickFix(_state, Selection);
 }
 private void RemoveUnusedParameter()
 {
     _quickFixRefactoring.QuickFix(_parseResult, this.QualifiedSelection);
 }