RefactoringOperation Class
Each database refactoring type has a class that is derived from RefactoringOperation. The RefactoringOperation class manages the complete life cycle of the refactoring operation. An instance of this class exists only for the duration of the refactoring operation. The RefactoringOperation base class drives the actual life cycle of the refactoring operation. The methods of the derived class are invoked by the base class methods. The RefactoringOperation serves as the launch point for a refactoring operation, and presents user interface (UI) to the user to gather required input for the refactoring operation. The base class provides services such as the preview user interface. For more information, see Create Custom Database Refactoring Types or Targets.
This API is not CLS-compliant.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Data.Schema.Package.Refactoring.RefactoringOperation
Namespace: Microsoft.VisualStudio.Data.Schema.Package.Refactoring
Assembly: Microsoft.VisualStudio.Data.Schema.Package (in Microsoft.VisualStudio.Data.Schema.Package.dll)
Syntax
'Declaration
<CLSCompliantAttribute(False)> _
Public MustInherit Class RefactoringOperation
[CLSCompliantAttribute(false)]
public abstract class RefactoringOperation
[CLSCompliantAttribute(false)]
public ref class RefactoringOperation abstract
[<AbstractClass>]
[<CLSCompliantAttribute(false)>]
type RefactoringOperation = class end
public abstract class RefactoringOperation
The RefactoringOperation type exposes the following members.
Constructors
Name | Description | |
---|---|---|
RefactoringOperation |
Top
Properties
Name | Description | |
---|---|---|
ContributorInput | Gets the initial ContributorInput for this RefactoringOperation. | |
CurrentDataSchemaModel | Gets the DataSchemaModel for the current project. | |
CurrentProject | Gets the IDatabaseProjectNode of the database project on which this operation was invoked. | |
CurrentProjectHierarchy | Gets the IVsUIHierarchy of the database project on which this operation was invoked. | |
GenerateRefactoringLog | Gets or sets a value that indicates whether a log entry is created in a refactoring log file. | |
HasPreviewWindow | Gets or sets a value that indicates whether the standard Preview window is displayed. | |
OperationName | Gets the name of this operation. | |
PreviewWindowInfo | Gets the preview window information. | |
UndoDescription | Gets the Undo description that is used in the undo/redo stack for this RefactoringOperation. |
Top
Methods
Name | Description | |
---|---|---|
AddError | Adds a refactoring error to the operation. | |
CancelOperation | Enables classes derived from RefactoringOperation to cancel the operation, based on user input. | |
DoOperation | The DoOperation method starts the entire refactoring process. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetRefactoringLogProperties | When overridden, this method returns (property name, property value) pairs of all properties that this operation will write into the refactoring log. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnError | Displays an error message. | |
OnGetContributorInput | Gathers necessary input from the user and returns the appropriate ContributorInput class, which is then processed by all compatible contributors. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
WriteOperationLogData | Writes any operation data to a refactoring log file. |
Top
Fields
Name | Description | |
---|---|---|
AppliedChanges | Raised after changes are applied. | |
ApplyingChanges | Raised before changes are applied. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.VisualStudio.Data.Schema.Package.Refactoring Namespace