Skip to content

Add testing for our WinRT-specific marshalers #12321

Closed
@jkoritzinsky

Description

@jkoritzinsky

We currently don't have any automated tests for our WinRT marshalling. Using the System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeImportAttribute pseduo-attribute, we can mark specific types within an assembly as Windows-Runtime types and make them use WinRT marshalling semantics without needing reg-free WinRT support. This pseudo-attribute is used within System.Runtime.WindowsRuntime in CoreFX to implement WinRT marshalling helpers.

We should use this feature to add some automated testing for the WinRT marshalling within CoreCLR.

Marshalers to test:

  • System.Nullable<T> -> Windows.Foundation.IReference<T>
  • System.Type -> Windows.UI.DirectUI.Xaml.TypeNameNative
  • System.Exception -> HRESULT
  • System.Collections.Generic.KeyValuePair<K,V> -> Windows.Foundation.Collections.IKeyValuePair<K,V>
  • System.Uri -> Windows.Foundation.Uri
  • System.ComponentModel.INotifyPropertyChanged and family
  • System.Collections.Specialized.INotifyCollectionChanged and family
  • Hidden-length arrays (implicit length parameter in signature after the array)
  • WinRT Delegates

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions