LEADTOOLS Image File Support (Leadtools.Codecs assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
AsyncWebClient Property
See Also 
Leadtools.Codecs Namespace > RasterCodecs Class : AsyncWebClient Property



Gets the System.Net.WebClient object used for asynchronous operations.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property AsyncWebClient As WebClient
Visual Basic (Usage)Copy Code
Dim instance As RasterCodecs
Dim value As WebClient
 
value = instance.AsyncWebClient
C# 
public WebClient AsyncWebClient {get;}
C++/CLI 
public:
property WebClient^ AsyncWebClient {
   WebClient^ get();
}

Property Value

A System.Net.WebClient object that will be used for asynchronous operations.

Example

For an example, refer to UseAsync.

Remarks

The RasterCodecs object supports getting information and loading image files asnchronously through the use of the RasterCodecs.GetInformationAsync and RasterCodecs.LoadAsync methods. These methods will use an internal System.Net.WebClient object to perform their operations and this object will be created automatically on the first call to these methods and can be accessed through the AsyncWebClient property.

If it is desired to create the System.Net.WebClient object manually (for example, to subscribe to any of its event or set the credentials prior to invoking any read operations), you can call UseAsync to create the object, change its behavior and then call RasterCodecs.GetInformationAsync or RasterCodecs.LoadAsync.

Note:UseAsync, AsyncWebClient, IsAsyncBusy, and CancelAsync are only applicable when the RasterCodecs.GetInformationAsync or RasterCodecs.LoadAsync was with the versions that take a System.Uri parameter. The versions thet take a System.String or a System.IO.Stream does not use a System.Net.WebClient object internally. If you want to check the progress or cancel the operation then use the LoadImage event as normal.

Requirements

Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also