表示特定项目项的部署上下文。
命名空间:  Microsoft.VisualStudio.SharePoint.Deployment
程序集:  Microsoft.VisualStudio.SharePoint(在 Microsoft.VisualStudio.SharePoint.dll 中)
语法
声明
Public Interface ISharePointProjectItemDeploymentContext _
    Inherits IDeploymentContext, IAnnotatedObject
public interface ISharePointProjectItemDeploymentContext : IDeploymentContext, 
    IAnnotatedObject
ISharePointProjectItemDeploymentContext 类型公开以下成员。
属性
| 名称 | 说明 | |
|---|---|---|
| .gif) | Annotations | 获取实例 IAnnotationDictionary,以便关联自定义数据和实现 IAnnotatedObject 接口的对象。 (继承自 IAnnotatedObject。) | 
| .gif) | Feature | 获取与项目项关联的主要功能。 | 
| .gif) | FeatureScope | 获取一个值,该值表示部署项目项功能的范围。 | 
| .gif) | IsDeploying | 指示是否正在部署项目。 (继承自 IDeploymentContext。) | 
| .gif) | IsRetracting | 指示是否正在撤消项目。 (继承自 IDeploymentContext。) | 
| .gif) | Logger | 提供对项目记录器的访问。 (继承自 IDeploymentContext。) | 
| .gif) | Project | 提供对正在部署或撤消的当前项目的访问。 (继承自 IDeploymentContext。) | 
| .gif) | ProjectItem | 获取要部署的项目项。 | 
页首
方法
| 名称 | 说明 | |
|---|---|---|
| .gif) | SiteCollectionUrl | 返回项目根据 SharePoint 连接到的 Microsoft.SharePoint.SPSite 的规范 URL。 (继承自 IDeploymentContext。) | 
| .gif) | SiteUrl | 返回项目根据 SharePoint 连接到的 Microsoft.SharePoint.SPWeb 的规范 URL。 (继承自 IDeploymentContext。) | 
| .gif) | WebApplicationUrl | 返回 SPWebApplication 的根 URL。 (继承自 IDeploymentContext。) | 
页首
备注
使用 ISharePointProjectItemDeploymentContext 对象来确定已部署的项目项及其文件在服务器上的位置。 Visual Studio 将 ISharePointProjectItemDeploymentContext 对象传递给 DeploymentStepStarted、DeploymentStepCompleted 以及 ProjectItemStartupUrlRequested 事件的事件处理程序。