Skip to content

Commit

Permalink
Undid changes not required for the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwalchadha committed Nov 10, 2020
1 parent 642c651 commit 8619e44
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 24 deletions.
6 changes: 0 additions & 6 deletions TestComponentCSharp/TestComponentCSharp.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion UnitTest/TestComponentCSharp_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,7 @@ public void TestNonProjectedRuntimeClass()
Assert.NotNull(cryptoKey);
}

[Fact]
[Fact(Skip="Operation not supported")]
public void TestIBindableIterator()
{
IBindableIteratorTest bindableIterator = new IBindableIteratorTest();
Expand Down
3 changes: 1 addition & 2 deletions WinRT.Runtime/Projections.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
5 changes: 3 additions & 2 deletions WinRT.Runtime/Projections/IDictionary.net5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<K, V> : IIterable<IKeyValuePair<K, V>>
{
V Lookup(K key);
bool HasKey(K key);
IReadOnlyDictionary<K, V> GetView();
IReadOnlyDictionary<K, V> GetView();
bool Insert(K key, V value);
void _Remove(K key);
void Clear();
Expand All @@ -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<K, V> : global::System.Collections.Generic.IDictionary<K, V>, global::Windows.Foundation.Collections.IMap<K, V>
Expand Down
3 changes: 1 addition & 2 deletions WinRT.Runtime/Projections/IDictionary.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@

namespace Windows.Foundation.Collections
{
[global::WinRT.WindowsRuntimeType]
[Guid("3C2925FE-8519-45C1-AA79-197B6718C1C1")]
interface IMap<K, V> : IIterable<IKeyValuePair<K, V>>
{
V Lookup(K key);
bool HasKey(K key);
IReadOnlyDictionary<K, V> GetView();
IReadOnlyDictionary<K, V> GetView(); //TODO: Needs to be updated
bool Insert(K key, V value);
void _Remove(K key);
void Clear();
Expand Down
4 changes: 2 additions & 2 deletions WinRT.Runtime/Projections/IEnumerable.net5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Windows.Foundation.Collections
{
[global::WinRT.WindowsRuntimeType]

[Guid("FAA585EA-6214-4217-AFDA-7F46DE5869B3")]
internal interface IIterable<T>
{
IEnumerator<T> First();
}

[global::WinRT.WindowsRuntimeType]

[Guid("6A79E863-4300-459A-9966-CBB660963EE1")]
internal interface IIterator<T>
{
Expand Down
4 changes: 2 additions & 2 deletions WinRT.Runtime/Projections/IEnumerable.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

namespace Windows.Foundation.Collections
{
[global::WinRT.WindowsRuntimeType]

[Guid("FAA585EA-6214-4217-AFDA-7F46DE5869B3")]
internal interface IIterable<T>
{
IEnumerator<T> First();
}

[global::WinRT.WindowsRuntimeType]

[Guid("6A79E863-4300-459A-9966-CBB660963EE1")]
internal interface IIterator<T>
{
Expand Down
2 changes: 1 addition & 1 deletion WinRT.Runtime/Projections/IList.net5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Windows.Foundation.Collections
{
[global::WinRT.WindowsRuntimeType]

[Guid("913337E9-11A1-4345-A3A2-4E7F956E222D")]
interface IVector<T> : IIterable<T>
{
Expand Down
2 changes: 1 addition & 1 deletion WinRT.Runtime/Projections/IList.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Windows.Foundation.Collections
{
[global::WinRT.WindowsRuntimeType]

[Guid("913337E9-11A1-4345-A3A2-4E7F956E222D")]
interface IVector<T> : IIterable<T>
{
Expand Down
2 changes: 1 addition & 1 deletion WinRT.Runtime/Projections/IReadOnlyDictionary.net5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Windows.Foundation.Collections
{
[global::WinRT.WindowsRuntimeType]

[Guid("E480CE40-A338-4ADA-ADCF-272272E48CB9")]
interface IMapView<K, V> : IIterable<IKeyValuePair<K, V>>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace Windows.Foundation.Collections
{
[global::WinRT.WindowsRuntimeType]
[Guid("E480CE40-A338-4ADA-ADCF-272272E48CB9")]
interface IMapView<K, V> : IIterable<IKeyValuePair<K, V>>
{
Expand Down
1 change: 0 additions & 1 deletion WinRT.Runtime/Projections/IReadOnlyList.net5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace Windows.Foundation.Collections
{
[global::WinRT.WindowsRuntimeType]
[Guid("BBE1FA4C-B0E3-4583-BAEF-1F1B2E483E56")]
interface IVectorView<T> : IIterable<T>
{
Expand Down
1 change: 0 additions & 1 deletion WinRT.Runtime/Projections/IReadOnlyList.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace Windows.Foundation.Collections
{
[global::WinRT.WindowsRuntimeType]
[Guid("BBE1FA4C-B0E3-4583-BAEF-1F1B2E483E56")]
interface IVectorView<T> : IIterable<T>
{
Expand Down
2 changes: 1 addition & 1 deletion get_testwinrt.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8619e44

Please sign in to comment.