New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xaml] support arrays as x:Arguments #545

Merged
merged 4 commits into from Dec 4, 2016

Conversation

Projects
None yet
4 participants
@StephaneDelcroix
Member

StephaneDelcroix commented Nov 18, 2016

Description of Change

  • Supports x:Array as x:Arguments, for both Xaml and XamlC.
  • Fix a bug with some collections types
  • x:Array is now compiled, so no longer requires reflection call to create the array

Bugs Fixed

Behavioral Changes

UISegmentedControls in Xaml Native Views

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense
Show outdated Hide outdated Xamarin.Forms.Build.Tasks/TypeReferenceExtensions.cs
"System.Collections.Generic.IList`1",
"System.Collections.Generic.IReadOnlyCollection<T>",
"System.Collections.Generic.IReadOnlyList<T>",
"System.Collections.Generic.Collection<T>"
};
if (typeRef.IsArray && baseClass.IsArray) {

This comment has been minimized.

@StephaneDelcroix

StephaneDelcroix Nov 18, 2016

Member

if both are arrays, say object[] and string[], resolve the type and apply the test on object and string

@StephaneDelcroix

StephaneDelcroix Nov 18, 2016

Member

if both are arrays, say object[] and string[], resolve the type and apply the test on object and string

@@ -109,7 +111,9 @@ public static bool InheritsFromOrImplements(this TypeReference typeRef, TypeRefe
baseClass.IsGenericInstance &&
(baseClass as GenericInstanceType).GenericArguments[0].FullName == arrayType.FullName)
return true;
return false;

This comment has been minimized.

@StephaneDelcroix

StephaneDelcroix Nov 18, 2016

Member

stupid me, again

@StephaneDelcroix

StephaneDelcroix Nov 18, 2016

Member

stupid me, again

@jassmith

This comment has been minimized.

Show comment
Hide comment
@jassmith

jassmith Nov 18, 2016

Member

👍

Member

jassmith commented Nov 18, 2016

👍

@StephaneDelcroix StephaneDelcroix merged commit 39f2deb into master Dec 4, 2016

1 of 2 checks passed

OSX-Debug-C8 Started TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: OSX Debug
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: Windows Debug : Tests passed: 3619, ignored: 10
Details

@StephaneDelcroix StephaneDelcroix deleted the factoryCtor branch Dec 4, 2016

@samhouts samhouts added this to the 2.3.4 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment