AsyncDownloadPolicy Class
Allows you to spot, analyze, and prohibit unwanted download requests.
Namespace: DevExpress.Data
Assembly: DevExpress.Data.v24.2.dll
Declaration
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 AsyncDownloadPolicy
allows 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:
- SuppressAll() – Suppresses all downloads.
- ThrowAlways() – Throws an exception when a control initiates a download.
static void Main() {
DevExpress.Data.AsyncDownloadPolicy.SuppressAll();
DevExpress.Data.AsyncDownloadPolicy.RegisterTrustedUri(new Uri("https://www.devexpress.com"));
Application.Run(new Form1());
}
Read the following topic for detailed information and examples: Suppress Control Requests to Download Data from External URLs.
Inheritance
Object
AsyncDownloadPolicy
See Also