Language

FileDownloader(HttpClient, ILogger<FileDownloader>) Constructor

Definition

Opens byte streams for inbound files, keyed on conversation scope so every scope's receive path extends this one place rather than branching in callers.

public FileDownloader(System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILogger<Microsoft.Teams.Apps.Files.FileDownloader>? logger = default);
new Microsoft.Teams.Apps.Files.FileDownloader : System.Net.Http.HttpClient * Microsoft.Extensions.Logging.ILogger<Microsoft.Teams.Apps.Files.FileDownloader> -> Microsoft.Teams.Apps.Files.FileDownloader
Public Sub New (httpClient As HttpClient, Optional logger As ILogger(Of FileDownloader) = Nothing)

Parameters

httpClient
HttpClient

Client used to fetch file bytes. Supplied by DI; must not be null.

logger
ILogger<FileDownloader>

Logger used to record which route produced the bytes. Which route ran is otherwise invisible from outside, and the two routes fail in different ways, so a developer diagnosing a download has no way to tell them apart without it.

Remarks

Initializes a new instance of the FileDownloader class.

Applies to