TeamFoundationVersionControlService.Shelve Method (TeamFoundationRequestContext, String, String, array<String , Shelveset, Boolean, PathLength)
Copies the pending changes to a shelveset. Changes will remain in the workspace as well.
Namespace: Microsoft.TeamFoundation.VersionControl.Server
Assembly: Microsoft.TeamFoundation.VersionControl.Server (in Microsoft.TeamFoundation.VersionControl.Server.dll)
Syntax
'Declaration
Public Function Shelve ( _
requestContext As TeamFoundationRequestContext, _
workspaceName As String, _
workspaceOwner As String, _
serverItems As String(), _
shelveset As Shelveset, _
replace As Boolean, _
maxClientPathLength As PathLength _
) As List(Of Failure)
public List<Failure> Shelve(
TeamFoundationRequestContext requestContext,
string workspaceName,
string workspaceOwner,
string[] serverItems,
Shelveset shelveset,
bool replace,
PathLength maxClientPathLength
)
public:
List<Failure^>^ Shelve(
TeamFoundationRequestContext^ requestContext,
String^ workspaceName,
String^ workspaceOwner,
array<String^>^ serverItems,
Shelveset^ shelveset,
bool replace,
PathLength maxClientPathLength
)
member Shelve :
requestContext:TeamFoundationRequestContext *
workspaceName:string *
workspaceOwner:string *
serverItems:string[] *
shelveset:Shelveset *
replace:bool *
maxClientPathLength:PathLength -> List<Failure>
public function Shelve(
requestContext : TeamFoundationRequestContext,
workspaceName : String,
workspaceOwner : String,
serverItems : String[],
shelveset : Shelveset,
replace : boolean,
maxClientPathLength : PathLength
) : List<Failure>
Parameters
requestContext
Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContextThe request context.
workspaceName
Type: System.StringName of the workspace to shelve from.
workspaceOwner
Type: System.StringUsername of the workspace's owner.
serverItems
Type: array<System.String[]List of items to shelve.
shelveset
Type: Microsoft.TeamFoundation.VersionControl.Server.ShelvesetShelveset object populated with metadata (name, owner, comment, etc.)
replace
Type: System.BooleanIf true and there is already a shelveset with the same name, it will be deleted.
maxClientPathLength
Type: Microsoft.TeamFoundation.VersionControl.Common.PathLengthThe maximum client supported server path length.
Return Value
Type: System.Collections.Generic.List<Failure>
The list of failures which occured while trying to shelve.
Remarks
The call sequence for Shelve() is similar to Checkin(). Clients should: 1) call QueryPendingSets() 2) For each edited file, upload the content 3) Call Shelve() with the list of server items from 1) 4) Call UndoPendingChanges() if "move" behavior is desired.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.