Follow up #23. Currently, C++/WinRT requires three overloads of the member function named Event for registering and unregistering event handlers:
winrt::event_token Event(EventHandler);
Class::Event_revoker Event(winrt::auto_revoker_t, EventHandler);
void Event(winrt::event_token);
When the option -ms-extension-property is enabled, a type winrt::auto_revoker_type_t should be added, and the member __declspec(property(get = _get_Event_register)) T Event; should be defined, where T holds a reference to the current object, and T defines
winrt::event_token operator+=(EventHandler);
Class::Event_revoker operator+=(winrt::auto_revoker_type_t<EventHandler>);
void operator-=(winrt::event_token)
and winrt::auto_revoker_t is no longer needed.
Follow up #23. Currently, C++/WinRT requires three overloads of the member function named Event for registering and unregistering event handlers:
When the option -ms-extension-property is enabled, a type winrt::auto_revoker_type_t should be added, and the member __declspec(property(get = _get_Event_register)) T Event; should be defined, where T holds a reference to the current object, and T defines
and winrt::auto_revoker_t is no longer needed.