Edit

Share via


GitHttpClientBase.GetBlobAsync Method

Definition

Overloads

GetBlobAsync(String, String, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

GetBlobAsync(String, Guid, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

GetBlobAsync(Guid, String, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

GetBlobAsync(Guid, Guid, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

GetBlobAsync(String, String, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

GetBlobAsync(String, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

GetBlobAsync(Guid, String, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

GetBlobAsync(Guid, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

GetBlobAsync(Guid, Guid, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

GetBlobAsync(String, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

GetBlobAsync(Guid, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

GetBlobAsync(String, Guid, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

GetBlobAsync(String, String, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(string project, string repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, Nullable<bool> resolveLfs = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.GetBlobAsync : string * string * string * Nullable<bool> * string * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

project
String

Project ID or project name

repositoryId
String

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

resolveLfs
Nullable<Boolean>

If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetBlobAsync(String, Guid, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(string project, Guid repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, Nullable<bool> resolveLfs = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.GetBlobAsync : string * Guid * string * Nullable<bool> * string * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

project
String

Project ID or project name

repositoryId
Guid

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

resolveLfs
Nullable<Boolean>

If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetBlobAsync(Guid, String, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(Guid project, string repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, Nullable<bool> resolveLfs = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.GetBlobAsync : Guid * string * string * Nullable<bool> * string * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

project
Guid

Project ID

repositoryId
String

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

resolveLfs
Nullable<Boolean>

If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetBlobAsync(Guid, Guid, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(Guid project, Guid repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, Nullable<bool> resolveLfs = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.GetBlobAsync : Guid * Guid * string * Nullable<bool> * string * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

project
Guid

Project ID

repositoryId
Guid

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

resolveLfs
Nullable<Boolean>

If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetBlobAsync(String, String, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(string project, string repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member GetBlobAsync : string * string * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>
override this.GetBlobAsync : string * string * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

project
String

Project ID or project name

repositoryId
String

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetBlobAsync(String, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(string repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, Nullable<bool> resolveLfs = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.GetBlobAsync : string * string * Nullable<bool> * string * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

repositoryId
String

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

resolveLfs
Nullable<Boolean>

If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetBlobAsync(Guid, String, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(Guid project, string repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member GetBlobAsync : Guid * string * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>
override this.GetBlobAsync : Guid * string * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

project
Guid

Project ID

repositoryId
String

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetBlobAsync(Guid, String, Nullable<Boolean>, String, Nullable<Boolean>, Object, CancellationToken)

[Preview API] Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(Guid repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, Nullable<bool> resolveLfs = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.GetBlobAsync : Guid * string * Nullable<bool> * string * Nullable<bool> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

repositoryId
Guid

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

resolveLfs
Nullable<Boolean>

If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetBlobAsync(Guid, Guid, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(Guid project, Guid repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member GetBlobAsync : Guid * Guid * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>
override this.GetBlobAsync : Guid * Guid * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

project
Guid

Project ID

repositoryId
Guid

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetBlobAsync(String, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(string repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member GetBlobAsync : string * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>
override this.GetBlobAsync : string * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

repositoryId
String

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetBlobAsync(Guid, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(Guid repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member GetBlobAsync : Guid * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>
override this.GetBlobAsync : Guid * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

repositoryId
Guid

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetBlobAsync(String, Guid, String, Nullable<Boolean>, String, Object, CancellationToken)

Get a single blob.

public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef> GetBlobAsync(string project, Guid repositoryId, string sha1, Nullable<bool> download = null, string fileName = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
abstract member GetBlobAsync : string * Guid * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>
override this.GetBlobAsync : string * Guid * string * Nullable<bool> * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitBlobRef>

Parameters

project
String

Project ID or project name

repositoryId
Guid

The name or ID of the repository.

sha1
String

SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.

download
Nullable<Boolean>

If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip

fileName
String

Provide a fileName to use for a download.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to