Edit

Share via


GitHttpClientBase.CreateAttachmentAsync Method

Definition

Overloads

CreateAttachmentAsync(Stream, String, String, String, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

CreateAttachmentAsync(Stream, String, String, Guid, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

CreateAttachmentAsync(Stream, Guid, String, String, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

CreateAttachmentAsync(Stream, String, String, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

CreateAttachmentAsync(Stream, String, Guid, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

CreateAttachmentAsync(Stream, Guid, String, Guid, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

CreateAttachmentAsync(Stream, String, String, String, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment> CreateAttachmentAsync(System.IO.Stream uploadStream, string project, string fileName, string repositoryId, int pullRequestId, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member CreateAttachmentAsync : System.IO.Stream * string * string * string * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>
override this.CreateAttachmentAsync : System.IO.Stream * string * string * string * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>

Parameters

uploadStream
Stream

Stream to upload

project
String

Project ID or project name

fileName
String

The name of the file.

repositoryId
String

The repository ID of the pull request’s target branch.

pullRequestId
Int32

ID of the pull request.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

CreateAttachmentAsync(Stream, String, String, Guid, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment> CreateAttachmentAsync(System.IO.Stream uploadStream, string project, string fileName, Guid repositoryId, int pullRequestId, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member CreateAttachmentAsync : System.IO.Stream * string * string * Guid * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>
override this.CreateAttachmentAsync : System.IO.Stream * string * string * Guid * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>

Parameters

uploadStream
Stream

Stream to upload

project
String

Project ID or project name

fileName
String

The name of the file.

repositoryId
Guid

The repository ID of the pull request’s target branch.

pullRequestId
Int32

ID of the pull request.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

CreateAttachmentAsync(Stream, Guid, String, String, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment> CreateAttachmentAsync(System.IO.Stream uploadStream, Guid project, string fileName, string repositoryId, int pullRequestId, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member CreateAttachmentAsync : System.IO.Stream * Guid * string * string * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>
override this.CreateAttachmentAsync : System.IO.Stream * Guid * string * string * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>

Parameters

uploadStream
Stream

Stream to upload

project
Guid

Project ID

fileName
String

The name of the file.

repositoryId
String

The repository ID of the pull request’s target branch.

pullRequestId
Int32

ID of the pull request.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

CreateAttachmentAsync(Stream, String, String, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment> CreateAttachmentAsync(System.IO.Stream uploadStream, string fileName, string repositoryId, int pullRequestId, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member CreateAttachmentAsync : System.IO.Stream * string * string * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>
override this.CreateAttachmentAsync : System.IO.Stream * string * string * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>

Parameters

uploadStream
Stream

Stream to upload

fileName
String

The name of the file.

repositoryId
String

The repository ID of the pull request’s target branch.

pullRequestId
Int32

ID of the pull request.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

CreateAttachmentAsync(Stream, String, Guid, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment> CreateAttachmentAsync(System.IO.Stream uploadStream, string fileName, Guid repositoryId, int pullRequestId, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member CreateAttachmentAsync : System.IO.Stream * string * Guid * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>
override this.CreateAttachmentAsync : System.IO.Stream * string * Guid * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>

Parameters

uploadStream
Stream

Stream to upload

fileName
String

The name of the file.

repositoryId
Guid

The repository ID of the pull request’s target branch.

pullRequestId
Int32

ID of the pull request.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

CreateAttachmentAsync(Stream, Guid, String, Guid, Int32, Object, CancellationToken)

[Preview API] Attach a new file to a pull request.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment> CreateAttachmentAsync(System.IO.Stream uploadStream, Guid project, string fileName, Guid repositoryId, int pullRequestId, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member CreateAttachmentAsync : System.IO.Stream * Guid * string * Guid * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>
override this.CreateAttachmentAsync : System.IO.Stream * Guid * string * Guid * int * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.Attachment>

Parameters

uploadStream
Stream

Stream to upload

project
Guid

Project ID

fileName
String

The name of the file.

repositoryId
Guid

The repository ID of the pull request’s target branch.

pullRequestId
Int32

ID of the pull request.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to