C# Class Rubberduck.Refactorings.ExtractMethod.ExtractMethodRefactoring

A refactoring that extracts a method (procedure or function) out of a selection in the active code pane and replaces the selected code with a call to the extracted method.
Inheritance: IRefactoring
显示文件 Open project: retailcoder/Rubberduck Class Usage Examples

Public Methods

Method Description
ExtractMethodRefactoring ( IRefactoringPresenterFactory factory, IActiveCodePaneEditor editor ) : System
GetExtractedMethod ( ExtractMethodModel model ) : string
Refactor ( ) : void
Refactor ( Rubberduck.Parsing.Symbols.Declaration target ) : void
Refactor ( QualifiedSelection target ) : void

Private Methods

Method Description
ExtractMethod ( ExtractMethodModel model ) : void
GetMethodCall ( ExtractMethodModel model ) : string
OnInvalidSelection ( ) : void

Method Details

ExtractMethodRefactoring() public method

public ExtractMethodRefactoring ( IRefactoringPresenterFactory factory, IActiveCodePaneEditor editor ) : System
factory IRefactoringPresenterFactory
editor IActiveCodePaneEditor
return System

GetExtractedMethod() public static method

public static GetExtractedMethod ( ExtractMethodModel model ) : string
model ExtractMethodModel
return string

Refactor() public method

public Refactor ( ) : void
return void

Refactor() public method

public Refactor ( Rubberduck.Parsing.Symbols.Declaration target ) : void
target Rubberduck.Parsing.Symbols.Declaration
return void

Refactor() public method

public Refactor ( QualifiedSelection target ) : void
target Rubberduck.VBEditor.QualifiedSelection
return void