Back to Devexpress

AsyncDownloadPolicy Class

corelibraries-devexpress-dot-data-d71ee7a7.md

latest2.3 KB
Original Source

AsyncDownloadPolicy Class

Allows you to spot, analyze, and prohibit unwanted download requests.

Namespace : DevExpress.Data

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public static class AsyncDownloadPolicy
vb
Public Module AsyncDownloadPolicy

Remarks

Certain DevExpress UI controls can download data over the internet. These requests can be initiated in your code or through the internal control engine. The AsyncDownloadPolicyallows you to apply global download restrictions, create a “safe” resource whitelist, or track user/app initiated downloads and execute custom actions in response.

Call one of the following methods at application startup to apply a restrictive policy:

csharp
static void Main() {
    DevExpress.Data.AsyncDownloadPolicy.SuppressAll();
    DevExpress.Data.AsyncDownloadPolicy.RegisterTrustedUri(new Uri("https://www.devexpress.com"));
    Application.Run(new Form1());  
}
vb
Shared Sub Main()
    DevExpress.Data.AsyncDownloadPolicy.SuppressAll()
    DevExpress.Data.AsyncDownloadPolicy.RegisterTrustedUri(New Uri("https://www.devexpress.com"))
    Application.Run(New Form1())
End Sub

Read the following topic for detailed information and examples: Suppress Control Requests to Download Data from External URLs.

Inheritance

Object AsyncDownloadPolicy

See Also

AsyncDownloadPolicy Members

DevExpress.Data Namespace