summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2016-04-17 23:59:44 +0200
committerJason Smith <jason.smith@xamarin.com>2016-04-17 14:59:44 -0700
commitcdd6d4defc844b605890e7ad731e27e373b09bf4 (patch)
treeddf897b6bf475273a247891898a6c7daf7fb2079 /Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs
parent0b10ab0c130c814b4ab1595c8d13c4c6c9c9d5df (diff)
downloadxamarin-forms-cdd6d4defc844b605890e7ad731e27e373b09bf4.tar.gz
xamarin-forms-cdd6d4defc844b605890e7ad731e27e373b09bf4.tar.bz2
xamarin-forms-cdd6d4defc844b605890e7ad731e27e373b09bf4.zip
Merged ResourceDictionary (#97)
* [X] Support Merged RD * [X] Support RD as xaml roots * [XamlC] I have no idea how that used to work before * [C] Remove debugging statements * fix docs
Diffstat (limited to 'Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs')
-rw-r--r--Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs b/Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs
index 5470a3c8..692ef8b5 100644
--- a/Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs
+++ b/Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs
@@ -118,7 +118,7 @@ namespace Xamarin.Forms.Build.Tasks
if (parentVar.VariableType.ImplementsInterface(Module.Import(typeof (IEnumerable))))
{
var elementType = parentVar.VariableType;
- if (elementType.FullName != "Xamarin.Forms.ResourceDictionary")
+ if (elementType.FullName != "Xamarin.Forms.ResourceDictionary" && elementType.Resolve().BaseType.FullName != "Xamarin.Forms.ResourceDictionary")
{
var adderTuple = elementType.GetMethods(md => md.Name == "Add" && md.Parameters.Count == 1, Module).First();
var adderRef = Module.Import(adderTuple.Item1);
@@ -213,7 +213,7 @@ namespace Xamarin.Forms.Build.Tasks
return parentList.CollectionItems.Contains(node);
}
- static string GetContentProperty(TypeReference typeRef)
+ internal static string GetContentProperty(TypeReference typeRef)
{
var typeDef = typeRef.Resolve();
var attributes = typeDef.CustomAttributes;
@@ -461,7 +461,7 @@ namespace Xamarin.Forms.Build.Tasks
context.IL.Emit(OpCodes.Ldloc, parent);
context.IL.Append(vnode.PushConvertedValue(context,
propertyType,
- new ICustomAttributeProvider[] { propertyType.Resolve() },
+ new ICustomAttributeProvider[] { property, propertyType.Resolve() },
valueNode.PushServiceProvider(context), false, true));
context.IL.Emit(OpCodes.Callvirt, propertySetterRef);