CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
async_completed_event_args.h
1
2#pragma once
3#include <system/eventargs.h>
4#include <system/exceptions.h>
5
6
7namespace System { namespace ComponentModel {
12 class ASPOSECPP_SHARED_CLASS AsyncCompletedEventArgs : public EventArgs
13 {
19 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
20 ASPOSECPP_SHARED_RTTI_INFO_DECL();
21
22 public:
24 ASPOSECPP_SHARED_API AsyncCompletedEventArgs();
29 ASPOSECPP_SHARED_API AsyncCompletedEventArgs(const System::Exception &error, bool canceled, const System::SharedPtr<System::Object>& userState);
32 ASPOSECPP_SHARED_API const System::Exception & get_Error() const;
35 ASPOSECPP_SHARED_API bool get_Cancelled() const;
38 ASPOSECPP_SHARED_API System::SharedPtr<Object> get_UserState() const;
39
40 protected:
41 ASPOSECPP_SHARED_API void RaiseExceptionIfNecessary();
42
43 private:
44 const System::Exception m_error;
45 bool m_cancelled;
46 System::SharedPtr<Object> m_userState;
47 };
48}}
An instance of this class is passed as the argument on to the AsyncCompletedEventHandler delegate....
Definition: async_completed_event_args.h:13
AsyncCompletedEventArgs(const System::Exception &error, bool canceled, const System::SharedPtr< System::Object > &userState)
Initializes a new instance of the System.ComponentModel.AsyncCompletedEventArgs class.
System::SharedPtr< Object > get_UserState() const
Gets the unique identifier for the asynchronous task. An object reference that uniquely identifies th...
bool get_Cancelled() const
Gets a value indicating whether an asynchronous operation has been canceled. true if the background o...
const System::Exception & get_Error() const
Gets a value indicating which error occurred during an asynchronous operation.
The base class for classes that represent a context that is passed to the event subscribers when an e...
Definition: eventargs.h:19
Template that represents wrapper of exceptions that are derived from Exception class.
Definition: exception.h:113
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: db_command.h:9