Bagikan melalui


IDeploymentContext Interface

Represents the context of a deployment step that is being executed while a SharePoint project is being deployed or retracted.

Namespace:  Microsoft.VisualStudio.SharePoint.Deployment
Assembly:  Microsoft.VisualStudio.SharePoint (in Microsoft.VisualStudio.SharePoint.dll)

Syntax

'Declaration
Public Interface IDeploymentContext _
    Inherits IAnnotatedObject
public interface IDeploymentContext : IAnnotatedObject

The IDeploymentContext type exposes the following members.

Properties

  Name Description
Public property Annotations Gets an instance IAnnotationDictionary to associate custom data with the object implementing the IAnnotatedObject interface. (Inherited from IAnnotatedObject.)
Public property IsDeploying Indicates whether the project is being deployed.
Public property IsRetracting Indicates whether the project is being retracted.
Public property Logger Provides access to the project logger.
Public property Project Provides access to the current project that is being deployed or retracted.

Top

Methods

  Name Description
Public method SiteCollectionUrl Returns the canonical URL of the Microsoft.SharePoint.SPSite that the project is connected to, according to SharePoint.
Public method SiteUrl Returns the canonical URL of the Microsoft.SharePoint.SPWeb that the project is connected to, according to SharePoint.
Public method WebApplicationUrl Returns the root URL of the SPWebApplication.

Top

Remarks

Visual Studio passes IDeploymentContext to the CanExecute and Execute methods of deployment steps. A new deployment context is initialized at the start of a deployment and retraction operation.

The IDeploymentContext interface implements the IAnnotatedObject to enable deployment steps to store and pass data between steps.

See Also

Reference

Microsoft.VisualStudio.SharePoint.Deployment Namespace