Delen via


ISharePointCommandContext Interface

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides the context in which a SharePoint command is being executed.

This API is not CLS-compliant. 

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

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
Public Interface ISharePointCommandContext
[CLSCompliantAttribute(false)]
public interface ISharePointCommandContext

The ISharePointCommandContext type exposes the following members.

Properties

  Name Description
Public property Logger Gets the log service which you can use to write messages to the Output window or Error List window in Visual Studio.
Public property Site Gets a Microsoft.SharePoint.SPSite that represents the SharePoint site collection on which the command is run.
Public property Web Gets a Microsoft.SharePoint.SPWeb that represents the SharePoint site on which the command is run.

Top

Methods

  Name Description
Public method Refresh Refreshes the context with new instances of the Microsoft.SharePoint.SPSite and Microsoft.SharePoint.SPWeb objects.

Top

Remarks

An ISharePointCommandContext is passed to the first parameter of every SharePoint command. For more information, see How to: Create a SharePoint Command.

See Also

Reference

Microsoft.VisualStudio.SharePoint.Commands Namespace

Other Resources

How to: Create a SharePoint Command