microsoft / microsoft/wil

`untyped_event` and `typed_event` do not work for events that don't derive from `EventHandler` or `TypedEventHandler` (eg `Windows.UI.Xaml.Data.CurrentChangingEventHandler`)

Open
#354 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
3k
Forks
300
Avg merge
19h 12m
Merged PRs (30d)
1

Description

untyped_event and typed_event require events that derive from EventHandler or TypedEventHandler respectively. However, there are a fair number of events that do not derive from these classes. For example, PropertyChanged INotifyPropertyChanged (which, admittedly, can be implemented via other WIL helpers) and Windows.UI.Xaml.Data.CurrentChangingEventHandler.

We should support wil::custom_event for events that use custom handlers/delegates.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing wil::untyped_event and wil::typed_event support, then compare them with custom-handler examples such as INotifyPropertyChanged and Windows.UI.Xaml.Data.CurrentChangingEventHandler. Done means wil::custom_event supports events whose handlers do not derive from EventHandler or TypedEventHandler, with coverage for the cited cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.