From: Fang Xiaohui Date: Fri, 1 Apr 2022 01:29:02 +0000 (+0800) Subject: [XamlBuild] Support DateTime X-Git-Tag: submit/tizen_6.5/20220406.063536~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a194d599cc0f64183d5b6ef94cb2b1e4420d6e2f;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [XamlBuild] Support DateTime --- diff --git a/pkg/Tizen.NET.API9/xamlbuild/Tizen.NUI.XamlBuild.dll b/pkg/Tizen.NET.API9/xamlbuild/Tizen.NUI.XamlBuild.dll index bdc447a..239519d 100644 Binary files a/pkg/Tizen.NET.API9/xamlbuild/Tizen.NUI.XamlBuild.dll and b/pkg/Tizen.NET.API9/xamlbuild/Tizen.NUI.XamlBuild.dll differ diff --git a/src/Tizen.NUI.XamlBuild/src/public/EXamlBuild/EXamlCreateObjectVisitor.cs b/src/Tizen.NUI.XamlBuild/src/public/EXamlBuild/EXamlCreateObjectVisitor.cs index 8a39d41..add12fc 100755 --- a/src/Tizen.NUI.XamlBuild/src/public/EXamlBuild/EXamlCreateObjectVisitor.cs +++ b/src/Tizen.NUI.XamlBuild/src/public/EXamlBuild/EXamlCreateObjectVisitor.cs @@ -363,23 +363,14 @@ namespace Tizen.NUI.EXaml.Build.Tasks else if (ctorInfo != null && node.Properties.ContainsKey(XmlName.xArguments) && !node.Properties.ContainsKey(XmlName.xFactoryMethod) && ctorInfo.MatchXArguments(node, typeref, Module, Context)) { - //IL_0008: ldloca.s 1 - //IL_000a: ldc.i4.1 - //IL_000b: call instance void valuetype Test/Foo::'.ctor'(bool) - - //Fang - //var ctor = Module.ImportReference(ctorinforef); - //Context.IL.Emit(OpCodes.Ldloca, vardef); - //Context.IL.Append(PushCtorXArguments(factoryCtorInfo, node)); - //Context.IL.Emit(OpCodes.Call, ctor); + var argumentList = GetCtorXArguments(node, factoryCtorInfo.Parameters.Count, true); + Context.Values[node] = new EXamlCreateObject(Context, null, typedef, argumentList.ToArray()); + return; } else { - //IL_0000: ldloca.s 0 - //IL_0002: initobj Test/Foo - //Fang - //Context.IL.Emit(OpCodes.Ldloca, vardef); - //Context.IL.Emit(OpCodes.Initobj, Module.ImportReference(typedef)); + Context.Values[node] = new EXamlCreateObject(Context, null, typedef, null); + return; } if (typeref.FullName == "Tizen.NUI.Xaml.ArrayExtension") @@ -498,7 +489,7 @@ namespace Tizen.NUI.EXaml.Build.Tasks if (node.NamespaceURI == XamlParser.X2009Uri) { var n = node.XmlType.Name.Split(':')[1]; - return n != "Array"; + return n != "Array" && n != "DateTime"; } if (node.NamespaceURI != "clr-namespace:System;assembly=mscorlib") return false; diff --git a/src/Tizen.NUI.XamlBuild/src/public/XamlBuild/CreateObjectVisitor.cs b/src/Tizen.NUI.XamlBuild/src/public/XamlBuild/CreateObjectVisitor.cs index d963f22..a115df9 100755 --- a/src/Tizen.NUI.XamlBuild/src/public/XamlBuild/CreateObjectVisitor.cs +++ b/src/Tizen.NUI.XamlBuild/src/public/XamlBuild/CreateObjectVisitor.cs @@ -543,7 +543,7 @@ namespace Tizen.NUI.Xaml.Build.Tasks if (node.NamespaceURI == XamlParser.X2009Uri) { var n = node.XmlType.Name.Split(':')[1]; - return n != "Array" && n != "Nullable"; + return n != "Array" && n != "Nullable" && n != "DateTime"; } if (node.NamespaceURI != "clr-namespace:System;assembly=mscorlib") return false;