[NUI] Refine codes to reduce code duplication (#1096)
authorXianbing Teng <xb.teng@samsung.com>
Mon, 21 Oct 2019 22:38:55 +0000 (06:38 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 21 Oct 2019 22:38:55 +0000 (07:38 +0900)
35 files changed:
src/Tizen.NUI/src/internal/ArgumentHelper.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/EnumHelper.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Extensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/FrameBuffer.cs
src/Tizen.NUI/src/internal/NDalic.cs
src/Tizen.NUI/src/internal/RotationGestureDetectedSignal.cs
src/Tizen.NUI/src/internal/ViewWrapperImpl.cs
src/Tizen.NUI/src/public/AlphaFunction.cs
src/Tizen.NUI/src/public/Animation.cs
src/Tizen.NUI/src/public/BaseComponents/TableView.cs
src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs
src/Tizen.NUI/src/public/BaseComponents/ViewPublicMethods.cs
src/Tizen.NUI/src/public/BaseComponents/VisualView.cs
src/Tizen.NUI/src/public/CubeTransitionEffect.cs
src/Tizen.NUI/src/public/FocusManager.cs
src/Tizen.NUI/src/public/Layer.cs
src/Tizen.NUI/src/public/Layouting/FlexLayout.cs [changed mode: 0644->0755]
src/Tizen.NUI/src/public/NUIConstants.cs
src/Tizen.NUI/src/public/Renderer.cs
src/Tizen.NUI/src/public/TextureSet.cs
src/Tizen.NUI/src/public/Touch.cs
src/Tizen.NUI/src/public/UIComponents/Popup.cs
src/Tizen.NUI/src/public/VisualMaps.cs
src/Tizen.NUI/src/public/Visuals/AnimatedImageVisual.cs
src/Tizen.NUI/src/public/Visuals/BorderVisual.cs
src/Tizen.NUI/src/public/Visuals/ColorVisual.cs
src/Tizen.NUI/src/public/Visuals/GradientVisual.cs
src/Tizen.NUI/src/public/Visuals/ImageVisual.cs
src/Tizen.NUI/src/public/Visuals/MeshVisual.cs
src/Tizen.NUI/src/public/Visuals/NPatchVisual.cs
src/Tizen.NUI/src/public/Visuals/PrimitiveVisual.cs
src/Tizen.NUI/src/public/Visuals/SVGVisual.cs
src/Tizen.NUI/src/public/Visuals/TextVisual.cs
src/Tizen.NUI/src/public/Visuals/VisualAnimator.cs
src/Tizen.NUI/src/public/XamlBinding/ContentPage.cs

diff --git a/src/Tizen.NUI/src/internal/ArgumentHelper.cs b/src/Tizen.NUI/src/internal/ArgumentHelper.cs
new file mode 100755 (executable)
index 0000000..9e85a7d
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright(c) 2019 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;
+
+namespace Tizen.NUI
+{
+    internal static class ArgumentHelper
+    {
+        public static void RequireNotNull(object value, string argumentName)
+        {
+            if (null == value)
+            {
+                throw new ArgumentException("The value can't be null or empty", argumentName);
+            }
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/EnumHelper.cs b/src/Tizen.NUI/src/internal/EnumHelper.cs
new file mode 100755 (executable)
index 0000000..4e02d31
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * Copyright(c) 2019 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.ComponentModel;
+using System.Linq;
+using System.Reflection;
+
+namespace Tizen.NUI
+{
+    /// <summary>
+    /// Enum help class.
+    /// </summary>
+    internal static class EnumHelper
+    {
+        /// <summary>
+        /// Get the description from the numeric value.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="value"></param>
+        /// <returns>The description of the numeric value.</returns>
+        public static string GetDescription<T>(this T value) where T : struct
+        {
+            string result = value.ToString();
+            FieldInfo info = typeof(T).GetField(result);
+            var attributes = info.GetCustomAttributes(typeof(DescriptionAttribute), true);
+            if (null != attributes?.FirstOrDefault())
+            {
+                result = (attributes.First() as DescriptionAttribute).Description;
+            }
+
+            return result;
+        }
+
+        /// <summary>
+        /// Get the numeric value from the description.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="description"></param>
+        /// <returns>The numeric value.</returns>
+        public static T GetValueByDescription<T>(this string description) where T : struct
+        {
+            Type type = typeof(T);
+            foreach (var field in type.GetFields())
+            {
+                if (description == field.Name)
+                {
+                    return (T)field.GetValue(null);
+                }
+
+                var attributes = (DescriptionAttribute[])field.GetCustomAttributes(typeof(DescriptionAttribute), true);
+                if (null != attributes?.FirstOrDefault())
+                {
+                    if (description == attributes.First().Description)
+                    {
+                        return (T)field.GetValue(null);
+                    }
+                }
+            }
+
+            throw new ArgumentException($"{description} can't be found.", "Description");
+        }
+
+        /// <summary>
+        /// Get the numeric value from string representation of the name.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="value"></param>
+        /// <returns>The numeric value.</returns>
+        public static T GetValue<T>(this string value) where T : struct
+        {
+            T result;
+            if (Enum.TryParse(value, true, out result))
+            {
+                return result;
+            }
+
+            throw new ArgumentException($"{value} can't be found.", "Value");
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/Extensions.cs b/src/Tizen.NUI/src/internal/Extensions.cs
new file mode 100755 (executable)
index 0000000..7d14503
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright(c) 2019 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.Runtime.InteropServices;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI
+{
+    internal static class Extensions
+    {
+        public static T GetInstanceSafely<T>(this object wrapper, IntPtr cPtr) where T : BaseHandle
+        {
+            HandleRef CPtr = new HandleRef(wrapper, cPtr);
+            T ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as T;
+            Interop.BaseHandle.delete_BaseHandle(CPtr);
+            CPtr = new HandleRef(null, IntPtr.Zero);
+            return ret;
+        }
+    }
+}
index c4ceb11..4ce9541 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
@@ -92,11 +92,7 @@ namespace Tizen.NUI
         {
             //to fix memory leak issue, match the handle count with native side.
             global::System.IntPtr cPtr = Interop.FrameBuffer.FrameBuffer_GetColorTexture(swigCPtr);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            Texture ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Texture;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            Texture ret = this.GetInstanceSafely<Texture>(cPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index fcb2fbd..7d9a39a 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
@@ -217,304 +217,6 @@ namespace Tizen.NUI
             }
         }
 
-        public static float ParentOriginTop
-        {
-            get
-            {
-                float ret = Interop.NDalicParentOrigin.ParentOriginTop_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static float ParentOriginBottom
-        {
-            get
-            {
-                float ret = Interop.NDalicParentOrigin.ParentOriginBottom_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static float ParentOriginLeft
-        {
-            get
-            {
-                float ret = Interop.NDalicParentOrigin.ParentOriginLeft_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static float ParentOriginRight
-        {
-            get
-            {
-                float ret = Interop.NDalicParentOrigin.ParentOriginRight_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static float ParentOriginMiddle
-        {
-            get
-            {
-                float ret = Interop.NDalicParentOrigin.ParentOriginMiddle_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 ParentOriginTopLeft
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopLeft_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 ParentOriginTopCenter
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopCenter_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 ParentOriginTopRight
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopRight_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 ParentOriginCenterLeft
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenterLeft_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 ParentOriginCenter
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenter_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 ParentOriginCenterRight
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenterRight_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 ParentOriginBottomLeft
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomLeft_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 ParentOriginBottomCenter
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomCenter_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 ParentOriginBottomRight
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomRight_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static float AnchorPointTop
-        {
-            get
-            {
-                float ret = Interop.NDalicAnchorPoint.AnchorPointTop_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static float AnchorPointBottom
-        {
-            get
-            {
-                float ret = Interop.NDalicAnchorPoint.AnchorPointBottom_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static float AnchorPointLeft
-        {
-            get
-            {
-                float ret = Interop.NDalicAnchorPoint.AnchorPointLeft_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static float AnchorPointRight
-        {
-            get
-            {
-                float ret = Interop.NDalicAnchorPoint.AnchorPointRight_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static float AnchorPointMiddle
-        {
-            get
-            {
-                float ret = Interop.NDalicAnchorPoint.AnchorPointMiddle_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 AnchorPointTopLeft
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopLeft_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 AnchorPointTopCenter
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopCenter_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 AnchorPointTopRight
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopRight_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 AnchorPointCenterLeft
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterLeft_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 AnchorPointCenter
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenter_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 AnchorPointCenterRight
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterRight_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 AnchorPointBottomLeft
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomLeft_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 AnchorPointBottomCenter
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomCenter_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
-        public static Vector3 AnchorPointBottomRight
-        {
-            get
-            {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomRight_get();
-                Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-        }
-
         public static Vector4 BLACK
         {
             get
index 5346c73..4a974a4 100755 (executable)
@@ -18,7 +18,7 @@
 namespace Tizen.NUI
 {
     using Tizen.NUI.BaseComponents;
-    internal class RotationGestureDetectedSignal : global::System.IDisposable
+    internal class RotationGestureDetectedSignal : Disposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         protected bool swigCMemOwn;
@@ -34,55 +34,13 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //A Flag to check who called Dispose(). (By User or DisposeQueue)
-        private bool isDisposeQueued = false;
-        //A Flat to check if it is already disposed.
-        protected bool disposed = false;
-
-
-        ~RotationGestureDetectedSignal()
-        {
-            if (!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
-        }
-
-        public void Dispose()
-        {
-            //Throw excpetion if Dispose() is called in separate thread.
-            if (!Window.IsInstalled())
-            {
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
-            }
-
-            if (isDisposeQueued)
-            {
-                Dispose(DisposeTypes.Implicit);
-            }
-            else
-            {
-                Dispose(DisposeTypes.Explicit);
-                System.GC.SuppressFinalize(this);
-            }
-        }
-
-        protected virtual void Dispose(DisposeTypes type)
+        protected override void Dispose(DisposeTypes type)
         {
             if (disposed)
             {
                 return;
             }
 
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
@@ -97,7 +55,7 @@ namespace Tizen.NUI
                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
             }
 
-            disposed = true;
+            base.Dispose(type);
         }
 
         public bool Empty()
@@ -142,7 +100,5 @@ namespace Tizen.NUI
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
-
     }
-
 }
index fe457b5..bf343f6 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -247,11 +247,7 @@ namespace Tizen.NUI
         {
             //to fix memory leak issue, match the handle count with native side.
             System.IntPtr cPtr = Interop.ViewWrapperImpl.ViewWrapperImpl_GetVisual(swigCPtr, index);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            VisualBase ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as VisualBase;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            VisualBase ret = this.GetInstanceSafely<VisualBase>(cPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index 09a244a..215012c 100755 (executable)
@@ -15,6 +15,8 @@
  *
  */
 
+using System.ComponentModel;
+
 namespace Tizen.NUI
 {
 
@@ -96,58 +98,72 @@ namespace Tizen.NUI
             /// <summary>
             /// Linear.
             /// </summary>
+            [Description("DEFAULT")]
             Default,
             /// <summary>
             /// No transformation.
             /// </summary>
+            [Description("LINEAR")]
             Linear,
             /// <summary>
             /// Reverse linear.
             /// </summary>
+            [Description("REVERSE")]
             Reverse,
             /// <summary>
             /// Speeds up and comes to a sudden stop (square).
             /// </summary>
+            [Description("EASE_IN_SQUARE")]
             EaseInSquare,
             /// <summary>
             /// Sudden start and slows to a gradual stop (square).
             /// </summary>
+            [Description("EASE_OUT_SQUARE")]
             EaseOutSquare,
             /// <summary>
             /// Speeds up and comes to a sudden stop (cubic).
             /// </summary>
+            [Description("EASE_IN")]
             EaseIn,
             /// <summary>
             /// Sudden start and slows to a gradual stop (cubic).
             /// </summary>
+            [Description("EASE_OUT")]
             EaseOut,
             /// <summary>
             /// Speeds up and slows to a gradual stop (cubic).
             /// </summary>
+            [Description("EASE_IN_OUT")]
             EaseInOut,
             /// <summary>
             /// Speeds up and comes to a sudden stop (sinusoidal).
             /// </summary>
+            [Description("EASE_IN_SINE")]
             EaseInSine,
             /// <summary>
             /// Sudden start and slows to a gradual stop (sinusoidal).
             /// </summary>
+            [Description("EASE_OUT_SINE")]
             EaseOutSine,
             /// <summary>
             /// Speeds up and slows to a gradual stop (sinusoidal).
             /// </summary>
+            [Description("EASE_IN_OUT_SINE")]
             EaseInOutSine,
             /// <summary>
             /// Sudden start, loses momentum and returns to start position.
             /// </summary>
+            [Description("BOUNCE")]
             Bounce,
             /// <summary>
             /// Single revolution.
             /// </summary>
+            [Description("SIN")]
             Sin,
             /// <summary>
             /// Sudden start, exceed end position and return to a gradual stop.
             /// </summary>
+            [Description("EASE_OUT_BACK")]
             EaseOutBack,
             /// <summary>
             /// The count of the BuiltinFunctions enum.
index d1e6992..a0033bc 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
@@ -541,18 +541,7 @@ namespace Tizen.NUI
         public void AnimateBy(View target, string property, object relativeValue, AlphaFunction alphaFunction = null)
         {
             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
-
-            PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
-            if (propertyType.Equals(PropertyType.Float))
-            {
-                System.Type type = relativeValue.GetType();
-                if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
-                {
-                    int num = (int)relativeValue;
-                    relativeValue = (float)num;
-                }
-            }
-
+            relativeValue = AvoidFloatPropertyHasIntegerValue(target, _prop, relativeValue);
             PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
 
             if (alphaFunction != null)
@@ -578,18 +567,7 @@ namespace Tizen.NUI
         public void AnimateBy(View target, string property, object relativeValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
         {
             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
-
-            PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
-            if (propertyType.Equals(PropertyType.Float))
-            {
-                System.Type type = relativeValue.GetType();
-                if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
-                {
-                    int num = (int)relativeValue;
-                    relativeValue = (float)num;
-                }
-            }
-
+            relativeValue = AvoidFloatPropertyHasIntegerValue(target, _prop, relativeValue);
             PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
 
             if (alphaFunction != null)
@@ -615,18 +593,7 @@ namespace Tizen.NUI
         public void AnimateTo(View target, string property, object destinationValue, AlphaFunction alphaFunction = null)
         {
             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
-
-            PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
-            if (propertyType.Equals(PropertyType.Float))
-            {
-                System.Type type = destinationValue.GetType();
-                if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
-                {
-                    int num = (int)destinationValue;
-                    destinationValue = (float)num;
-                }
-            }
-
+            destinationValue = AvoidFloatPropertyHasIntegerValue(target, _prop, destinationValue);
             PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
 
             if (alphaFunction != null)
@@ -682,18 +649,7 @@ namespace Tizen.NUI
         public void AnimateTo(View target, string property, object destinationValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
         {
             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
-
-            PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
-            if (propertyType.Equals(PropertyType.Float))
-            {
-                System.Type type = destinationValue.GetType();
-                if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
-                {
-                    int num = (int)destinationValue;
-                    destinationValue = (float)num;
-                }
-            }
-
+            destinationValue = AvoidFloatPropertyHasIntegerValue(target, _prop, destinationValue);
             PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
 
             if (alphaFunction != null)
@@ -1397,5 +1353,20 @@ namespace Tizen.NUI
         {
             return (int)(sec * 1000);
         }
+
+        private object AvoidFloatPropertyHasIntegerValue(View target, Property property, object value)
+        {
+            PropertyType propertyType = target.GetPropertyType(property.propertyIndex);
+            if (propertyType.Equals(PropertyType.Float))
+            {
+                System.Type type = value.GetType();
+                if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
+                {
+                    int num = (int)value;
+                    value = (float)num;
+                }
+            }
+            return value;
+        }
     }
 }
index cd477c6..1f1f1e9 100755 (executable)
@@ -312,11 +312,7 @@ namespace Tizen.NUI.BaseComponents
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.TableView.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            View ret = this.GetInstanceSafely<View>(cPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
             Children.Remove(ret);
index 8296cf5..01fe228 100755 (executable)
@@ -467,13 +467,8 @@ namespace Tizen.NUI.BaseComponents
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.Actor.Actor_FindChildById(swigCPtr, id);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            View ret = this.GetInstanceSafely<View>(cPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
@@ -1186,7 +1181,7 @@ namespace Tizen.NUI.BaseComponents
 
                 if (File.Exists(likelyResourcePath))
                 {
-                    trans = Extensions.LoadObject<Transition>(likelyResourcePath);
+                    trans = Xaml.Extensions.LoadObject<Transition>(likelyResourcePath);
                 }
                 if (trans)
                 {
index 09e50f6..4d22a3d 100755 (executable)
@@ -361,13 +361,8 @@ namespace Tizen.NUI.BaseComponents
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.Actor.Actor_GetLayer(swigCPtr);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            Layer ret = this.GetInstanceSafely<Layer>(cPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
@@ -393,13 +388,8 @@ namespace Tizen.NUI.BaseComponents
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.Actor.Actor_FindChildByName(swigCPtr, viewName);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            View ret = this.GetInstanceSafely<View>(cPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
index 441fecd..2976218 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (c) 2017 Samsung Electronics Co., Ltd.
+// Copyright (c) 2019 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.
@@ -207,83 +207,7 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 3 </since_tizen>
         public Animation AnimateVisual(VisualMap target, string property, object destinationValue, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialValue = null)
         {
-            string _alphaFunction = null;
-            if (alphaFunction != null)
-            {
-                switch (alphaFunction)
-                {
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear:
-                    {
-                        _alphaFunction = "LINEAR";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse:
-                    {
-                        _alphaFunction = "REVERSE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare:
-                    {
-                        _alphaFunction = "EASE_IN_SQUARE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare:
-                    {
-                        _alphaFunction = "EASE_OUT_SQUARE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn:
-                    {
-                        _alphaFunction = "EASE_IN";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut:
-                    {
-                        _alphaFunction = "EASE_OUT";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut:
-                    {
-                        _alphaFunction = "EASE_IN_OUT";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine:
-                    {
-                        _alphaFunction = "EASE_IN_SINE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine:
-                    {
-                        _alphaFunction = "EASE_OUT_SINE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine:
-                    {
-                        _alphaFunction = "EASE_IN_OUT_SINE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce:
-                    {
-                        _alphaFunction = "BOUNCE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin:
-                    {
-                        _alphaFunction = "SIN";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack:
-                    {
-                        _alphaFunction = "EASE_OUT_BACK";
-                        break;
-                    }
-                    default:
-                    {
-                        _alphaFunction = "DEFAULT";
-                        break;
-                    }
-                }
-            }
+            string _alphaFunction = alphaFunction?.GetDescription();
 
             foreach (var item in _visualDictionary.ToList())
             {
@@ -335,83 +259,7 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 3 </since_tizen>
         public void AnimateVisualAdd(VisualMap target, string property, object destinationValue, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialValue = null)
         {
-            string _alphaFunction = null;
-            if (alphaFunction != null)
-            {
-                switch (alphaFunction)
-                {
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear:
-                    {
-                        _alphaFunction = "LINEAR";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse:
-                    {
-                        _alphaFunction = "REVERSE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare:
-                    {
-                        _alphaFunction = "EASE_IN_SQUARE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare:
-                    {
-                        _alphaFunction = "EASE_OUT_SQUARE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn:
-                    {
-                        _alphaFunction = "EASE_IN";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut:
-                    {
-                        _alphaFunction = "EASE_OUT";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut:
-                    {
-                        _alphaFunction = "EASE_IN_OUT";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine:
-                    {
-                        _alphaFunction = "EASE_IN_SINE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine:
-                    {
-                        _alphaFunction = "EASE_OUT_SINE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine:
-                    {
-                        _alphaFunction = "EASE_IN_OUT_SINE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce:
-                    {
-                        _alphaFunction = "BOUNCE";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin:
-                    {
-                        _alphaFunction = "SIN";
-                        break;
-                    }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack:
-                    {
-                        _alphaFunction = "EASE_OUT_BACK";
-                        break;
-                    }
-                    default:
-                    {
-                        _alphaFunction = "DEFAULT";
-                        break;
-                    }
-                }
-            }
+            string _alphaFunction = alphaFunction?.GetDescription();
 
             foreach (var item in _visualDictionary.ToList())
             {
@@ -504,5 +352,6 @@ namespace Tizen.NUI.BaseComponents
         {
             return new VisualView();
         }
+
     }
-}
\ No newline at end of file
+}
index 1a07650..bd0e8f8 100755 (executable)
@@ -272,7 +272,7 @@ namespace Tizen.NUI
         }
     }
 
-    internal class CubeTransitionEffectSignal : global::System.IDisposable
+    internal class CubeTransitionEffectSignal : Disposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         protected bool swigCMemOwn;
@@ -288,21 +288,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //A Flag to check who called Dispose(). (By User or DisposeQueue)
-        private bool isDisposeQueued = false;
-        //A Flat to check if it is already disposed.
-        protected bool disposed = false;
-
-
-        ~CubeTransitionEffectSignal()
-        {
-            if (!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
-        }
-
         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool Empty()
@@ -360,42 +345,13 @@ namespace Tizen.NUI
 
         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public void Dispose()
-        {
-            //Throw excpetion if Dispose() is called in separate thread.
-            if (!Window.IsInstalled())
-            {
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
-            }
-
-            if (isDisposeQueued)
-            {
-                Dispose(DisposeTypes.Implicit);
-            }
-            else
-            {
-                Dispose(DisposeTypes.Explicit);
-                System.GC.SuppressFinalize(this);
-            }
-        }
-
-        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        protected virtual void Dispose(DisposeTypes type)
+        protected override void Dispose(DisposeTypes type)
         {
             if (disposed)
             {
                 return;
             }
 
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
@@ -410,12 +366,10 @@ namespace Tizen.NUI
                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
             }
 
-            disposed = true;
+            base.Dispose(type);
         }
     }
 
-    
-
     /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
     [EditorBrowsable(EditorBrowsableState.Never)]
     public class CubeTransitionWaveEffect : CubeTransitionEffect
@@ -454,14 +408,6 @@ namespace Tizen.NUI
                 return;
             }
 
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
@@ -518,14 +464,6 @@ namespace Tizen.NUI
                 return;
             }
 
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
@@ -582,14 +520,6 @@ namespace Tizen.NUI
                 return;
             }
 
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
index 0aa7875..e6736af 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
@@ -312,11 +312,7 @@ namespace Tizen.NUI
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.FocusManager.FocusManager_GetCurrentFocusActor(swigCPtr);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            View ret = this.GetInstanceSafely<View>(cPtr);
             return ret;
         }
 
@@ -390,11 +386,7 @@ namespace Tizen.NUI
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.FocusManager.FocusManager_GetFocusGroup(swigCPtr, View.getCPtr(view));
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            View ret = this.GetInstanceSafely<View>(cPtr);
             return ret;
         }
 
@@ -455,11 +447,7 @@ namespace Tizen.NUI
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.FocusManager.FocusManager_GetFocusIndicatorActor(swigCPtr);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            View ret = this.GetInstanceSafely<View>(cPtr);
             return ret;
         }
 
@@ -800,4 +788,4 @@ namespace Tizen.NUI
 
 
     }
-}
\ No newline at end of file
+}
index 35c8e3b..36ca16e 100755 (executable)
@@ -17,7 +17,6 @@
 using System;
 using Tizen.NUI.BaseComponents;
 using System.ComponentModel;
-using System.Runtime.InteropServices;
 using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
@@ -374,13 +373,8 @@ namespace Tizen.NUI
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.Actor.Actor_FindChildById(swigCPtr, id);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            View ret = this.GetInstanceSafely<View>(cPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
@@ -395,13 +389,8 @@ namespace Tizen.NUI
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.Actor.Actor_FindChildByName(swigCPtr, viewName);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            View ret = this.GetInstanceSafely<View>(cPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
@@ -477,7 +466,6 @@ namespace Tizen.NUI
                 Interop.Layer.Layer_LowerToBottom(swigCPtr);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
-
         }
 
         /// <summary>
index 2f4fd6b..3678baa 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (c) 2018 Samsung Electronics Co., Ltd.
+// Copyright (c) 2019 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.
@@ -1596,9 +1596,7 @@ namespace Tizen.NUI
         {
             get
             {
-                float ret = Interop.NDalicAnchorPoint.AnchorPointTop_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.Top;
             }
         }
         /// <summary>
@@ -1609,9 +1607,7 @@ namespace Tizen.NUI
         {
             get
             {
-                float ret = Interop.NDalicAnchorPoint.AnchorPointBottom_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.Bottom;
             }
         }
         /// <summary>
@@ -1622,9 +1618,7 @@ namespace Tizen.NUI
         {
             get
             {
-                float ret = Interop.NDalicAnchorPoint.AnchorPointLeft_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.Left;
             }
         }
         /// <summary>
@@ -1635,9 +1629,7 @@ namespace Tizen.NUI
         {
             get
             {
-                float ret = Interop.NDalicAnchorPoint.AnchorPointRight_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.Right;
             }
         }
         /// <summary>
@@ -1648,9 +1640,7 @@ namespace Tizen.NUI
         {
             get
             {
-                float ret = Interop.NDalicAnchorPoint.AnchorPointMiddle_get();
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.Middle;
             }
         }
         /// <summary>
@@ -1661,10 +1651,7 @@ namespace Tizen.NUI
         {
             get
             {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopLeft_get();
-                Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.TopLeft;
             }
         }
         /// <summary>
@@ -1675,10 +1662,7 @@ namespace Tizen.NUI
         {
             get
             {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopCenter_get();
-                Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.TopCenter;
             }
         }
         /// <summary>
@@ -1689,10 +1673,7 @@ namespace Tizen.NUI
         {
             get
             {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopRight_get();
-                Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.TopRight;
             }
         }
         /// <summary>
@@ -1703,10 +1684,7 @@ namespace Tizen.NUI
         {
             get
             {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterLeft_get();
-                Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.CenterLeft;
             }
         }
         /// <summary>
@@ -1717,10 +1695,7 @@ namespace Tizen.NUI
         {
             get
             {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenter_get();
-                Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.Center;
             }
         }
         /// <summary>
@@ -1731,10 +1706,7 @@ namespace Tizen.NUI
         {
             get
             {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterRight_get();
-                Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.CenterRight;
             }
         }
         /// <summary>
@@ -1745,10 +1717,7 @@ namespace Tizen.NUI
         {
             get
             {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomLeft_get();
-                Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.BottomLeft;
             }
         }
         /// <summary>
@@ -1759,10 +1728,7 @@ namespace Tizen.NUI
         {
             get
             {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomCenter_get();
-                Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.BottomCenter;
             }
         }
         /// <summary>
@@ -1773,10 +1739,7 @@ namespace Tizen.NUI
         {
             get
             {
-                global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomRight_get();
-                Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
+                return PivotPoint.BottomRight;
             }
         }
     }
index 6325fe1..0c2bfb6 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
@@ -490,11 +490,7 @@ namespace Tizen.NUI
         {
             //to fix memory leak issue, match the handle count with native side.
             System.IntPtr cPtr = Interop.Renderer.Renderer_GetGeometry(swigCPtr);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            Geometry ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Geometry;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            Geometry ret = this.GetInstanceSafely<Geometry>(cPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -566,11 +562,7 @@ namespace Tizen.NUI
         {
             //to fix memory leak issue, match the handle count with native side.
             System.IntPtr cPtr = Interop.Renderer.Renderer_GetShader(swigCPtr);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            Shader ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Shader;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            Shader ret = this.GetInstanceSafely<Shader>(cPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index a92b909..502767d 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
@@ -101,11 +101,7 @@ namespace Tizen.NUI
         {
             //to fix memory leak issue, match the handle count with native side.
             System.IntPtr cPtr = Interop.TextureSet.TextureSet_GetSampler(swigCPtr, index);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            Sampler ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Sampler;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            Sampler ret = this.GetInstanceSafely<Sampler>(cPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -155,4 +151,4 @@ namespace Tizen.NUI
             base.Dispose(type);
         }
     }
-}
\ No newline at end of file
+}
index 35dc6a2..a16caa9 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
@@ -115,11 +115,7 @@ namespace Tizen.NUI
         {
             //to fix memory leak issue, match the handle count with native side.
             global::System.IntPtr cPtr = Interop.Touch.Touch_GetHitActor(swigCPtr, point);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            View ret = this.GetInstanceSafely<View>(cPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -302,4 +298,4 @@ namespace Tizen.NUI
         Tertiary = 2,
     }
 
-}
\ No newline at end of file
+}
index 096411c..2513397 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
@@ -1346,11 +1346,7 @@ namespace Tizen.NUI.UIComponents
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.Popup.Popup_GetTitle(swigCPtr);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            View ret = this.GetInstanceSafely<View>(cPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -1359,11 +1355,7 @@ namespace Tizen.NUI.UIComponents
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.Popup.Popup_GetContent(swigCPtr);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            View ret = this.GetInstanceSafely<View>(cPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -1372,11 +1364,7 @@ namespace Tizen.NUI.UIComponents
         {
             //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = Interop.Popup.Popup_GetFooter(swigCPtr);
-            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
-            Interop.BaseHandle.delete_BaseHandle(CPtr);
-            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+            View ret = this.GetInstanceSafely<View>(cPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index f3daa65..d3b3924 100755 (executable)
@@ -631,7 +631,16 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         protected virtual void ComposingPropertyMap()
         {
-            _outputVisualMap = new PropertyMap();
+            if (null == _outputVisualMap)
+            {
+                _outputVisualMap = new PropertyMap();
+            }
+
+            if (_shader != null) { _outputVisualMap.Add(Visual.Property.Shader, new PropertyValue(_shader)); }
+            if (_premultipliedAlpha != null) { _outputVisualMap.Add(Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+            if (_mixColor != null) { _outputVisualMap.Add(Visual.Property.MixColor, new PropertyValue(_mixColor)); }
+            if (_opacity != null) { _outputVisualMap.Add(Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
+            if (_visualFittingMode != null) { _outputVisualMap.Add(Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
         }
 
         private void ComposingTransformMap()
index 5589f54..beb8907 100755 (executable)
@@ -179,15 +179,11 @@ namespace Tizen.NUI
                     }
                     _outputVisualMap.Add(ImageVisualProperty.URL, (new PropertyValue(urlArray)));
                 }
-                if (_batchSize != null) { _outputVisualMap.Add((int)ImageVisualProperty.BatchSize, new PropertyValue((int)_batchSize)); }
-                if (_cacheSize != null) { _outputVisualMap.Add((int)ImageVisualProperty.CacheSize, new PropertyValue((int)_cacheSize)); }
-                if (_frameDelay != null) { _outputVisualMap.Add((int)ImageVisualProperty.FrameDelay, new PropertyValue((float)_frameDelay)); }
-                if (_loopCount != null) { _outputVisualMap.Add((int)ImageVisualProperty.LoopCount, new PropertyValue((int)_loopCount)); }
-                if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
-                if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
-                if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
-                if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
-                if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+                if (_batchSize != null) { _outputVisualMap.Add(ImageVisualProperty.BatchSize, new PropertyValue((int)_batchSize)); }
+                if (_cacheSize != null) { _outputVisualMap.Add(ImageVisualProperty.CacheSize, new PropertyValue((int)_cacheSize)); }
+                if (_frameDelay != null) { _outputVisualMap.Add(ImageVisualProperty.FrameDelay, new PropertyValue((float)_frameDelay)); }
+                if (_loopCount != null) { _outputVisualMap.Add(ImageVisualProperty.LoopCount, new PropertyValue((int)_loopCount)); }
+                base.ComposingPropertyMap();
             }
         }
     }
index ec0c9eb..5500f24 100755 (executable)
@@ -103,11 +103,7 @@ namespace Tizen.NUI
                 _outputVisualMap.Add(BorderVisualProperty.Size, new PropertyValue((float)_size));
                 _outputVisualMap.Add(BorderVisualProperty.Color, new PropertyValue(_color));
                 if (_antiAliasing != null) { _outputVisualMap.Add(BorderVisualProperty.AntiAliasing, new PropertyValue((bool)_antiAliasing)); }
-                if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
-                if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
-                if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
-                if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
-                if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+                base.ComposingPropertyMap();
             }
         }
     }
index ccfc68c..5906fcd 100755 (executable)
@@ -81,11 +81,11 @@ namespace Tizen.NUI
                 _outputVisualMap = new PropertyMap();
                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color));
                 _outputVisualMap.Add(ColorVisualProperty.MixColor, new PropertyValue(_mixColorForColorVisual));
-                if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
-                if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
-                if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
+                if (_shader != null) { _outputVisualMap.Add(Visual.Property.Shader, new PropertyValue(_shader)); }
+                if (_premultipliedAlpha != null) { _outputVisualMap.Add(Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+                if (_opacity != null) { _outputVisualMap.Add(Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
                 if (_renderIfTransparent != null) { _outputVisualMap.Add(ColorVisualProperty.RenderIfTransparent, new PropertyValue((bool)_renderIfTransparent)); }
-                if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+                if (_visualFittingMode != null) { _outputVisualMap.Add(Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
             }
         }
     }
index 54275ba..f4537c4 100755 (executable)
@@ -208,11 +208,7 @@ namespace Tizen.NUI
                 if (_stopOffset != null) { _outputVisualMap.Add(GradientVisualProperty.StopOffset, new PropertyValue(_stopOffset)); }
                 if (_units != null) { _outputVisualMap.Add(GradientVisualProperty.Units, new PropertyValue((int)_units)); }
                 if (_spreadMethod != null) { _outputVisualMap.Add(GradientVisualProperty.SpreadMethod, new PropertyValue((int)_spreadMethod)); }
-                if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
-                if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
-                if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
-                if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
-                if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+                base.ComposingPropertyMap();
             }
         }
     }
index 4c03c22..8b5043a 100755 (executable)
@@ -439,18 +439,14 @@ namespace Tizen.NUI
                 if (_pixelArea != null) { _outputVisualMap.Add(ImageVisualProperty.PixelArea, new PropertyValue(_pixelArea)); }
                 if (_wrapModeU != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeU, new PropertyValue((int)_wrapModeU)); }
                 if (_wrapModeV != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeV, new PropertyValue((int)_wrapModeV)); }
-                if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
-                if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
-                if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
-                if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
-                if (_maskContentScale != null) { _outputVisualMap.Add((int)ImageVisualProperty.MaskContentScale, new PropertyValue((float)_maskContentScale)); }
-                if (_cropToMask != null) { _outputVisualMap.Add((int)ImageVisualProperty.CropToMask, new PropertyValue((bool)_cropToMask)); }
-                if (_auxiliaryImageAlpha != null) { _outputVisualMap.Add((int)ImageVisualProperty.AuxiliaryImageAlpha, new PropertyValue((float)_auxiliaryImageAlpha)); }
+                if (_maskContentScale != null) { _outputVisualMap.Add(ImageVisualProperty.MaskContentScale, new PropertyValue((float)_maskContentScale)); }
+                if (_cropToMask != null) { _outputVisualMap.Add(ImageVisualProperty.CropToMask, new PropertyValue((bool)_cropToMask)); }
+                if (_auxiliaryImageAlpha != null) { _outputVisualMap.Add(ImageVisualProperty.AuxiliaryImageAlpha, new PropertyValue((float)_auxiliaryImageAlpha)); }
                 if (_releasePolicy != null) { _outputVisualMap.Add(ImageVisualProperty.ReleasePolicy, new PropertyValue((int)_releasePolicy)); }
                 if (_loadPolicy != null) { _outputVisualMap.Add(ImageVisualProperty.LoadPolicy, new PropertyValue((int)_loadPolicy)); }
                 if (_orientationCorrection != null) { _outputVisualMap.Add(ImageVisualProperty.OrientationCorrection, new PropertyValue((bool)_orientationCorrection)); }
                 if (_atlasing != null) { _outputVisualMap.Add(ImageVisualProperty.Atlasing, new PropertyValue((bool)_atlasing)); }
-                if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+                base.ComposingPropertyMap();
             }
         }
     }
index 209c368..51729fd 100755 (executable)
@@ -189,11 +189,7 @@ namespace Tizen.NUI
                 if (_shadingMode != null) { _outputVisualMap.Add(MeshVisualProperty.ShadingMode, new PropertyValue((int)_shadingMode)); }
                 if (_useMipmapping != null) { _outputVisualMap.Add(MeshVisualProperty.UseMipmapping, new PropertyValue((bool)_useMipmapping)); }
                 if (_useSoftNormals != null) { _outputVisualMap.Add(MeshVisualProperty.UseSoftNormals, new PropertyValue((bool)_useSoftNormals)); }
-                if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
-                if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
-                if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
-                if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
-                if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+                base.ComposingPropertyMap();
             }
         }
     }
index a1f6e09..f8df131 100755 (executable)
@@ -105,11 +105,7 @@ namespace Tizen.NUI
                 _outputVisualMap.Add(NpatchImageVisualProperty.URL, new PropertyValue(_url));
                 if (_borderOnly != null) { _outputVisualMap.Add(NpatchImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); }
                 if (_border != null) { _outputVisualMap.Add(NpatchImageVisualProperty.Border, new PropertyValue(_border)); }
-                if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
-                if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
-                if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
-                if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
-                if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+                base.ComposingPropertyMap();
             }
         }
     }
index 6690fc7..d153f93 100755 (executable)
@@ -325,10 +325,10 @@ namespace Tizen.NUI
             if (_bevelPercentage != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelPercentage, new PropertyValue((float)_bevelPercentage)); }
             if (_bevelSmoothness != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelSmoothness, new PropertyValue((float)_bevelSmoothness)); }
             if (_lightPosition != null) { _outputVisualMap.Add(PrimitiveVisualProperty.LightPosition, new PropertyValue(_lightPosition)); }
-            if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
-            if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
-            if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
-            if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+            if (_shader != null) { _outputVisualMap.Add(Visual.Property.Shader, new PropertyValue(_shader)); }
+            if (_premultipliedAlpha != null) { _outputVisualMap.Add(Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+            if (_opacity != null) { _outputVisualMap.Add(Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
+            if (_visualFittingMode != null) { _outputVisualMap.Add(Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
         }
     }
 }
index cbb1e28..4c071e0 100755 (executable)
@@ -61,11 +61,7 @@ namespace Tizen.NUI
                 _outputVisualMap = new PropertyMap();
                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.SVG));
                 _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url));
-                if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
-                if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
-                if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
-                if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
-                if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+                base.ComposingPropertyMap();
             }
         }
     }
index 0a423cc..1bec08f 100755 (executable)
@@ -361,15 +361,11 @@ namespace Tizen.NUI
                 if (_verticalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.VerticalAlignment, new PropertyValue(_verticalAlignment)); }
                 if (_textColor != null) { _outputVisualMap.Add(TextVisualProperty.TextColor, new PropertyValue(_textColor)); }
                 if (_enableMarkup != null) { _outputVisualMap.Add(TextVisualProperty.EnableMarkup, new PropertyValue((bool)_enableMarkup)); }
-                if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
-                if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
-                if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
-                if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
                 if (_shadow != null) { _outputVisualMap.Add(TextVisualProperty.Shadow, new PropertyValue(_shadow)); }
                 if (_underline != null) { _outputVisualMap.Add(TextVisualProperty.Underline, new PropertyValue(_underline)); }
                 if (_outline != null) { _outputVisualMap.Add(TextVisualProperty.Outline, new PropertyValue(_outline)); }
                 if (_background != null) { _outputVisualMap.Add(TextVisualProperty.Background, new PropertyValue(_background)); }
-                if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+                base.ComposingPropertyMap();
             }
         }
     }
index c5d4767..851f4e0 100755 (executable)
@@ -48,113 +48,11 @@ namespace Tizen.NUI
         {
             get
             {
-                switch (_alphaFunction)
-                {
-                    case "LINEAR":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear;
-                    case "REVERSE":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse;
-                    case "EASE_IN_SQUARE":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare;
-                    case "EASE_OUT_SQUARE":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare;
-                    case "EASE_IN":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn;
-                    case "EASE_OUT":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut;
-                    case "EASE_IN_OUT":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut;
-                    case "EASE_IN_SINE":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine;
-                    case "EASE_OUT_SINE":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine;
-                    case "EASE_IN_OUT_SINE":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine;
-                    case "BOUNCE":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce;
-                    case "SIN":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin;
-                    case "EASE_OUT_BACK":
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack;
-                    default:
-                        return Tizen.NUI.AlphaFunction.BuiltinFunctions.Default;
-                }
+                return _alphaFunction.GetValueByDescription<AlphaFunction.BuiltinFunctions>();
             }
             set
             {
-                switch (value)
-                {
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear:
-                        {
-                            _alphaFunction = "LINEAR";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse:
-                        {
-                            _alphaFunction = "REVERSE";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare:
-                        {
-                            _alphaFunction = "EASE_IN_SQUARE";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare:
-                        {
-                            _alphaFunction = "EASE_OUT_SQUARE";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn:
-                        {
-                            _alphaFunction = "EASE_IN";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut:
-                        {
-                            _alphaFunction = "EASE_OUT";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut:
-                        {
-                            _alphaFunction = "EASE_IN_OUT";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine:
-                        {
-                            _alphaFunction = "EASE_IN_SINE";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine:
-                        {
-                            _alphaFunction = "EASE_OUT_SINE";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine:
-                        {
-                            _alphaFunction = "EASE_IN_OUT_SINE";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce:
-                        {
-                            _alphaFunction = "BOUNCE";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin:
-                        {
-                            _alphaFunction = "SIN";
-                            break;
-                        }
-                    case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack:
-                        {
-                            _alphaFunction = "EASE_OUT_BACK";
-                            break;
-                        }
-                    default:
-                        {
-                            _alphaFunction = "DEFAULT";
-                            break;
-                        }
-                }
+                _alphaFunction = value.GetDescription();
             }
         }
 
index 85c202b..64441d6 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -256,7 +256,7 @@ namespace Tizen.NUI
 
                 if (File.Exists(likelyResourcePath))
                 {
-                    trans = Extensions.LoadObject<Transition>(likelyResourcePath);
+                    trans = Xaml.Extensions.LoadObject<Transition>(likelyResourcePath);
                 }
                 if (trans)
                 {