Language

FilesAccessor.FirstAsync(CancellationToken) Method

Definition

Convenience: the first attached file, or null when none. Sugar over ListAsync(CancellationToken)[0]; shares ListAsync(CancellationToken)'s resolution so it stays correct when later scopes hydrate through Graph.

public System.Threading.Tasks.Task<Microsoft.Teams.Apps.Files.IncomingFile?> FirstAsync(System.Threading.CancellationToken cancellationToken = default);
member this.FirstAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Apps.Files.IncomingFile>
Public Function FirstAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of IncomingFile)

Parameters

cancellationToken
CancellationToken

A token to cancel hydration once later scopes fetch through Graph.

Returns

Applies to