[EXaml] 1.Support List property 2.Support load multi EXaml
authorFang Xiaohui <xiaohui.fang@samsung.com>
Thu, 22 Apr 2021 03:07:45 +0000 (11:07 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 28 Apr 2021 03:36:30 +0000 (12:36 +0900)
42 files changed:
src/Tizen.NUI/src/internal/EXaml/Action/AddEventAction.cs
src/Tizen.NUI/src/internal/EXaml/Action/AddExistInstanceAction.cs
src/Tizen.NUI/src/internal/EXaml/Action/AddToCollectionPropertyAction.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/EXaml/Action/AddToResourceDictionary.cs
src/Tizen.NUI/src/internal/EXaml/Action/CallAddMethodAction.cs
src/Tizen.NUI/src/internal/EXaml/Action/CreateInstanceAction.cs [moved from src/Tizen.NUI/src/internal/EXaml/Action/CreateObjectAction.cs with 83% similarity]
src/Tizen.NUI/src/internal/EXaml/Action/GetObjectByPropertyAction.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/EXaml/Action/GetValueAction.cs
src/Tizen.NUI/src/internal/EXaml/Action/GetValueListAction.cs
src/Tizen.NUI/src/internal/EXaml/Action/RegisterXNameAction.cs
src/Tizen.NUI/src/internal/EXaml/Action/SetBindalbePropertyAction.cs
src/Tizen.NUI/src/internal/EXaml/Action/SetBindingAction.cs
src/Tizen.NUI/src/internal/EXaml/Action/SetDynamicResourceAction.cs
src/Tizen.NUI/src/internal/EXaml/Action/SetPropertyAction.cs
src/Tizen.NUI/src/internal/EXaml/Block/GatherAssembliesBlock.cs
src/Tizen.NUI/src/internal/EXaml/Block/GatherBindablePropertiesBlock.cs [moved from src/Tizen.NUI/src/internal/EXaml/Action/GatherBindablePropertiesAction.cs with 81% similarity]
src/Tizen.NUI/src/internal/EXaml/Block/GatherEventsBlock.cs
src/Tizen.NUI/src/internal/EXaml/Block/GatherMethodsBlock.cs
src/Tizen.NUI/src/internal/EXaml/Block/GatherPropertiesBlock.cs
src/Tizen.NUI/src/internal/EXaml/Block/GatherTypesBlock.cs
src/Tizen.NUI/src/internal/EXaml/GlobalDataList.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/EXaml/LoadEXaml.cs
src/Tizen.NUI/src/internal/EXaml/Operation/AddEvent.cs
src/Tizen.NUI/src/internal/EXaml/Operation/AddToCollectionProperty.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/EXaml/Operation/AddToResourceDictionary.cs
src/Tizen.NUI/src/internal/EXaml/Operation/CallAddMethod.cs
src/Tizen.NUI/src/internal/EXaml/Operation/CreateInstance.cs
src/Tizen.NUI/src/internal/EXaml/Operation/GatherAssembly.cs
src/Tizen.NUI/src/internal/EXaml/Operation/GatherBindableProperties.cs
src/Tizen.NUI/src/internal/EXaml/Operation/GatherConvertedValue.cs
src/Tizen.NUI/src/internal/EXaml/Operation/GatherEnumValue.cs
src/Tizen.NUI/src/internal/EXaml/Operation/GatherEvent.cs
src/Tizen.NUI/src/internal/EXaml/Operation/GatherMethod.cs
src/Tizen.NUI/src/internal/EXaml/Operation/GatherProperty.cs
src/Tizen.NUI/src/internal/EXaml/Operation/GatherType.cs
src/Tizen.NUI/src/internal/EXaml/Operation/GetObjectByProperty.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/EXaml/Operation/RegisterXName.cs
src/Tizen.NUI/src/internal/EXaml/Operation/SetBindalbeProperty.cs
src/Tizen.NUI/src/internal/EXaml/Operation/SetBinding.cs
src/Tizen.NUI/src/internal/EXaml/Operation/SetDynamicResource.cs
src/Tizen.NUI/src/internal/EXaml/Operation/SetProperty.cs
src/Tizen.NUI/src/public/EXaml/EXamlExtensions.cs

index b929b1a..60fb053 100755 (executable)
@@ -25,12 +25,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class AddEventAction : Action
     {
 {
     internal class AddEventAction : Action
     {
-        public AddEventAction(Action parent)
+        public AddEventAction(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -68,7 +70,7 @@ namespace Tizen.NUI.EXaml
                 int elementIndex = (childOp.ValueList[1] as Instance).Index;
                 int propertyIndex = (int)childOp.ValueList[2];
                 int value = (int)childOp.ValueList[3];
                 int elementIndex = (childOp.ValueList[1] as Instance).Index;
                 int propertyIndex = (int)childOp.ValueList[2];
                 int value = (int)childOp.ValueList[3];
-                LoadEXaml.Operations.Add(new AddEvent(instanceIndex, elementIndex, propertyIndex, value));
+                globalDataList.Operations.Add(new AddEvent(globalDataList, instanceIndex, elementIndex, propertyIndex, value));
             }
         }
     }
             }
         }
     }
index f1c0de0..475bd04 100755 (executable)
@@ -24,11 +24,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class AddExistInstanceAction : Action
     {
 {
     internal class AddExistInstanceAction : Action
     {
-        internal AddExistInstanceAction(Action parent)
+        internal AddExistInstanceAction(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
         }
+
         private Action parent;
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -70,11 +73,11 @@ namespace Tizen.NUI.EXaml
 
                 if ('q' == sign)
                 {
 
                 if ('q' == sign)
                 {
-                    LoadEXaml.Operations.Add(new GatherConvertedValue(index, value));
+                    globalDataList.Operations.Add(new GatherConvertedValue(globalDataList, index, value));
                 }
                 else if ('o' == sign)
                 {
                 }
                 else if ('o' == sign)
                 {
-                    LoadEXaml.Operations.Add(new GatherEnumValue(index, value));
+                    globalDataList.Operations.Add(new GatherEnumValue(globalDataList, index, value));
                 }
 
                 getValueListOp = null;
                 }
 
                 getValueListOp = null;
@@ -83,11 +86,5 @@ namespace Tizen.NUI.EXaml
 
         private char sign;
         private GetValueListAction getValueListOp;
 
         private char sign;
         private GetValueListAction getValueListOp;
-
-        internal static object Root
-        {
-            get;
-            set;
-        }
     }
 }
     }
 }
diff --git a/src/Tizen.NUI/src/internal/EXaml/Action/AddToCollectionPropertyAction.cs b/src/Tizen.NUI/src/internal/EXaml/Action/AddToCollectionPropertyAction.cs
new file mode 100755 (executable)
index 0000000..f2c42c0
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+
+namespace Tizen.NUI.EXaml
+{
+    internal class AddToCollectionPropertyAction : Action
+    {
+        public AddToCollectionPropertyAction(GlobalDataList globalDataList, Action parent)
+        {
+            this.parent = parent;
+            this.globalDataList = globalDataList;
+        }
+
+        private Action parent;
+        private GlobalDataList globalDataList;
+
+        public Action DealChar(char c)
+        {
+            switch (c)
+            {
+                case ' ':
+                case '\n':
+                case '\r':
+                    break;
+
+                case '(':
+                    childOp = new GetValueListAction(')', this);
+                    return childOp;
+
+                case '~':
+                    parent?.OnActive();
+                    return parent;
+            }
+
+            return this;
+        }
+
+        private GetValueListAction childOp;
+
+        public void Init()
+        {
+            childOp = null;
+        }
+
+        public void OnActive()
+        {
+            if (null != childOp)
+            {
+                int instanceIndex = (int)childOp.ValueList[0];
+                var value = childOp.ValueList[1];
+                globalDataList.Operations.Add(new AddToCollectionProperty(globalDataList, instanceIndex, value));
+            }
+        }
+    }
+}
index ce2793b..76874e0 100755 (executable)
@@ -25,12 +25,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class AddToResourceDictionaryAction : Action
     {
 {
     internal class AddToResourceDictionaryAction : Action
     {
-        public AddToResourceDictionaryAction(Action parent)
+        public AddToResourceDictionaryAction(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -67,7 +69,7 @@ namespace Tizen.NUI.EXaml
                 int instanceIndex = (childOp.ValueList[0] as Instance).Index;
                 string key = childOp.ValueList[1] as string;
                 var value = childOp.ValueList[2];
                 int instanceIndex = (childOp.ValueList[0] as Instance).Index;
                 string key = childOp.ValueList[1] as string;
                 var value = childOp.ValueList[2];
-                LoadEXaml.Operations.Add(new AddToResourceDictionary(instanceIndex, key, value));
+                globalDataList.Operations.Add(new AddToResourceDictionary(globalDataList, instanceIndex, key, value));
             }
         }
     }
             }
         }
     }
index 9404c70..701c12f 100755 (executable)
@@ -25,12 +25,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class CallAddMethodAction : Action
     {
 {
     internal class CallAddMethodAction : Action
     {
-        public CallAddMethodAction(Action parent)
+        public CallAddMethodAction(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -68,7 +70,7 @@ namespace Tizen.NUI.EXaml
                 int childIndex = (childOp.ValueList[1] as Instance).Index;
                 int methodIndex = (int)childOp.ValueList[2];
 
                 int childIndex = (childOp.ValueList[1] as Instance).Index;
                 int methodIndex = (int)childOp.ValueList[2];
 
-                LoadEXaml.Operations.Add(new CallAddMethod(parentIndex, childIndex, methodIndex));
+                globalDataList.Operations.Add(new CallAddMethod(globalDataList, parentIndex, childIndex, methodIndex));
             }
         }
     }
             }
         }
     }
@@ -22,13 +22,16 @@ using Tizen.NUI.Binding.Internals;
 
 namespace Tizen.NUI.EXaml
 {
 
 namespace Tizen.NUI.EXaml
 {
-    internal class CreateObjectAction : Action
+    internal class CreateInstanceAction : Action
     {
     {
-        internal CreateObjectAction(Action parent)
+        internal CreateInstanceAction(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
         }
+
         private Action parent;
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -66,11 +69,11 @@ namespace Tizen.NUI.EXaml
                 int typeIndex = (int)getTypeIndexOp.Value;
                 if (null == getParamListOp)
                 {
                 int typeIndex = (int)getTypeIndexOp.Value;
                 if (null == getParamListOp)
                 {
-                    LoadEXaml.Operations.Add(new CreateInstance(typeIndex));
+                    globalDataList.Operations.Add(new CreateInstance(globalDataList, typeIndex));
                 }
                 else
                 {
                 }
                 else
                 {
-                    LoadEXaml.Operations.Add(new CreateInstance(typeIndex, getParamListOp.ValueList));
+                    globalDataList.Operations.Add(new CreateInstance(globalDataList, typeIndex, getParamListOp.ValueList));
                 }
                 getParamListOp = null;
             }
                 }
                 getParamListOp = null;
             }
diff --git a/src/Tizen.NUI/src/internal/EXaml/Action/GetObjectByPropertyAction.cs b/src/Tizen.NUI/src/internal/EXaml/Action/GetObjectByPropertyAction.cs
new file mode 100755 (executable)
index 0000000..08e4089
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+
+namespace Tizen.NUI.EXaml
+{
+    internal class GetObjectByPropertyAction : Action
+    {
+        internal GetObjectByPropertyAction(GlobalDataList globalDataList, Action parent)
+        {
+            this.parent = parent;
+            this.globalDataList = globalDataList;
+        }
+
+        private Action parent;
+        private GlobalDataList globalDataList;
+
+        public Action DealChar(char c)
+        {
+            switch (c)
+            {
+                case ' ':
+                case '\n':
+                case '\r':
+                    break;
+
+                case '`':
+                    parent?.OnActive();
+                    return parent;
+
+                case '(':
+                    childOp = new GetValueListAction(')', this);
+                    return childOp;
+            }
+
+            return this;
+        }
+
+        public void Init()
+        {
+        }
+
+        public void OnActive()
+        {
+            if (null != childOp)
+            {
+                int instanceIndex = (childOp.ValueList[0] as Instance).Index;
+                string propertyName = childOp.ValueList[1] as string;
+                globalDataList.Operations.Add(new GetObjectByProperty(globalDataList, instanceIndex, propertyName));
+            }
+
+            childOp = null;
+        }
+
+        private GetValueListAction childOp;
+
+        internal static object Root
+        {
+            get
+            {
+                return CreateInstance.Root;
+            }
+            set
+            {
+                CreateInstance.Root = value;
+            }
+        }
+    }
+}
index e1889d8..da6717f 100755 (executable)
@@ -28,6 +28,7 @@ namespace Tizen.NUI.EXaml
             this.sign = sign;
             this.parent = parent;
         }
             this.sign = sign;
             this.parent = parent;
         }
+
         private char sign;
         private Action parent;
 
         private char sign;
         private Action parent;
 
index 6ff0210..c565afc 100755 (executable)
@@ -27,6 +27,7 @@ namespace Tizen.NUI.EXaml
             this.sign = sign;
             this.parent = parent;
         }
             this.sign = sign;
             this.parent = parent;
         }
+
         private char sign;
         private Action parent;
 
         private char sign;
         private Action parent;
 
index 5bcc234..c4bb433 100755 (executable)
@@ -25,12 +25,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class RegisterXNameAction : Action
     {
 {
     internal class RegisterXNameAction : Action
     {
-        public RegisterXNameAction(Action parent)
+        public RegisterXNameAction(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -65,7 +67,7 @@ namespace Tizen.NUI.EXaml
             object instance = childOp.ValueList[0];
             string xName = childOp.ValueList[1] as string;
 
             object instance = childOp.ValueList[0];
             string xName = childOp.ValueList[1] as string;
 
-            LoadEXaml.Operations.Add(new RegisterXName(instance, xName));
+            globalDataList.Operations.Add(new RegisterXName(globalDataList, instance, xName));
         }
     }
 }
         }
     }
 }
index 19315a7..c48cba5 100755 (executable)
@@ -25,12 +25,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class SetBindalbePropertyAction : Action
     {
 {
     internal class SetBindalbePropertyAction : Action
     {
-        public SetBindalbePropertyAction(Action parent)
+        public SetBindalbePropertyAction(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -67,7 +69,7 @@ namespace Tizen.NUI.EXaml
                 int instanceIndex = (childOp.ValueList[0] as Instance).Index;
                 int bindalbePropertyIndex = (int)childOp.ValueList[1];
                 var value = childOp.ValueList[2];
                 int instanceIndex = (childOp.ValueList[0] as Instance).Index;
                 int bindalbePropertyIndex = (int)childOp.ValueList[1];
                 var value = childOp.ValueList[2];
-                LoadEXaml.Operations.Add(new SetBindalbeProperty(instanceIndex, bindalbePropertyIndex, value));
+                globalDataList.Operations.Add(new SetBindalbeProperty(globalDataList, instanceIndex, bindalbePropertyIndex, value));
             }
         }
     }
             }
         }
     }
index d30d831..5036aaf 100755 (executable)
@@ -25,12 +25,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class SetBindingAction : Action
     {
 {
     internal class SetBindingAction : Action
     {
-        public SetBindingAction(Action parent)
+        public SetBindingAction(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -68,7 +70,7 @@ namespace Tizen.NUI.EXaml
                 var propertyIndex = (int)childOp.ValueList[1];
                 int valueIndex = (childOp.ValueList[2] as Instance).Index;
 
                 var propertyIndex = (int)childOp.ValueList[1];
                 int valueIndex = (childOp.ValueList[2] as Instance).Index;
 
-                LoadEXaml.Operations.Add(new SetBinding(instanceIndex, propertyIndex, valueIndex));
+                globalDataList.Operations.Add(new SetBinding(globalDataList, instanceIndex, propertyIndex, valueIndex));
             }
         }
     }
             }
         }
     }
index f73b757..6cffcc5 100755 (executable)
@@ -22,12 +22,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class SetDynamicResourceAction : Action
     {
 {
     internal class SetDynamicResourceAction : Action
     {
-        public SetDynamicResourceAction(Action parent)
+        public SetDynamicResourceAction(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -65,7 +67,7 @@ namespace Tizen.NUI.EXaml
                 int propertyIndex = (int)childOp.ValueList[1];
                 string key = childOp.ValueList[2] as string;
 
                 int propertyIndex = (int)childOp.ValueList[1];
                 string key = childOp.ValueList[2] as string;
 
-                LoadEXaml.Operations.Add(new SetDynamicResource(instanceIndex, propertyIndex, key));
+                globalDataList.Operations.Add(new SetDynamicResource(globalDataList, instanceIndex, propertyIndex, key));
             }
         }
     }
             }
         }
     }
index c3fa14f..2dc2c06 100755 (executable)
@@ -25,12 +25,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class SetPropertyAction : Action
     {
 {
     internal class SetPropertyAction : Action
     {
-        public SetPropertyAction(Action parent)
+        public SetPropertyAction(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -67,7 +69,7 @@ namespace Tizen.NUI.EXaml
                 int instanceIndex = (childOp.ValueList[0] as Instance).Index;
                 int propertyIndex = (int)childOp.ValueList[1];
                 var value = childOp.ValueList[2];
                 int instanceIndex = (childOp.ValueList[0] as Instance).Index;
                 int propertyIndex = (int)childOp.ValueList[1];
                 var value = childOp.ValueList[2];
-                LoadEXaml.Operations.Add(new SetProperty(instanceIndex, propertyIndex, value));
+                globalDataList.Operations.Add(new SetProperty(globalDataList, instanceIndex, propertyIndex, value));
             }
         }
     }
             }
         }
     }
index 626ab49..0f7c90d 100755 (executable)
@@ -23,12 +23,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherAssembliesBlock : Action
     {
 {
     internal class GatherAssembliesBlock : Action
     {
-        public GatherAssembliesBlock(Action parent)
+        public GatherAssembliesBlock(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -61,7 +63,7 @@ namespace Tizen.NUI.EXaml
         public void OnActive()
         {
             var readedAssemblyName = childOp.Value as string;
         public void OnActive()
         {
             var readedAssemblyName = childOp.Value as string;
-            LoadEXaml.Operations.Add(new GatherAssembly(readedAssemblyName));
+            globalDataList.Operations.Add(new GatherAssembly(globalDataList, readedAssemblyName));
             childOp = null;
         }
     }
             childOp = null;
         }
     }
@@ -21,14 +21,16 @@ using System.Text;
 
 namespace Tizen.NUI.EXaml
 {
 
 namespace Tizen.NUI.EXaml
 {
-    internal class GatherBindablePropertiesAction : Action
+    internal class GatherBindablePropertiesBlock : Action
     {
     {
-        public GatherBindablePropertiesAction(Action parent)
+        public GatherBindablePropertiesBlock(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -63,7 +65,7 @@ namespace Tizen.NUI.EXaml
             int typeIndex = int.Parse(childOp.ValueList[0] as string);
             string propertyName = childOp.ValueList[1] as string;
 
             int typeIndex = int.Parse(childOp.ValueList[0] as string);
             string propertyName = childOp.ValueList[1] as string;
 
-            LoadEXaml.Operations.Add(new GatherBindableProperties(typeIndex, propertyName));
+            globalDataList.Operations.Add(new GatherBindableProperties(globalDataList, typeIndex, propertyName));
         }
     }
 }
         }
     }
 }
index 19dcb6e..0caeb7b 100755 (executable)
@@ -23,12 +23,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherEventsBlock : Action
     {
 {
     internal class GatherEventsBlock : Action
     {
-        public GatherEventsBlock(Action parent)
+        public GatherEventsBlock(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -63,7 +65,7 @@ namespace Tizen.NUI.EXaml
             int typeIndex = int.Parse(childOp.ValueList[0] as string);
             string eventName = childOp.ValueList[1] as string;
 
             int typeIndex = int.Parse(childOp.ValueList[0] as string);
             string eventName = childOp.ValueList[1] as string;
 
-            LoadEXaml.Operations.Add(new GatherEvent(typeIndex, eventName));
+            globalDataList.Operations.Add(new GatherEvent(globalDataList, typeIndex, eventName));
         }
     }
 }
         }
     }
 }
index da89328..44b7dfb 100755 (executable)
@@ -30,12 +30,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherMethodsBlock : Action
     {
 {
     internal class GatherMethodsBlock : Action
     {
-        public GatherMethodsBlock(Action parent)
+        public GatherMethodsBlock(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -69,7 +71,7 @@ namespace Tizen.NUI.EXaml
         {
             int typeIndex = int.Parse(childOp.ValueList[0] as string);
             string name = childOp.ValueList[1] as string;
         {
             int typeIndex = int.Parse(childOp.ValueList[0] as string);
             string name = childOp.ValueList[1] as string;
-            LoadEXaml.Operations.Add(new GatherMethod(typeIndex, name));
+            globalDataList.Operations.Add(new GatherMethod(globalDataList, typeIndex, name));
         }
     }
 }
         }
     }
 }
index 5ad6744..3ec8694 100755 (executable)
@@ -23,12 +23,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherPropertiesBlock : Action
     {
 {
     internal class GatherPropertiesBlock : Action
     {
-        public GatherPropertiesBlock(Action parent)
+        public GatherPropertiesBlock(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -63,7 +65,7 @@ namespace Tizen.NUI.EXaml
             int typeIndex = int.Parse(childOp.ValueList[0] as string);
             string propertyName = childOp.ValueList[1] as string;
 
             int typeIndex = int.Parse(childOp.ValueList[0] as string);
             string propertyName = childOp.ValueList[1] as string;
 
-            LoadEXaml.Operations.Add(new GatherProperty(typeIndex, propertyName));
+            globalDataList.Operations.Add(new GatherProperty(globalDataList, typeIndex, propertyName));
         }
     }
 }
         }
     }
 }
index 872c35e..2f4a280 100755 (executable)
@@ -23,12 +23,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherTypesBlock : Action
     {
 {
     internal class GatherTypesBlock : Action
     {
-        public GatherTypesBlock(Action parent)
+        public GatherTypesBlock(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
 
         public Action DealChar(char c)
         {
@@ -60,7 +62,7 @@ namespace Tizen.NUI.EXaml
 
         public void OnActive()
         {
 
         public void OnActive()
         {
-            LoadEXaml.Operations.Add(GatherType(childOp.ValueList));
+            globalDataList.Operations.Add(GatherType(childOp.ValueList));
             childOp = null;
         }
 
             childOp = null;
         }
 
@@ -78,11 +80,11 @@ namespace Tizen.NUI.EXaml
                     genericTypeIndexs.Add((int)index);
                 }
 
                     genericTypeIndexs.Add((int)index);
                 }
 
-                return new GatherType(assemblyIndex, typeName, genericTypeIndexs);
+                return new GatherType(globalDataList, assemblyIndex, typeName, genericTypeIndexs);
             }
             else
             {
             }
             else
             {
-                return new GatherType(assemblyIndex, typeName);
+                return new GatherType(globalDataList, assemblyIndex, typeName);
             }
         }
     }
             }
         }
     }
diff --git a/src/Tizen.NUI/src/internal/EXaml/GlobalDataList.cs b/src/Tizen.NUI/src/internal/EXaml/GlobalDataList.cs
new file mode 100755 (executable)
index 0000000..1786e31
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.EXaml
+{
+    internal class GlobalDataList
+    {
+        internal List<Operation> Operations
+        {
+            get;
+        } = new List<Operation>();
+
+        internal List<object> GatheredInstances
+        {
+            get;
+        } = new List<object>();
+
+        internal List<object> ObjectsFromProperty
+        {
+            get;
+        } = new List<object>();
+
+        internal List<EventInfo> GatheredEvents
+        {
+            get;
+        } = new List<EventInfo>();
+
+        internal List<MethodInfo> GatheredMethods
+        {
+            get;
+        } = new List<MethodInfo>();
+
+        internal List<Type> GatheredTypes
+        {
+            get;
+        } = new List<Type>();
+
+        internal List<PropertyInfo> GatheredProperties
+        {
+            get;
+        } = new List<PropertyInfo>();
+
+        internal List<BindableProperty> GatheredBindableProperties
+        {
+            get;
+        } = new List<BindableProperty>();
+
+        private List<AssemblyName> assemblyNameList;
+        internal List<AssemblyName> AssemblyNameList
+        {
+            get
+            {
+                if (null == assemblyNameList)
+                {
+                    assemblyNameList = new List<AssemblyName>();
+                    assemblyNameList.Add(EXamlExtensions.MainAssembly.GetName());
+
+                    var assemblyNames = EXamlExtensions.MainAssembly.GetReferencedAssemblies();
+
+                    foreach (var name in assemblyNames)
+                    {
+                        assemblyNameList.Add(name);
+                    }
+                }
+
+                return assemblyNameList;
+            }
+        }
+
+        internal List<Assembly> GatheredAssemblies = new List<Assembly>();
+    }
+}
index aa0dbbd..2afc688 100755 (executable)
@@ -24,20 +24,24 @@ namespace Tizen.NUI.EXaml
     {
         internal static void Load(object view, string xaml)
         {
     {
         internal static void Load(object view, string xaml)
         {
-            CreateObjectAction.Root = view;
+            var globalDataList = new GlobalDataList();
+
+            CreateInstanceAction.Root = view;
 
             int index = 0;
 
 
             int index = 0;
 
-            var createObject = new CreateObjectAction(null);
-            var addExistInstance = new AddExistInstanceAction(null);
-            var registerXName = new RegisterXNameAction(null);
-            var setProperty = new SetPropertyAction(null);
-            var addEvent = new AddEventAction(null);
-            var setBindalbeProperty = new SetBindalbePropertyAction(null);
-            var addObject = new CallAddMethodAction(null);
-            var setDynamicResourceAction = new SetDynamicResourceAction(null);
-            var addToResourceDictionaryAction = new AddToResourceDictionaryAction(null);
-            var setBindingAction = new SetBindingAction(null);
+            var createInstance = new CreateInstanceAction(globalDataList, null);
+            var getObjectByProperty = new GetObjectByPropertyAction(globalDataList, null);
+            var addExistInstance = new AddExistInstanceAction(globalDataList, null);
+            var registerXName = new RegisterXNameAction(globalDataList, null);
+            var setProperty = new SetPropertyAction(globalDataList, null);
+            var addToCollectionProperty = new AddToCollectionPropertyAction(globalDataList, null);
+            var addEvent = new AddEventAction(globalDataList, null);
+            var setBindalbeProperty = new SetBindalbePropertyAction(globalDataList, null);
+            var addObject = new CallAddMethodAction(globalDataList, null);
+            var setDynamicResourceAction = new SetDynamicResourceAction(globalDataList, null);
+            var addToResourceDictionaryAction = new AddToResourceDictionaryAction(globalDataList, null);
+            var setBindingAction = new SetBindingAction(globalDataList, null);
 
             foreach (char c in xaml)
             {
 
             foreach (char c in xaml)
             {
@@ -49,44 +53,49 @@ namespace Tizen.NUI.EXaml
                         case '<':
                             if (0 == index)
                             {
                         case '<':
                             if (0 == index)
                             {
-                                currentOp = new GatherAssembliesBlock(null);
+                                currentOp = new GatherAssembliesBlock(globalDataList, null);
                                 currentOp.Init();
                                 index++;
                             }
                             else if (1 == index)
                             {
                                 currentOp.Init();
                                 index++;
                             }
                             else if (1 == index)
                             {
-                                currentOp = new GatherTypesBlock(null);
+                                currentOp = new GatherTypesBlock(globalDataList, null);
                                 currentOp.Init();
                                 index++;
                             }
                             else if (2 == index)
                             {
                                 currentOp.Init();
                                 index++;
                             }
                             else if (2 == index)
                             {
-                                currentOp = new GatherPropertiesBlock(null);
+                                currentOp = new GatherPropertiesBlock(globalDataList, null);
                                 currentOp.Init();
                                 index++;
                             }
                             else if (3 == index)
                             {
                                 currentOp.Init();
                                 index++;
                             }
                             else if (3 == index)
                             {
-                                currentOp = new GatherEventsBlock(null);
+                                currentOp = new GatherEventsBlock(globalDataList, null);
                                 currentOp.Init();
                                 index++;
                             }
                             else if (4 == index)
                             {
                                 currentOp.Init();
                                 index++;
                             }
                             else if (4 == index)
                             {
-                                currentOp = new GatherMethodsBlock(null);
+                                currentOp = new GatherMethodsBlock(globalDataList, null);
                                 currentOp.Init();
                                 index++;
                             }
                             else if (5 == index)
                             {
                                 currentOp.Init();
                                 index++;
                             }
                             else if (5 == index)
                             {
-                                currentOp = new GatherBindablePropertiesAction(null);
+                                currentOp = new GatherBindablePropertiesBlock(globalDataList, null);
                                 currentOp.Init();
                                 index++;
                             }
                             break;
 
                         case '{':
                                 currentOp.Init();
                                 index++;
                             }
                             break;
 
                         case '{':
-                            currentOp = createObject;
+                            currentOp = createInstance;
+                            currentOp.Init();
+                            break;
+
+                        case '`':
+                            currentOp = getObjectByProperty;
                             currentOp.Init();
                             break;
 
                             currentOp.Init();
                             break;
 
@@ -105,6 +114,11 @@ namespace Tizen.NUI.EXaml
                             currentOp.Init();
                             break;
 
                             currentOp.Init();
                             break;
 
+                        case '~':
+                            currentOp = addToCollectionProperty;
+                            currentOp.Init();
+                            break;
+
                         case '#':
                             currentOp = addEvent;
                             currentOp.Init();
                         case '#':
                             currentOp = addEvent;
                             currentOp.Init();
@@ -142,22 +156,12 @@ namespace Tizen.NUI.EXaml
                 }
             }
 
                 }
             }
 
-            foreach (var op in Operations)
+            foreach (var op in globalDataList.Operations)
             {
                 op.Do();
             }
         }
 
             {
                 op.Do();
             }
         }
 
-        internal static List<object> GatheredInstances
-        {
-            get;
-        } = new List<object>();
-
-        internal static List<Operation> Operations
-        {
-            get;
-        } = new List<Operation>();
-
         private static Action currentOp = null;
     }
 }
         private static Action currentOp = null;
     }
 }
index 4971a10..2202292 100755 (executable)
@@ -26,22 +26,25 @@ namespace Tizen.NUI.EXaml
 {
     internal class AddEvent : Operation
     {
 {
     internal class AddEvent : Operation
     {
-        public AddEvent(int instanceIndex, int elementIndex, int eventIndex, int valueIndex)
+        public AddEvent(GlobalDataList globalDataList, int instanceIndex, int elementIndex, int eventIndex, int valueIndex)
         {
             this.instanceIndex = instanceIndex;
             this.elementIndex = elementIndex;
             this.eventIndex = eventIndex;
             this.valueIndex = valueIndex;
         {
             this.instanceIndex = instanceIndex;
             this.elementIndex = elementIndex;
             this.eventIndex = eventIndex;
             this.valueIndex = valueIndex;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            object instance = LoadEXaml.GatheredInstances[instanceIndex];
-            object element = LoadEXaml.GatheredInstances[elementIndex];
-            var eventInfo = GatherEvent.GatheredEvents[eventIndex];
+            object instance = globalDataList.GatheredInstances[instanceIndex];
+            object element = globalDataList.GatheredInstances[elementIndex];
+            var eventInfo = globalDataList.GatheredEvents[eventIndex];
             try
             {
             try
             {
-                var methodInfo = GatherMethod.GatheredMethods[valueIndex];
+                var methodInfo = globalDataList.GatheredMethods[valueIndex];
                 eventInfo.AddEventHandler(instance, methodInfo.CreateDelegate(eventInfo.EventHandlerType, element));
             }
             catch (ArgumentException ae)
                 eventInfo.AddEventHandler(instance, methodInfo.CreateDelegate(eventInfo.EventHandlerType, element));
             }
             catch (ArgumentException ae)
diff --git a/src/Tizen.NUI/src/internal/EXaml/Operation/AddToCollectionProperty.cs b/src/Tizen.NUI/src/internal/EXaml/Operation/AddToCollectionProperty.cs
new file mode 100755 (executable)
index 0000000..6494e55
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+
+namespace Tizen.NUI.EXaml
+{
+    internal class AddToCollectionProperty : Operation
+    {
+        public AddToCollectionProperty(GlobalDataList globalDataList, int instanceIndex, object value)
+        {
+            this.instanceIndex = instanceIndex;
+            this.value = value;
+            this.globalDataList = globalDataList;
+        }
+
+        private GlobalDataList globalDataList;
+
+        public void Do()
+        {
+            var collection = globalDataList.ObjectsFromProperty[instanceIndex] as IList;
+
+            if (null != collection)
+            {
+                if (value is Instance)
+                {
+                    int valueIndex = (value as Instance).Index;
+                    collection.Add(globalDataList.GatheredInstances[valueIndex]);
+                }
+                else
+                {
+                    collection.Add(value);
+                }
+            }
+        }
+
+        private int instanceIndex;
+        private object value;
+    }
+}
index 90f04bb..e2187ab 100755 (executable)
@@ -26,17 +26,20 @@ namespace Tizen.NUI.EXaml
 {
     internal class AddToResourceDictionary : Operation
     {
 {
     internal class AddToResourceDictionary : Operation
     {
-        internal AddToResourceDictionary(int instanceIndex, string key, object value)
+        internal AddToResourceDictionary(GlobalDataList globalDataList, int instanceIndex, string key, object value)
         {
             this.instanceIndex = instanceIndex;
             this.key = key;
             this.value = value;
         {
             this.instanceIndex = instanceIndex;
             this.key = key;
             this.value = value;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            var instance = LoadEXaml.GatheredInstances[instanceIndex] as ResourceDictionary;
-            var realValue = (value is Instance) ? LoadEXaml.GatheredInstances[(value as Instance).Index] : value;
+            var instance = globalDataList.GatheredInstances[instanceIndex] as ResourceDictionary;
+            var realValue = (value is Instance) ? globalDataList.GatheredInstances[(value as Instance).Index] : value;
 
             instance.Add(key, realValue);
         }
 
             instance.Add(key, realValue);
         }
index 22ff577..0a6068b 100755 (executable)
@@ -26,18 +26,21 @@ namespace Tizen.NUI.EXaml
 {
     internal class CallAddMethod : Operation
     {
 {
     internal class CallAddMethod : Operation
     {
-        public CallAddMethod(int parentIndex, int childIndex, int methodIndex)
+        public CallAddMethod(GlobalDataList globalDataList, int parentIndex, int childIndex, int methodIndex)
         {
             this.parentIndex = parentIndex;
             this.childIndex = childIndex;
             this.methodIndex = methodIndex;
         {
             this.parentIndex = parentIndex;
             this.childIndex = childIndex;
             this.methodIndex = methodIndex;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            object parent = LoadEXaml.GatheredInstances[parentIndex];
-            object child = LoadEXaml.GatheredInstances[childIndex];
-            var method = GatherMethod.GatheredMethods[methodIndex];
+            object parent = globalDataList.GatheredInstances[parentIndex];
+            object child = globalDataList.GatheredInstances[childIndex];
+            var method = globalDataList.GatheredMethods[methodIndex];
 
             method.Invoke(parent, new object[] { child });
         }
 
             method.Invoke(parent, new object[] { child });
         }
index 5af0712..00d4405 100755 (executable)
@@ -26,25 +26,28 @@ namespace Tizen.NUI.EXaml
 {
     internal class CreateInstance : Operation
     {
 {
     internal class CreateInstance : Operation
     {
-        public CreateInstance(int typeIndex, List<object> paramList = null)
+        public CreateInstance(GlobalDataList globalDataList, int typeIndex, List<object> paramList = null)
         {
             this.typeIndex = typeIndex;
             this.paramList = paramList;
         {
             this.typeIndex = typeIndex;
             this.paramList = paramList;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            if (0 == LoadEXaml.GatheredInstances.Count && null != Root)
+            if (0 == globalDataList.GatheredInstances.Count && null != Root)
             {
             {
-                LoadEXaml.GatheredInstances.Add(Root);
+                globalDataList.GatheredInstances.Add(Root);
             }
             else
             {
             }
             else
             {
-                var type = GatherType.GatheredTypes[typeIndex];
+                var type = globalDataList.GatheredTypes[typeIndex];
 
                 if (null == paramList)
                 {
 
                 if (null == paramList)
                 {
-                    LoadEXaml.GatheredInstances.Add(Activator.CreateInstance(type));
+                    globalDataList.GatheredInstances.Add(Activator.CreateInstance(type));
                 }
                 else
                 {
                 }
                 else
                 {
@@ -52,16 +55,16 @@ namespace Tizen.NUI.EXaml
                     {
                         if (paramList[i] is Instance)
                         {
                     {
                         if (paramList[i] is Instance)
                         {
-                            paramList[i] = LoadEXaml.GatheredInstances[(paramList[i] as Instance).Index];
+                            paramList[i] = globalDataList.GatheredInstances[(paramList[i] as Instance).Index];
                         }
                     }
                         }
                     }
-                    LoadEXaml.GatheredInstances.Add(Activator.CreateInstance(type, paramList.ToArray()));
+                    globalDataList.GatheredInstances.Add(Activator.CreateInstance(type, paramList.ToArray()));
                 }
             }
 
                 }
             }
 
-            if (1 == LoadEXaml.GatheredInstances.Count)
+            if (1 == globalDataList.GatheredInstances.Count)
             {
             {
-                var rootObject = LoadEXaml.GatheredInstances[0] as BindableObject;
+                var rootObject = globalDataList.GatheredInstances[0] as BindableObject;
                 if (null != rootObject)
                 {
                     rootObject.IsCreateByXaml = true;
                 if (null != rootObject)
                 {
                     rootObject.IsCreateByXaml = true;
index 56b14d4..d45ed08 100755 (executable)
@@ -27,48 +27,28 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherAssembly : Operation
     {
 {
     internal class GatherAssembly : Operation
     {
-        public GatherAssembly(string assemblyName)
+        public GatherAssembly(GlobalDataList globalDataList, string assemblyName)
         {
             this.assemblyName = assemblyName;
         {
             this.assemblyName = assemblyName;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
             Assembly assembly = null;
         public void Do()
         {
             Assembly assembly = null;
-            foreach (var name in AssemblyNameList)
+            foreach (var name in globalDataList.AssemblyNameList)
             {
                 if (name.FullName.StartsWith(assemblyName))
                 {
                     assembly = Assembly.Load(name);
             {
                 if (name.FullName.StartsWith(assemblyName))
                 {
                     assembly = Assembly.Load(name);
-                    GatheredAssemblies.Add(assembly);
+                    globalDataList.GatheredAssemblies.Add(assembly);
                     break;
                 }
             }
         }
 
                     break;
                 }
             }
         }
 
-        private static List<AssemblyName> assemblyNameList;
-        private static List<AssemblyName> AssemblyNameList
-        {
-            get
-            {
-                if (null == assemblyNameList)
-                {
-                    assemblyNameList = new List<AssemblyName>();
-                    assemblyNameList.Add(EXamlExtensions.MainAssembly.GetName());
-
-                    var assemblyNames = EXamlExtensions.MainAssembly.GetReferencedAssemblies();
-
-                    foreach (var name in assemblyNames)
-                    {
-                        assemblyNameList.Add(name);
-                    }
-                }
-
-                return assemblyNameList;
-            }
-        }
-
         private string assemblyName;
         private string assemblyName;
-        internal static List<Assembly> GatheredAssemblies = new List<Assembly>();
     }
 }
     }
 }
index 320d7ed..f077d7e 100755 (executable)
@@ -26,26 +26,28 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherBindableProperties : Operation
     {
 {
     internal class GatherBindableProperties : Operation
     {
-        public GatherBindableProperties(int typeIndex, string propertyName)
+        public GatherBindableProperties(GlobalDataList globalDataList, int typeIndex, string propertyName)
         {
             this.typeIndex = typeIndex;
             this.propertyName = propertyName;
         {
             this.typeIndex = typeIndex;
             this.propertyName = propertyName;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            var type = GatherType.GatheredTypes[typeIndex];
+            var type = globalDataList.GatheredTypes[typeIndex];
             var field = type.GetField(fi => fi.Name == propertyName && fi.IsStatic && fi.IsPublic);
             if (null == field)
             {
                 field = type.GetField(fi => fi.Name == propertyName && fi.IsStatic && !fi.IsPublic);
             }
 
             var field = type.GetField(fi => fi.Name == propertyName && fi.IsStatic && fi.IsPublic);
             if (null == field)
             {
                 field = type.GetField(fi => fi.Name == propertyName && fi.IsStatic && !fi.IsPublic);
             }
 
-            GatheredBindableProperties.Add(field.GetValue(null) as BindableProperty);
+            globalDataList.GatheredBindableProperties.Add(field.GetValue(null) as BindableProperty);
         }
 
         private int typeIndex;
         private string propertyName;
         }
 
         private int typeIndex;
         private string propertyName;
-        internal static List<BindableProperty> GatheredBindableProperties = new List<BindableProperty>();
     }
 }
     }
 }
index f7dc442..48805d8 100755 (executable)
@@ -26,16 +26,19 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherConvertedValue : Operation
     {
 {
     internal class GatherConvertedValue : Operation
     {
-        public GatherConvertedValue(int converterIndex, string value)
+        public GatherConvertedValue(GlobalDataList globalDataList, int converterIndex, string value)
         {
             this.converterIndex = converterIndex;
             this.value = value;
         {
             this.converterIndex = converterIndex;
             this.value = value;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            var converter = LoadEXaml.GatheredInstances[converterIndex] as TypeConverter;
-            LoadEXaml.GatheredInstances.Add(converter.ConvertFromInvariantString(value));
+            var converter = globalDataList.GatheredInstances[converterIndex] as TypeConverter;
+            globalDataList.GatheredInstances.Add(converter.ConvertFromInvariantString(value));
         }
 
         private int converterIndex;
         }
 
         private int converterIndex;
index 28c6482..edeab5b 100755 (executable)
@@ -26,16 +26,19 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherEnumValue : Operation
     {
 {
     internal class GatherEnumValue : Operation
     {
-        public GatherEnumValue(int typeIndex, string value)
+        public GatherEnumValue(GlobalDataList globalDataList, int typeIndex, string value)
         {
             this.typeIndex = typeIndex;
             this.value = value;
         {
             this.typeIndex = typeIndex;
             this.value = value;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            var enumType = GatherType.GatheredTypes[typeIndex];
-            LoadEXaml.GatheredInstances.Add(Enum.Parse(enumType, value));
+            var enumType = globalDataList.GatheredTypes[typeIndex];
+            globalDataList.GatheredInstances.Add(Enum.Parse(enumType, value));
         }
 
         private int typeIndex;
         }
 
         private int typeIndex;
index 31f957d..cc1509e 100755 (executable)
@@ -26,20 +26,22 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherEvent : Operation
     {
 {
     internal class GatherEvent : Operation
     {
-        public GatherEvent(int typeIndex, string eventName)
+        public GatherEvent(GlobalDataList globalDataList, int typeIndex, string eventName)
         {
             this.typeIndex = typeIndex;
             this.eventName = eventName;
         {
             this.typeIndex = typeIndex;
             this.eventName = eventName;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            var type = GatherType.GatheredTypes[typeIndex];
-            GatheredEvents.Add(type.GetEvent(eventName));
+            var type = globalDataList.GatheredTypes[typeIndex];
+            globalDataList.GatheredEvents.Add(type.GetEvent(eventName));
         }
 
         private int typeIndex;
         private string eventName;
         }
 
         private int typeIndex;
         private string eventName;
-        internal static List<EventInfo> GatheredEvents = new List<EventInfo>();
     }
 }
     }
 }
index 6028840..452d44a 100755 (executable)
@@ -27,21 +27,23 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherMethod : Operation
     {
 {
     internal class GatherMethod : Operation
     {
-        public GatherMethod(int typeIndex, string methodName)
+        public GatherMethod(GlobalDataList globalDataList, int typeIndex, string methodName)
         {
             this.typeIndex = typeIndex;
             this.methodName = methodName;
         {
             this.typeIndex = typeIndex;
             this.methodName = methodName;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            var type = GatherType.GatheredTypes[typeIndex];
+            var type = globalDataList.GatheredTypes[typeIndex];
             var method = type.GetRuntimeMethods().FirstOrDefault(mi => mi.Name == methodName);
             var method = type.GetRuntimeMethods().FirstOrDefault(mi => mi.Name == methodName);
-            GatheredMethods.Add(method);
+            globalDataList.GatheredMethods.Add(method);
         }
 
         private int typeIndex;
         private string methodName;
         }
 
         private int typeIndex;
         private string methodName;
-        internal static List<MethodInfo> GatheredMethods = new List<MethodInfo>();
     }
 }
     }
 }
index 3e2c7d7..7da82de 100755 (executable)
@@ -26,20 +26,22 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherProperty : Operation
     {
 {
     internal class GatherProperty : Operation
     {
-        public GatherProperty(int typeIndex, string propertyName)
+        public GatherProperty(GlobalDataList globalDataList, int typeIndex, string propertyName)
         {
             this.typeIndex = typeIndex;
             this.propertyName = propertyName;
         {
             this.typeIndex = typeIndex;
             this.propertyName = propertyName;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            var type = GatherType.GatheredTypes[typeIndex];
-            GatheredProperties.Add(type.GetProperty(propertyName));
+            var type = globalDataList.GatheredTypes[typeIndex];
+            globalDataList.GatheredProperties.Add(type.GetProperty(propertyName));
         }
 
         private int typeIndex;
         private string propertyName;
         }
 
         private int typeIndex;
         private string propertyName;
-        internal static List<PropertyInfo> GatheredProperties = new List<PropertyInfo>();
     }
 }
     }
 }
index e05dbb3..4aa1145 100755 (executable)
@@ -26,16 +26,19 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherType : Operation
     {
 {
     internal class GatherType : Operation
     {
-        public GatherType(int assemblyIndex, string typeName, List<int> genericTypeIndexs = null)
+        public GatherType(GlobalDataList globalDataList, int assemblyIndex, string typeName, List<int> genericTypeIndexs = null)
         {
             this.assemblyIndex = assemblyIndex;
             this.typeName = typeName;
             this.genericTypeIndexs = genericTypeIndexs;
         {
             this.assemblyIndex = assemblyIndex;
             this.typeName = typeName;
             this.genericTypeIndexs = genericTypeIndexs;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            var assembly = GatherAssembly.GatheredAssemblies[assemblyIndex];
+            var assembly = globalDataList.GatheredAssemblies[assemblyIndex];
             var type = assembly.GetType(typeName);
 
             if (null != genericTypeIndexs)
             var type = assembly.GetType(typeName);
 
             if (null != genericTypeIndexs)
@@ -44,20 +47,17 @@ namespace Tizen.NUI.EXaml
 
                 for (int i = 0; i < genericTypeIndexs.Count; i++)
                 {
 
                 for (int i = 0; i < genericTypeIndexs.Count; i++)
                 {
-                    args[i] = GatheredTypes[genericTypeIndexs[i]];
+                    args[i] = globalDataList.GatheredTypes[genericTypeIndexs[i]];
                 }
 
                 type = type.MakeGenericType(args);
             }
 
                 }
 
                 type = type.MakeGenericType(args);
             }
 
-            GatheredTypes.Add(type);
+            globalDataList.GatheredTypes.Add(type);
         }
 
         private int assemblyIndex;
         private string typeName;
         private List<int> genericTypeIndexs;
         }
 
         private int assemblyIndex;
         private string typeName;
         private List<int> genericTypeIndexs;
-
-        internal static List<Type> GatheredTypes = new List<Type>();
     }
     }
-
 }
 }
diff --git a/src/Tizen.NUI/src/internal/EXaml/Operation/GetObjectByProperty.cs b/src/Tizen.NUI/src/internal/EXaml/Operation/GetObjectByProperty.cs
new file mode 100755 (executable)
index 0000000..e337d9e
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+
+namespace Tizen.NUI.EXaml
+{
+    internal class GetObjectByProperty : Operation
+    {
+        public GetObjectByProperty(GlobalDataList globalDataList, int instanceIndex, string propertyName)
+        {
+            this.instanceIndex = instanceIndex;
+            this.propertyName = propertyName;
+            this.globalDataList = globalDataList;
+        }
+
+        private GlobalDataList globalDataList;
+
+        public void Do()
+        {
+            var instance = globalDataList.GatheredInstances[instanceIndex];
+            var property = instance.GetType().GetProperty(propertyName);
+
+            var @object = property.GetMethod.Invoke(instance, Array.Empty<object>());
+            globalDataList.ObjectsFromProperty.Add(@object);
+        }
+
+        private int instanceIndex;
+
+        private string propertyName;
+    }
+}
index 0b23a7f..4772d45 100755 (executable)
@@ -26,18 +26,21 @@ namespace Tizen.NUI.EXaml
 {
     internal class RegisterXName : Operation
     {
 {
     internal class RegisterXName : Operation
     {
-        public RegisterXName(object instance, string name)
+        public RegisterXName(GlobalDataList globalDataList, object instance, string name)
         {
             this.instance = instance;
             this.name = name;
         {
             this.instance = instance;
             this.name = name;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
             object realInstance = null;
             if (instance is Instance)
             {
         public void Do()
         {
             object realInstance = null;
             if (instance is Instance)
             {
-                realInstance = LoadEXaml.GatheredInstances[(instance as Instance).Index];
+                realInstance = globalDataList.GatheredInstances[(instance as Instance).Index];
             }
             else
             {
             }
             else
             {
index 48e0bcb..0ce1ebb 100755 (executable)
@@ -26,25 +26,28 @@ namespace Tizen.NUI.EXaml
 {
     internal class SetBindalbeProperty : Operation
     {
 {
     internal class SetBindalbeProperty : Operation
     {
-        public SetBindalbeProperty(int instanceIndex, int bindalbePropertyIndex, object value)
+        public SetBindalbeProperty(GlobalDataList globalDataList, int instanceIndex, int bindalbePropertyIndex, object value)
         {
             this.instanceIndex = instanceIndex;
             this.bindalbePropertyIndex = bindalbePropertyIndex;
             this.value = value;
         {
             this.instanceIndex = instanceIndex;
             this.bindalbePropertyIndex = bindalbePropertyIndex;
             this.value = value;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            var instance = LoadEXaml.GatheredInstances[instanceIndex] as BindableObject;
+            var instance = globalDataList.GatheredInstances[instanceIndex] as BindableObject;
 
             if (null != instance)
             {
 
             if (null != instance)
             {
-                var property = GatherBindableProperties.GatheredBindableProperties[bindalbePropertyIndex];
+                var property = globalDataList.GatheredBindableProperties[bindalbePropertyIndex];
 
                 if (value is Instance)
                 {
                     int valueIndex = (value as Instance).Index;
 
                 if (value is Instance)
                 {
                     int valueIndex = (value as Instance).Index;
-                    instance.SetValue(property, LoadEXaml.GatheredInstances[valueIndex]);
+                    instance.SetValue(property, globalDataList.GatheredInstances[valueIndex]);
                 }
                 else
                 {
                 }
                 else
                 {
index e634fb3..ea45641 100755 (executable)
@@ -26,18 +26,21 @@ namespace Tizen.NUI.EXaml
 {
     internal class SetBinding : Operation
     {
 {
     internal class SetBinding : Operation
     {
-        public SetBinding(int instanceIndex, int bindablePropertyIndex, int valueIndex)
+        public SetBinding(GlobalDataList globalDataList, int instanceIndex, int bindablePropertyIndex, int valueIndex)
         {
             this.instanceIndex = instanceIndex;
             this.bindablePropertyIndex = bindablePropertyIndex;
             this.valueIndex = valueIndex;
         {
             this.instanceIndex = instanceIndex;
             this.bindablePropertyIndex = bindablePropertyIndex;
             this.valueIndex = valueIndex;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            BindableObject bindableObject = LoadEXaml.GatheredInstances[instanceIndex] as BindableObject;
-            var property = GatherBindableProperties.GatheredBindableProperties[bindablePropertyIndex];
-            var value = LoadEXaml.GatheredInstances[valueIndex] as BindingBase;
+            BindableObject bindableObject = globalDataList.GatheredInstances[instanceIndex] as BindableObject;
+            var property = globalDataList.GatheredBindableProperties[bindablePropertyIndex];
+            var value = globalDataList.GatheredInstances[valueIndex] as BindingBase;
             bindableObject?.SetBinding(property, value);
         }
 
             bindableObject?.SetBinding(property, value);
         }
 
index 1f567f1..b650fc0 100755 (executable)
@@ -26,17 +26,20 @@ namespace Tizen.NUI.EXaml
 {
     internal class SetDynamicResource : Operation
     {
 {
     internal class SetDynamicResource : Operation
     {
-        public SetDynamicResource(int instanceIndex, int propertyIndex, string key)
+        public SetDynamicResource(GlobalDataList globalDataList, int instanceIndex, int propertyIndex, string key)
         {
             this.instanceIndex = instanceIndex;
             this.propertyIndex = propertyIndex;
             this.key = key;
         {
             this.instanceIndex = instanceIndex;
             this.propertyIndex = propertyIndex;
             this.key = key;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            var instance = LoadEXaml.GatheredInstances[instanceIndex] as BindableObject;
-            var property = GatherBindableProperties.GatheredBindableProperties[propertyIndex];
+            var instance = globalDataList.GatheredInstances[instanceIndex] as BindableObject;
+            var property = globalDataList.GatheredBindableProperties[propertyIndex];
 
             instance.SetDynamicResource(property, key);
         }
 
             instance.SetDynamicResource(property, key);
         }
index 1b21e89..1e3e92e 100755 (executable)
@@ -26,27 +26,25 @@ namespace Tizen.NUI.EXaml
 {
     internal class SetProperty : Operation
     {
 {
     internal class SetProperty : Operation
     {
-        public SetProperty(int instanceIndex, int propertyIndex, object value)
+        public SetProperty(GlobalDataList globalDataList, int instanceIndex, int propertyIndex, object value)
         {
             this.instanceIndex = instanceIndex;
             this.propertyIndex = propertyIndex;
             this.value = value;
         {
             this.instanceIndex = instanceIndex;
             this.propertyIndex = propertyIndex;
             this.value = value;
+            this.globalDataList = globalDataList;
         }
 
         }
 
+        private GlobalDataList globalDataList;
+
         public void Do()
         {
         public void Do()
         {
-            object instance = LoadEXaml.GatheredInstances[instanceIndex];
-            var property = GatherProperty.GatheredProperties[propertyIndex];
-
-            if (property == null)
-            {
-                return;
-            }
+            object instance = globalDataList.GatheredInstances[instanceIndex];
+            var property = globalDataList.GatheredProperties[propertyIndex];
 
             if (value is Instance)
             {
                 int valueIndex = (value as Instance).Index;
 
             if (value is Instance)
             {
                 int valueIndex = (value as Instance).Index;
-                property.SetMethod.Invoke(instance, new object[] { LoadEXaml.GatheredInstances[valueIndex] });
+                property.SetMethod.Invoke(instance, new object[] { globalDataList.GatheredInstances[valueIndex] });
             }
             else
             {
             }
             else
             {
index 13ddacf..9d752c9 100755 (executable)
@@ -31,6 +31,7 @@ namespace Tizen.NUI.EXaml
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static TXaml LoadFromEXamlPath<TXaml>(this TXaml view, string path)
         {
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static TXaml LoadFromEXamlPath<TXaml>(this TXaml view, string path)
         {
+            MainAssembly = view.GetType().Assembly;
             //This EXaml file will be converted by Tizen.NUI.XamlBuild from the .xaml
             string xamlScript = GetXamlFromPath(path);
             LoadEXaml.Load(view, xamlScript);
             //This EXaml file will be converted by Tizen.NUI.XamlBuild from the .xaml
             string xamlScript = GetXamlFromPath(path);
             LoadEXaml.Load(view, xamlScript);
@@ -39,7 +40,7 @@ namespace Tizen.NUI.EXaml
 
         /// Internal used, will never be opened.
         [EditorBrowsable(EditorBrowsableState.Never)]
 
         /// Internal used, will never be opened.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static TXaml LoadFromEXamlPath<TXaml>(this TXaml view, Type callingType)
+        public static T LoadFromEXamlPath<T>(this T view, Type callingType)
         {
             if (null == callingType)
             {
         {
             if (null == callingType)
             {
@@ -77,6 +78,22 @@ namespace Tizen.NUI.EXaml
             return view;
         }
 
             return view;
         }
 
+        /// Used for TCT and TC coverage, will never be opened.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static T LoadFromEXaml<T>(this T view, string eXamlStr)
+        {
+            if (null == eXamlStr)
+            {
+                return view;
+            }
+
+            MainAssembly = view.GetType().Assembly;
+
+            LoadEXaml.Load(view, eXamlStr);
+
+            return view;
+        }
+
         /// Internal used, will never be opened.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static Assembly MainAssembly
         /// Internal used, will never be opened.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static Assembly MainAssembly