共用方式為


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.SPSiteMicrosoft.SharePoint.SPWeb 物件的新執行個體,重新整理內容。

回頁首

備註

ISharePointCommandContext 會傳遞給每個 SharePoint 命令的第一個參數。如需詳細資訊,請參閱 HOW TO:建立 SharePoint 命令

請參閱

參考

Microsoft.VisualStudio.SharePoint.Commands 命名空間

其他資源

HOW TO:建立 SharePoint 命令