I have created a WinRT component in C# which accepts a collection as a parameter.
namespace MyNamespace {
public sealed class MyClass {
public MyFunction(IReadOnlyDictionary<string, string> properties) {
}
}
}
I am trying to use this component in javascript as follows:
var x = new MyNamespace.MyClass();
x.MyFunction({'aaa': 'bbbb'});
I am not sure why this is not working. Any Ideas?
I think this is your answer.
var ps = new Windows.Foundation.Collections.PropertySet();
ps['aaa'] = "bbb";
var x = new MyNamespace.MyClass();
x.MyFunction(ps);
"Your WinRT component will need to expose (or reuse) a concrete class implementing the specific instantiation of IMap that you need..."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With