ISharePointCommandContext 接口
提供执行 SharePoint 命令的上下文。
此 API 不兼容 CLS。
命名空间: Microsoft.VisualStudio.SharePoint.Commands
程序集: Microsoft.VisualStudio.SharePoint.Commands(在 Microsoft.VisualStudio.SharePoint.Commands.dll 中)
语法
声明
<CLSCompliantAttribute(False)> _
Public Interface ISharePointCommandContext
[CLSCompliantAttribute(false)]
public interface ISharePointCommandContext
ISharePointCommandContext 类型公开以下成员。
属性
名称 | 说明 | |
---|---|---|
Logger | 获取在 Visual Studio 中可用来向“输出”窗口或“错误列表”窗口写入消息的日志服务。 | |
Site | 获取 Microsoft.SharePoint.SPSite,它表示运行命令的 SharePoint 网站集。 | |
Web | 获取 Microsoft.SharePoint.SPWeb,它表示运行命令的 SharePoint 网站。 |
页首
方法
名称 | 说明 | |
---|---|---|
Refresh | 使用 Microsoft.SharePoint.SPSite 和 Microsoft.SharePoint.SPWeb 对象的新实例,刷新上下文。 |
页首
备注
ISharePointCommandContext 是传递到每个 SharePoint 命令的第一个参数。 有关更多信息,请参见 如何:创建 SharePoint 命令。
请参见
参考
Microsoft.VisualStudio.SharePoint.Commands 命名空间