Indicates that an asynchronous save operation has been completed.
public event EventHandler<CodecsSaveAsyncCompletedEventArgs> SaveAsyncCompleted
public:
event EventHandler<Leadtools::Codecs::CodecsSaveAsyncCompletedEventArgs^>^ SaveAsyncCompleted
synchronized public void addSaveAsyncCompletedListener(CodecsSaveAsyncCompletedListener listener)
synchronized public void removeSaveAsyncCompletedListener(CodecsSaveAsyncCompletedListener listener)
def SaveAsyncCompleted(sender,e): # sender: RasterCodecs e: CodecsSaveAsyncCompletedEventArgs
NOTE: This topic is part of RasterCodecs
Async support using the .NET System.ComponentMode.AsyncOperation
model. For .NET async/await
support this type/member is not used. Instead, refer to RasterCodecs Async Operations.
The RasterCodecs class supports saving image files asynchronously using the SaveAsync(RasterImage,Uri,RasterImageFormat,int,int,int,object) methods. When calling any of these methods, the caller thread will not be blocked and the method will return instantly.
When the RasterCodecs object finishes saving the image, the SaveAsyncCompleted event is fired to notify that the operation is completed and whether any errors occurred.
The SaveAsyncCompleted event uses a data argument object of type CodecsSaveAsyncCompletedEventArgs. This class contains the following properties:
Property |
Description |
---|---|
CodecsSaveAsyncCompletedEventArgs.Uri, CodecsSaveAsyncCompletedEventArgs.Stream and
CodecsSaveAsyncCompletedEventArgs.FileName |
Contains the URI, stream or file name passed to the method that initialized this asynchronous operation. Only one of these properties can be a valid value (not a null reference) at any time. The property that contains a valid reference depends on which version overload of the SaveAsync(RasterImage,Uri,RasterImageFormat,int,int,int,object) method has been called. For example, if
SaveAsync(RasterImage image, Uri uri, RasterImageFormat format, int bitsPerPixel, object userState) |
Contains the original RasterImage object passed to the calling save method. |
|
Contains any errors that might have occurred during the asynchronous operation. You must check this value when the SaveAsyncCompleted event fires and make sure it does not contain a valid System.Exception object. |
|
Contains a value indicating whether an asynchronous operation has been canceled. For example, by calling CancelAsync when using SaveAsync with a URL. |
Parameter | Type | Description |
---|---|---|
sender | object | The source of the event. |
e | CodecsSaveAsyncCompletedEventArgs | The event data. |
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document