AgentHostExtensions.AddAgentAttachmentDownloader Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers the AttachmentDownloader for non-Teams channels. This downloader handles standard HTTP attachment URLs.
public static Microsoft.Extensions.Hosting.IHostApplicationBuilder AddAgentAttachmentDownloader(this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder);
static member AddAgentAttachmentDownloader : Microsoft.Extensions.Hosting.IHostApplicationBuilder -> Microsoft.Extensions.Hosting.IHostApplicationBuilder
<Extension()>
Public Function AddAgentAttachmentDownloader (builder As IHostApplicationBuilder) As IHostApplicationBuilder
Parameters
- builder
- IHostApplicationBuilder
The host application builder.
Returns
The same builder for chaining.
Remarks
This is a convenience method equivalent to:
builder.AddAgentFileDownloader(new AttachmentDownloader(httpClientFactory));
The IHttpClientFactory dependency is resolved at runtime from DI. This method should only be called once.