The implementation is backed by a smaller `IWinePropertySetImpl` interface for core operations (insertion, lookup, removal, iteration), which currently uses an `rb_tree` to store `HSTRING`-`IInspectable *` value pairs.
If needed, the `IWinePropertySetImpl` implementation can be later swapped out with a hash table for performance reasons, as `PropertySet` does not have an enumeration order guarantee, at least according to the MSDN docs.
-- v11: wintypes: Implement IMapView methods get_Size, HasKey, Lookup, Split for PropertySet. wintypes: Invoke MapChanged event handlers from PropertSet on entry removal and Clear(). wintypes: Invoke MapChanged event handlers from PropertySet on insertion. wintypes: Implement get_Current() for the IIterator implementation obtained from PropertySet. wintypes: Implement IIterator methods MoveNext() and get_HasCurrent() for PropertySet. wintypes: Implement IMap method GetView() for PropertySet. wintypes: Implement IMap methods HasKey, get_Count and Remove for PropertySet. wintypes: Implement IMap method Clear() for PropertySet. wintypes: Implement IMap methods Insert() and Lookup() for PropertySet. wintypes: Implement adding/removing IMapChangedEventHandlers for IObservableMap<HSTRING, IInspectable *>. wintypes: Add stubs for IKeyValuePair<HSTRING, IInspectable *>. wintypes: Add stubs for IIterator<IKeyValuePair<HSTRING, IInspectable *>>. wintypes: Add stubs for IMapView<HSTRING, IInspectable *>. wintypes: Add IIterable<IKeyValuePair<HSTRING, IInspectable *>> stubs to PropertySet implementation. wintypes: Add IObservableMap<HSTRING, IInspectable *> stubs to PropertySet implementation. wintypes: Add IMap<HSTRING, IInspectable *> stubs to PropertySet implementation. wintypes: Add stub for Windows.Foundation.Collections.PropertySet. wintypes/test: Add conformance tests for Windows.Foundation.Collections.PropertySet.
This merge request has too many patches to be relayed via email. Please visit the URL below to see the contents of the merge request. https://gitlab.winehq.org/wine/wine/-/merge_requests/6766
Each MR should ideally have its corresponding tests
The second commit does add conformance tests in `dlls/wintypes/tests/propertyset.c` and should cover all `IPropertySet` methods.
~5 patches or so for an MR would be best.
Right, but I'm not sure how to organize this into two MRs. Would it be acceptable for the first MR to only contain the stubs for the `I{Observable}Map`, `IMapView`, `IIterable` and `IIterator` interfaces (i.e, the first 9 commits)? The tests have been appropriately todo-ed and "untodo-ed" for every new feature added in a commit, so it does pass the tests.
Note that there are CI build failures. You will need to address that as well.
Yeah, my bad. The CI pipeline should run succesfully now.