Поделиться через


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
Protected method RefactoringOperation

Top

Properties

  Name Description
Protected property ContributorInput Gets the initial ContributorInput for this RefactoringOperation.
Public property CurrentDataSchemaModel Gets the DataSchemaModel for the current project.
Public property CurrentProject Gets the IDatabaseProjectNode of the database project on which this operation was invoked.
Public property CurrentProjectHierarchy Gets the IVsUIHierarchy of the database project on which this operation was invoked.
Protected property GenerateRefactoringLog Gets or sets a value that indicates whether a log entry is created in a refactoring log file.
Public property HasPreviewWindow Gets or sets a value that indicates whether the standard Preview window is displayed.
Protected property OperationName Gets the name of this operation.
Protected property PreviewWindowInfo Gets the preview window information.
Protected property UndoDescription Gets the Undo description that is used in the undo/redo stack for this RefactoringOperation.

Top

Methods

  Name Description
Public method AddError Adds a refactoring error to the operation.
Protected method CancelOperation Enables classes derived from RefactoringOperation to cancel the operation, based on user input.
Public method DoOperation The DoOperation method starts the entire refactoring process.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Protected method GetRefactoringLogProperties When overridden, this method returns (property name, property value) pairs of all properties that this operation will write into the refactoring log.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnError Displays an error message.
Protected method OnGetContributorInput Gathers necessary input from the user and returns the appropriate ContributorInput class, which is then processed by all compatible contributors.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Protected method WriteOperationLogData Writes any operation data to a refactoring log file.

Top

Fields

  Name Description
Public field AppliedChanges Raised after changes are applied.
Public field 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