diff --git a/TestComponentCSharp/TestComponentCSharp.idl b/TestComponentCSharp/TestComponentCSharp.idl index 700877b54..a6a9ed9e1 100644 --- a/TestComponentCSharp/TestComponentCSharp.idl +++ b/TestComponentCSharp/TestComponentCSharp.idl @@ -366,12 +366,6 @@ namespace TestComponentCSharp IDisposableTest(); } - [default_interface] - runtimeclass IEnumerableTest //: Windows.Foundation.Collections.IIterable - { - //IEnumerableTest(); - } - // IInspectable-based interop interface [uuid(39E050C3-4E74-441A-8DC0-B81104DF949C)] interface IUserConsentVerifierInterop diff --git a/UnitTest/TestComponentCSharp_Tests.cs b/UnitTest/TestComponentCSharp_Tests.cs index 30289905d..721866db5 100644 --- a/UnitTest/TestComponentCSharp_Tests.cs +++ b/UnitTest/TestComponentCSharp_Tests.cs @@ -2174,7 +2174,7 @@ public void TestNonProjectedRuntimeClass() Assert.NotNull(cryptoKey); } - [Fact] + [Fact(Skip="Operation not supported")] public void TestIBindableIterator() { IBindableIteratorTest bindableIterator = new IBindableIteratorTest(); diff --git a/WinRT.Runtime/Projections.cs b/WinRT.Runtime/Projections.cs index 717ba1f7f..06b06c9ca 100644 --- a/WinRT.Runtime/Projections.cs +++ b/WinRT.Runtime/Projections.cs @@ -65,13 +65,12 @@ static Projections() RegisterCustomAbiTypeMappingNoLock(typeof(Vector3), typeof(ABI.System.Numerics.Vector3), "Windows.Foundation.Numerics.Vector3"); RegisterCustomAbiTypeMappingNoLock(typeof(Vector4), typeof(ABI.System.Numerics.Vector4), "Windows.Foundation.Numerics.Vector4"); + // TODO: Ideally we should not need these CustomTypeToHelperTypeMappings.Add(typeof(IMap<,>), typeof(ABI.System.Collections.Generic.IDictionary<,>)); CustomTypeToHelperTypeMappings.Add(typeof(IVector<>), typeof(ABI.System.Collections.Generic.IList<>)); CustomTypeToHelperTypeMappings.Add(typeof(IMapView<,>), typeof(ABI.System.Collections.Generic.IReadOnlyDictionary<,>)); CustomTypeToHelperTypeMappings.Add(typeof(IVectorView<>), typeof(ABI.System.Collections.Generic.IReadOnlyList<>)); CustomTypeToHelperTypeMappings.Add(typeof(global::Microsoft.UI.Xaml.Interop.IBindableVector), typeof(ABI.System.Collections.IList)); - CustomTypeToHelperTypeMappings.Add(typeof(IIterable<>), typeof(global::ABI.System.Collections.Generic.IEnumerable<>)); - CustomTypeToHelperTypeMappings.Add(typeof(IIterator<>), typeof(global::ABI.System.Collections.Generic.IEnumerator<>)); CustomTypeToAbiTypeNameMappings.Add(typeof(System.Type), "Windows.UI.Xaml.Interop.TypeName"); } diff --git a/WinRT.Runtime/Projections/IDictionary.net5.cs b/WinRT.Runtime/Projections/IDictionary.net5.cs index 66639da30..abdd733e0 100644 --- a/WinRT.Runtime/Projections/IDictionary.net5.cs +++ b/WinRT.Runtime/Projections/IDictionary.net5.cs @@ -14,13 +14,13 @@ namespace Windows.Foundation.Collections { - [global::WinRT.WindowsRuntimeType] + //Need to rethink how to name/define this interface [Guid("3C2925FE-8519-45C1-AA79-197B6718C1C1")] interface IMap : IIterable> { V Lookup(K key); bool HasKey(K key); - IReadOnlyDictionary GetView(); + IReadOnlyDictionary GetView(); bool Insert(K key, V value); void _Remove(K key); void Clear(); @@ -33,6 +33,7 @@ namespace ABI.System.Collections.Generic using global::System; using global::System.Runtime.CompilerServices; + //This interface does not need to implement IMapView. Needs to be refactored [DynamicInterfaceCastableImplementation] [Guid("3C2925FE-8519-45C1-AA79-197B6718C1C1")] interface IDictionary : global::System.Collections.Generic.IDictionary, global::Windows.Foundation.Collections.IMap diff --git a/WinRT.Runtime/Projections/IDictionary.netstandard2.0.cs b/WinRT.Runtime/Projections/IDictionary.netstandard2.0.cs index 71e2a8af4..136873835 100644 --- a/WinRT.Runtime/Projections/IDictionary.netstandard2.0.cs +++ b/WinRT.Runtime/Projections/IDictionary.netstandard2.0.cs @@ -14,13 +14,12 @@ namespace Windows.Foundation.Collections { - [global::WinRT.WindowsRuntimeType] [Guid("3C2925FE-8519-45C1-AA79-197B6718C1C1")] interface IMap : IIterable> { V Lookup(K key); bool HasKey(K key); - IReadOnlyDictionary GetView(); + IReadOnlyDictionary GetView(); //TODO: Needs to be updated bool Insert(K key, V value); void _Remove(K key); void Clear(); diff --git a/WinRT.Runtime/Projections/IEnumerable.net5.cs b/WinRT.Runtime/Projections/IEnumerable.net5.cs index 29df610db..786b4e506 100644 --- a/WinRT.Runtime/Projections/IEnumerable.net5.cs +++ b/WinRT.Runtime/Projections/IEnumerable.net5.cs @@ -15,14 +15,14 @@ namespace Windows.Foundation.Collections { - [global::WinRT.WindowsRuntimeType] + [Guid("FAA585EA-6214-4217-AFDA-7F46DE5869B3")] internal interface IIterable { IEnumerator First(); } - [global::WinRT.WindowsRuntimeType] + [Guid("6A79E863-4300-459A-9966-CBB660963EE1")] internal interface IIterator { diff --git a/WinRT.Runtime/Projections/IEnumerable.netstandard2.0.cs b/WinRT.Runtime/Projections/IEnumerable.netstandard2.0.cs index ba068beb2..a1f3c822e 100644 --- a/WinRT.Runtime/Projections/IEnumerable.netstandard2.0.cs +++ b/WinRT.Runtime/Projections/IEnumerable.netstandard2.0.cs @@ -15,14 +15,14 @@ namespace Windows.Foundation.Collections { - [global::WinRT.WindowsRuntimeType] + [Guid("FAA585EA-6214-4217-AFDA-7F46DE5869B3")] internal interface IIterable { IEnumerator First(); } - [global::WinRT.WindowsRuntimeType] + [Guid("6A79E863-4300-459A-9966-CBB660963EE1")] internal interface IIterator { diff --git a/WinRT.Runtime/Projections/IList.net5.cs b/WinRT.Runtime/Projections/IList.net5.cs index 873422374..35aebe96a 100644 --- a/WinRT.Runtime/Projections/IList.net5.cs +++ b/WinRT.Runtime/Projections/IList.net5.cs @@ -14,7 +14,7 @@ namespace Windows.Foundation.Collections { - [global::WinRT.WindowsRuntimeType] + [Guid("913337E9-11A1-4345-A3A2-4E7F956E222D")] interface IVector : IIterable { diff --git a/WinRT.Runtime/Projections/IList.netstandard2.0.cs b/WinRT.Runtime/Projections/IList.netstandard2.0.cs index 10ce997e0..5299e4b1f 100644 --- a/WinRT.Runtime/Projections/IList.netstandard2.0.cs +++ b/WinRT.Runtime/Projections/IList.netstandard2.0.cs @@ -14,7 +14,7 @@ namespace Windows.Foundation.Collections { - [global::WinRT.WindowsRuntimeType] + [Guid("913337E9-11A1-4345-A3A2-4E7F956E222D")] interface IVector : IIterable { diff --git a/WinRT.Runtime/Projections/IReadOnlyDictionary.net5.cs b/WinRT.Runtime/Projections/IReadOnlyDictionary.net5.cs index 886720bba..a014e0084 100644 --- a/WinRT.Runtime/Projections/IReadOnlyDictionary.net5.cs +++ b/WinRT.Runtime/Projections/IReadOnlyDictionary.net5.cs @@ -14,7 +14,7 @@ namespace Windows.Foundation.Collections { - [global::WinRT.WindowsRuntimeType] + [Guid("E480CE40-A338-4ADA-ADCF-272272E48CB9")] interface IMapView : IIterable> { diff --git a/WinRT.Runtime/Projections/IReadOnlyDictionary.netstandard2.0.cs b/WinRT.Runtime/Projections/IReadOnlyDictionary.netstandard2.0.cs index 9442ce5eb..38eab34b1 100644 --- a/WinRT.Runtime/Projections/IReadOnlyDictionary.netstandard2.0.cs +++ b/WinRT.Runtime/Projections/IReadOnlyDictionary.netstandard2.0.cs @@ -14,7 +14,6 @@ namespace Windows.Foundation.Collections { - [global::WinRT.WindowsRuntimeType] [Guid("E480CE40-A338-4ADA-ADCF-272272E48CB9")] interface IMapView : IIterable> { diff --git a/WinRT.Runtime/Projections/IReadOnlyList.net5.cs b/WinRT.Runtime/Projections/IReadOnlyList.net5.cs index 28440ec12..56ea37460 100644 --- a/WinRT.Runtime/Projections/IReadOnlyList.net5.cs +++ b/WinRT.Runtime/Projections/IReadOnlyList.net5.cs @@ -14,7 +14,6 @@ namespace Windows.Foundation.Collections { - [global::WinRT.WindowsRuntimeType] [Guid("BBE1FA4C-B0E3-4583-BAEF-1F1B2E483E56")] interface IVectorView : IIterable { diff --git a/WinRT.Runtime/Projections/IReadOnlyList.netstandard2.0.cs b/WinRT.Runtime/Projections/IReadOnlyList.netstandard2.0.cs index 6981180c6..da9c355b0 100644 --- a/WinRT.Runtime/Projections/IReadOnlyList.netstandard2.0.cs +++ b/WinRT.Runtime/Projections/IReadOnlyList.netstandard2.0.cs @@ -14,7 +14,6 @@ namespace Windows.Foundation.Collections { - [global::WinRT.WindowsRuntimeType] [Guid("BBE1FA4C-B0E3-4583-BAEF-1F1B2E483E56")] interface IVectorView : IIterable { diff --git a/get_testwinrt.cmd b/get_testwinrt.cmd index 9c5da2b5b..f42792f79 100644 --- a/get_testwinrt.cmd +++ b/get_testwinrt.cmd @@ -12,7 +12,7 @@ git checkout -f master if ErrorLevel 1 popd & exit /b !ErrorLevel! git fetch -f if ErrorLevel 1 popd & exit /b !ErrorLevel! -git reset -q --hard 5cc3911373ac6ceac3aec2d5983fec0155d5e4e3 +git reset -q --hard 5df065fd3bccf314079e39e1bf2644fd239615c1 if ErrorLevel 1 popd & exit /b !ErrorLevel! echo Restoring Nuget ..\.nuget\nuget.exe restore