Edit

Share via


WorkItemTrackingHttpClientBase.DeleteWorkItemAsync Method

Definition

Overloads

DeleteWorkItemAsync(Int32, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently.

DeleteWorkItemAsync(Guid, Int32, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently.

DeleteWorkItemAsync(String, Int32, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently.

DeleteWorkItemAsync(Int32, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemDelete> DeleteWorkItemAsync (int id, Nullable<bool> destroy = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member DeleteWorkItemAsync : int * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemDelete>
override this.DeleteWorkItemAsync : int * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemDelete>

Parameters

id
Int32

ID of the work item to be deleted

destroy
Nullable<Boolean>

Optional parameter, if set to true, the work item is deleted permanently

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

DeleteWorkItemAsync(Guid, Int32, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemDelete> DeleteWorkItemAsync (Guid project, int id, Nullable<bool> destroy = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member DeleteWorkItemAsync : Guid * int * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemDelete>
override this.DeleteWorkItemAsync : Guid * int * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemDelete>

Parameters

project
Guid

Project ID

id
Int32

ID of the work item to be deleted

destroy
Nullable<Boolean>

Optional parameter, if set to true, the work item is deleted permanently

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

DeleteWorkItemAsync(String, Int32, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemDelete> DeleteWorkItemAsync (string project, int id, Nullable<bool> destroy = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member DeleteWorkItemAsync : string * int * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemDelete>
override this.DeleteWorkItemAsync : string * int * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItemDelete>

Parameters

project
String

Project ID or project name

id
Int32

ID of the work item to be deleted

destroy
Nullable<Boolean>

Optional parameter, if set to true, the work item is deleted permanently

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to