[NUI] Fix build warning CA1062 (#2234)
authorSeoyeon2Kim <34738918+Seoyeon2Kim@users.noreply.github.com>
Mon, 23 Nov 2020 06:23:03 +0000 (15:23 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Thu, 26 Nov 2020 08:19:50 +0000 (17:19 +0900)
* [NUI] Fix build warning CA1062

- Need to verify whether the argument is null
https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1062

Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
* [NUI] Add exception handling tag

- The <exception> tag lets you specify which exceptions can be thrown.

Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
55 files changed:
src/Tizen.NUI/src/internal/Camera.cs
src/Tizen.NUI/src/internal/ItemContainer.cs
src/Tizen.NUI/src/internal/ItemIdContainer.cs
src/Tizen.NUI/src/internal/RenderTask.cs
src/Tizen.NUI/src/public/Animation.cs
src/Tizen.NUI/src/public/BaseComponents/ControlState.cs
src/Tizen.NUI/src/public/BaseComponents/ImageView.cs
src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs
src/Tizen.NUI/src/public/BaseComponents/Style/Selector.cs
src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs
src/Tizen.NUI/src/public/BaseComponents/View.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/Capture.cs
src/Tizen.NUI/src/public/Color.cs
src/Tizen.NUI/src/public/CustomView/Spin.cs
src/Tizen.NUI/src/public/CustomViewRegistry.cs
src/Tizen.NUI/src/public/Extents.cs
src/Tizen.NUI/src/public/GLWindow.cs
src/Tizen.NUI/src/public/GraphicsTypeConverter.cs
src/Tizen.NUI/src/public/ImageLoading.cs
src/Tizen.NUI/src/public/KeyValue.cs
src/Tizen.NUI/src/public/Layer.cs
src/Tizen.NUI/src/public/Layouting/FlexLayout.cs
src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs
src/Tizen.NUI/src/public/NUIComponentApplication.cs
src/Tizen.NUI/src/public/Position.cs
src/Tizen.NUI/src/public/Position2D.cs
src/Tizen.NUI/src/public/PropertyArray.cs
src/Tizen.NUI/src/public/PropertyMap.cs
src/Tizen.NUI/src/public/PropertyNotification.cs
src/Tizen.NUI/src/public/PropertyValue.cs
src/Tizen.NUI/src/public/RelativeVector2.cs
src/Tizen.NUI/src/public/RelativeVector3.cs
src/Tizen.NUI/src/public/RelativeVector4.cs
src/Tizen.NUI/src/public/Rotation.cs
src/Tizen.NUI/src/public/Size.cs
src/Tizen.NUI/src/public/Size2D.cs
src/Tizen.NUI/src/public/UIComponents/Slider.cs
src/Tizen.NUI/src/public/Vector2.cs
src/Tizen.NUI/src/public/Vector3.cs
src/Tizen.NUI/src/public/Vector4.cs
src/Tizen.NUI/src/public/VertexBuffer.cs
src/Tizen.NUI/src/public/ViewProperty/ImageShadow.cs
src/Tizen.NUI/src/public/ViewProperty/Shadow.cs
src/Tizen.NUI/src/public/ViewProperty/ShadowBase.cs
src/Tizen.NUI/src/public/WidgetViewManager.cs
src/Tizen.NUI/src/public/Window.cs
src/Tizen.NUI/src/public/XamlBinding/BindableObject.cs
src/Tizen.NUI/src/public/XamlBinding/ColorTypeConverter.cs
src/Tizen.NUI/src/public/XamlBinding/Element.cs
src/Tizen.NUI/src/public/XamlBinding/Internals/NameScope.cs
src/Tizen.NUI/src/public/XamlBinding/SizeTypeConverter.cs
src/Tizen.NUI/src/public/XamlBinding/Transition.cs

index ef68537..8b7b9bb 100755 (executable)
@@ -69,6 +69,10 @@ namespace Tizen.NUI
 
         public static Camera DownCast(BaseHandle handle)
         {
+            if (handle == null)
+            {
+                throw new global::System.ArgumentNullException(nameof(handle));
+            }
             Camera ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Camera;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index 3bf852f..62544a1 100755 (executable)
@@ -197,7 +197,7 @@ namespace Tizen.NUI
                 collectionRef = collection;
                 currentIndex = -1;
                 currentObject = null;
-                currentSize = collectionRef.Count;
+                currentSize = collectionRef?.Count ?? 0;
             }
 
             // Type-safe iterator Current
index 33ac295..b7e47bd 100755 (executable)
@@ -196,7 +196,7 @@ namespace Tizen.NUI
                 collectionRef = collection;
                 currentIndex = -1;
                 currentObject = null;
-                currentSize = collectionRef.Count;
+                currentSize = collectionRef?.Count ?? 0;
             }
 
             // Type-safe iterator Current
index 7f62c63..c6dec1e 100755 (executable)
@@ -152,6 +152,10 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static RenderTask DownCast(BaseHandle handle)
         {
+            if (handle == null)
+            {
+                throw new global::System.ArgumentNullException(nameof(handle));
+            }
             RenderTask ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as RenderTask;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index 099dd27..d5c1c6f 100755 (executable)
@@ -506,11 +506,16 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="handle">Handle to an object.</param>
         /// <returns>Handle to an animation object or an uninitialized handle.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when handle is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         [Obsolete("Deprecated in API6, Will be removed in API9, Please use as keyword instead!")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static Animation DownCast(BaseHandle handle)
         {
+            if (handle == null)
+            {
+                throw new ArgumentNullException(nameof(handle));
+            }
             Animation ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Animation;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -535,9 +540,19 @@ namespace Tizen.NUI
         /// <param name="property">The target property to animate.</param>
         /// <param name="relativeValue">The property value will change by this amount.</param>
         /// <param name="alphaFunction">The alpha function to apply.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when target or relativeValue is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public void AnimateBy(View target, string property, object relativeValue, AlphaFunction alphaFunction = null)
         {
+            if (target == null)
+            {
+                throw new ArgumentNullException(nameof(target));
+            }
+            else if (relativeValue == null)
+            {
+                throw new ArgumentNullException(nameof(relativeValue));
+            }
+
             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
             relativeValue = AvoidFloatPropertyHasIntegerValue(target, _prop, relativeValue);
             PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
@@ -561,9 +576,19 @@ namespace Tizen.NUI
         /// <param name="startTime">The start time of the animation.</param>
         /// <param name="endTime">The end time of the animation.</param>
         /// <param name="alphaFunction">The alpha function to apply.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when target or relativeValue is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public void AnimateBy(View target, string property, object relativeValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
         {
+            if (target == null)
+            {
+                throw new ArgumentNullException(nameof(target));
+            }
+            else if (relativeValue == null)
+            {
+                throw new ArgumentNullException(nameof(relativeValue));
+            }
+
             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
             relativeValue = AvoidFloatPropertyHasIntegerValue(target, _prop, relativeValue);
             PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
@@ -587,9 +612,19 @@ namespace Tizen.NUI
         /// <param name="property">The target property to animate.</param>
         /// <param name="destinationValue">The destination value.</param>
         /// <param name="alphaFunction">The alpha function to apply.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when target or destinationValue is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public void AnimateTo(View target, string property, object destinationValue, AlphaFunction alphaFunction = null)
         {
+            if (target == null)
+            {
+                throw new ArgumentNullException(nameof(target));
+            }
+            else if (destinationValue == null)
+            {
+                throw new ArgumentNullException(nameof(destinationValue));
+            }
+
             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
             destinationValue = AvoidFloatPropertyHasIntegerValue(target, _prop, destinationValue);
             PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
@@ -608,8 +643,14 @@ namespace Tizen.NUI
         /// Animates one or more properties to a destination value.<br />
         /// </summary>
         /// <param name="target">The target object to animate.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when target is null. </exception>
         public void PlayAnimateTo(View target)
         {
+            if (target == null)
+            {
+                throw new ArgumentNullException(nameof(target));
+            }
+
             Clear();
             if (_properties.Length == _destValue.Length && _startTime.Length == _endTime.Length && _properties.Length == _startTime.Length)
             {
@@ -643,9 +684,19 @@ namespace Tizen.NUI
         /// <param name="startTime">The start time of the animation.</param>
         /// <param name="endTime">The end time of the animation.</param>
         /// <param name="alphaFunction">The alpha function to apply.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when target or destinationValue is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public void AnimateTo(View target, string property, object destinationValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
         {
+            if (target == null)
+            {
+                throw new ArgumentNullException(nameof(target));
+            }
+            else if (destinationValue == null)
+            {
+                throw new ArgumentNullException(nameof(destinationValue));
+            }
+
             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
             destinationValue = AvoidFloatPropertyHasIntegerValue(target, _prop, destinationValue);
             PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
index 5d26cfb..14a7de2 100755 (executable)
@@ -268,9 +268,19 @@ namespace Tizen.NUI.BaseComponents
         /// <param name="lhs">A <see cref="ControlState"/> on the left hand side.</param>
         /// <param name="rhs">A <see cref="ControlState"/> on the right hand side.</param>
         /// <returns>The <see cref="ControlState"/> containing the result of the substraction.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when lhs or rhs is null. </exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static ControlState operator -(ControlState lhs, ControlState rhs)
         {
+            if (null == lhs)
+            {
+                throw new ArgumentNullException(nameof(lhs));
+            }
+            else if (null == rhs)
+            {
+                throw new ArgumentNullException(nameof(rhs));
+            }
+
             if (!lhs.IsCombined)
             {
                 return ReferenceEquals(lhs, rhs) ? Normal : lhs;
index 19eea4e..d31994a 100755 (executable)
@@ -655,6 +655,7 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Downcasts a handle to imageView handle.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when handle is null. </exception>
         /// Please do not use! this will be deprecated!
         /// Instead please use as keyword.
         /// <since_tizen> 3 </since_tizen>
@@ -665,6 +666,10 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static ImageView DownCast(BaseHandle handle)
         {
+            if (null == handle)
+            {
+                throw new ArgumentNullException(nameof(handle));
+            }
             ImageView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as ImageView;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -675,9 +680,15 @@ namespace Tizen.NUI.BaseComponents
         /// If the URL is empty, ImageView will not display anything.<br />
         /// </summary>
         /// <param name="url">The URL to the image resource to display.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when url is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public void SetImage(string url)
         {
+            if (null == url)
+            {
+                throw new ArgumentNullException(nameof(url));
+            }
+
             if (url.Contains(".json"))
             {
                 Tizen.Log.Fatal("NUI", "[ERROR] Please DO NOT set lottie file in ImageView! This is temporary checking, will be removed soon!");
index 3876139..4ebe19b 100755 (executable)
@@ -303,7 +303,7 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Sets or gets the loop count. 
+        /// Sets or gets the loop count.
         /// </summary>
         /// <remarks>
         /// The minus value means the infinite loop count.
@@ -514,7 +514,7 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// A marker has its start frame and end frame. 
+        /// A marker has its start frame and end frame.
         /// Animation will play between the start frame and the end frame of the marker if one marker is specified.
         /// Or animation will play between the start frame of the first marker and the end frame of the second marker if two markers are specified.   *
         /// </summary>
index 6f64793..07baed1 100755 (executable)
@@ -212,6 +212,7 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Get value by State.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when state is null. </exception>
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
         /// <returns>True if the selector has a given state value, false otherwise.</returns>
@@ -234,6 +235,10 @@ namespace Tizen.NUI.BaseComponents
                 return true;
             }
 
+            if (null == state)
+            {
+                throw new ArgumentNullException(nameof(state));
+            }
             if (state.IsCombined)
             {
                 index = ((List<StateValuePair<T>>)StateValueList).FindIndex(x => state.Contains(x.State));
@@ -295,9 +300,15 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Copy values from other selector.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when other is null. </exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void Clone(Selector<T> other)
         {
+            if (null == other)
+            {
+                throw new ArgumentNullException(nameof(other));
+            }
+
             if (cloneable)
             {
                 All = (T)((ICloneable)other.All)?.Clone();
@@ -349,10 +360,15 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Return the containing selector. It can be null.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when view is null. </exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public Selector<T> Get(View view)
         {
             if (!dirty) return selector;
+            if (null == view)
+            {
+                throw new ArgumentNullException(nameof(view));
+            }
 
             T value = default;
 
@@ -377,11 +393,17 @@ namespace Tizen.NUI.BaseComponents
         /// <param name="view">The View that is affected by this TriggerableSelector.</param>
         /// <param name="otherSelector">The copy target.</param>
         /// <param name="updateView">Whether it updates the target view after update the selector or not.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when view is null. </exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void Update(View view, Selector<T> otherSelector, bool updateView = false)
         {
             Reset(view);
 
+            if (null == view)
+            {
+                throw new ArgumentNullException(nameof(view));
+            }
+
             if (otherSelector == null)
             {
                 return;
@@ -427,7 +449,10 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void Reset(View view)
         {
-            view.ControlStateChangeEventInternal -= OnViewControlState;
+            if (view != null)
+            {
+                view.ControlStateChangeEventInternal -= OnViewControlState;
+            }
             selector?.Clear();
             selector = null;
             dirty = false;
index 10d2492..d3c9486 100755 (executable)
@@ -945,6 +945,7 @@ namespace Tizen.NUI.BaseComponents
         /// </summary>
         /// <param name="handle"></param>
         /// <returns></returns>
+        /// <exception cref="ArgumentNullException"> Thrown when handle is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         /// Please do not use! this will be deprecated!
         /// Instead please use as keyword.
@@ -955,8 +956,11 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static TextLabel DownCast(BaseHandle handle)
         {
+            if (null == handle)
+            {
+                throw new ArgumentNullException(nameof(handle));
+            }
             TextLabel ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
-
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index 21b8008..ef97a6d 100755 (executable)
@@ -1684,6 +1684,7 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Gets or sets the minimum size the view can be assigned in size negotiation.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
         /// <remarks>
         /// The property cascade chaining set is possible. For example, this (view.MinimumSize.Width = 1;) is possible.
         /// </remarks>
@@ -1697,6 +1698,10 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
+                if (value == null)
+                {
+                    throw new ArgumentNullException(nameof(value));
+                }
                 if (_layout != null)
                 {
                     // Note: it only works if minimum size is >= than natural size.
@@ -2040,6 +2045,7 @@ namespace Tizen.NUI.BaseComponents
         ///<summary>
         /// Set a layout transitions for this View.
         ///</summary>
+        /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
         /// <remarks>
         /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
         /// </remarks>
@@ -2048,10 +2054,15 @@ namespace Tizen.NUI.BaseComponents
         {
             set
             {
+                if (value == null)
+                {
+                    throw new global::System.ArgumentNullException(nameof(value));
+                }
                 if (_layoutTransitions == null)
                 {
                     _layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
                 }
+
                 LayoutTransitionsHelper.AddTransitionForCondition(_layoutTransitions, value.Condition, value, true);
 
                 AttachTransitionsToChildren(value);
index bd71b42..a63b08c 100755 (executable)
@@ -1167,9 +1167,15 @@ namespace Tizen.NUI.BaseComponents
         /// The touch event handler for ControlState.
         /// Please change ControlState value by touch state if needed.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when touch is null. </exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected virtual bool HandleControlStateOnTouch(Touch touch)
         {
+            if (touch == null)
+            {
+                throw new global::System.ArgumentNullException(nameof(touch));
+            }
+
             switch (touch.GetState(0))
             {
                 case PointStateType.Down:
@@ -1185,7 +1191,6 @@ namespace Tizen.NUI.BaseComponents
                 default:
                     break;
             }
-
             return false;
         }
 
index 7871280..6467155 100755 (executable)
@@ -162,7 +162,7 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 4 </since_tizen>
         public override void Remove(View child)
         {
-            if (!child || child.GetParent() == null) // Early out if child null.
+            if (child == null || child.GetParent() == null) // Early out if child null.
                 return;
 
             bool hasLayout = (_layout != null);
index e81b6ba..1746de3 100755 (executable)
@@ -114,6 +114,7 @@ namespace Tizen.NUI.BaseComponents
         /// </summary>
         /// <param name="visualName">The name of a visual to add. If a name is added to an existing visual name, the visual will be replaced.</param>
         /// <param name="visualMap">The property map of a visual to create.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when visualMap is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public void AddVisual(string visualName, VisualMap visualMap)
         {
@@ -142,6 +143,10 @@ namespace Tizen.NUI.BaseComponents
 
             if (visualIndex > 0)
             {
+                if (visualMap == null)
+                {
+                    throw new ArgumentNullException(nameof(visualMap));
+                }
                 visual = VisualFactory.Instance.CreateVisual(visualMap.OutputVisualMap); // Create a visual for the new one.
                 visual.Name = visualName;
                 visual.DepthIndex = visualMap.DepthIndex;
@@ -227,9 +232,15 @@ namespace Tizen.NUI.BaseComponents
         /// <param name="alphaFunction">The alpha function of visual animation.</param>
         /// <param name="initialValue">The initial property value of visual animation.</param>
         /// <returns>Animation instance</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when target is null. </exception>
         /// <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)
         {
+            if (target == null)
+            {
+                throw new ArgumentNullException(nameof(target));
+            }
+
             string _alphaFunction = alphaFunction?.GetDescription();
 
             foreach (var item in _visualDictionary.ToList())
@@ -279,9 +290,15 @@ namespace Tizen.NUI.BaseComponents
         /// <param name="endTime">The end time of visual animation.</param>
         /// <param name="alphaFunction">The alpha function of visual animation.</param>
         /// <param name="initialValue">The initial property value of visual animation.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when target is null. </exception>
         /// <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)
         {
+            if (target == null)
+            {
+                throw new ArgumentNullException(nameof(target));
+            }
+
             string _alphaFunction = alphaFunction?.GetDescription();
 
             foreach (var item in _visualDictionary.ToList())
@@ -339,9 +356,15 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// temporary fix to pass TCT.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when visualMap is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public Animation VisualAnimate(Tizen.NUI.VisualAnimator visualMap)
         {
+            if (visualMap == null)
+            {
+                throw new ArgumentNullException(nameof(visualMap));
+            }
+
             foreach (var item in _visualDictionary.ToList())
             {
                 if (item.Value.Name == visualMap.Target)
index 2dee58a..c31514a 100755 (executable)
@@ -105,11 +105,15 @@ namespace Tizen.NUI
         /// If path is empty string, the captured result is not be saved as a file.</param>
         /// <param name="color">background color of captured scene.</param>
         /// <exception cref="InvalidOperationException">This exception can be due to the invalid size values, of when width or height is lower than zero.</exception>
-        /// <exception cref="ArgumentNullException">This exception is due to the path is null.</exception>
+        /// <exception cref="ArgumentNullException">This exception is thrown when size or path or position or color is null.</exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void Start(Container source, Position position, Size size, string path, Color color)
         {
-            if (size.Width <= 0 || size.Height <= 0)
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
+            else if (size.Width <= 0 || size.Height <= 0)
             {
                 throw new InvalidOperationException("size should larger than zero");
             }
@@ -117,6 +121,14 @@ namespace Tizen.NUI
             {
                 throw new ArgumentNullException("path should not be null");
             }
+            else if (null == position)
+            {
+                throw new ArgumentNullException(nameof(position));
+            }
+            else if (null == color)
+            {
+                throw new ArgumentNullException(nameof(color));
+            }
 
             if (source is View || source is Layer)
             {
@@ -137,11 +149,15 @@ namespace Tizen.NUI
         /// <param name="color">background color of captured scene.</param>
         /// <param name="quality">The value to control image quality for jpeg file format in the range [1, 100].</param>
         /// <exception cref="InvalidOperationException">This exception can be due to the invalid size values, of when width or height is lower than zero.</exception>
-        /// <exception cref="ArgumentNullException">This exception is due to the path is null.</exception>
+        /// <exception cref="ArgumentNullException">This exception is thrown when size or path or color is null.</exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void Start(Container source, Size size, string path, Color color, uint quality)
         {
-            if (size.Width <= 0 || size.Height <= 0)
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
+            else if (size.Width <= 0 || size.Height <= 0)
             {
                 throw new InvalidOperationException("size should larger than zero");
             }
@@ -153,6 +169,10 @@ namespace Tizen.NUI
             {
                 throw new InvalidOperationException("quality should between 0 to 100");
             }
+            else if (null == color)
+            {
+                throw new ArgumentNullException(nameof(color));
+            }
 
             if (source is View || source is Layer)
             {
@@ -172,11 +192,15 @@ namespace Tizen.NUI
         /// If path is empty string, the captured result is not be saved as a file.</param>
         /// <param name="color">background color of captured scene.</param>
         /// <exception cref="InvalidOperationException">This exception can be due to the invalid size values, of when width or height is lower than zero.</exception>
-        /// <exception cref="ArgumentNullException">This exception is due to the path is null.</exception>
+        /// <exception cref="ArgumentNullException">This exception is thrown when size or path or color is null.</exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void Start(Container source, Size size, string path, Color color)
         {
-            if (size.Width <= 0 || size.Height <= 0)
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
+            else if (size.Width <= 0 || size.Height <= 0)
             {
                 throw new InvalidOperationException("size should larger than zero");
             }
@@ -184,6 +208,10 @@ namespace Tizen.NUI
             {
                 throw new ArgumentNullException("path should not be null");
             }
+            else if (null == color)
+            {
+                throw new ArgumentNullException(nameof(color));
+            }
 
             if (source is View || source is Layer)
             {
@@ -205,11 +233,15 @@ namespace Tizen.NUI
         /// <param name="path">image file path to be saved as a file.
         /// If path is empty string, the captured result is not be saved as a file.</param>
         /// <exception cref="InvalidOperationException">This exception can be due to the invalid size values, of when width or height is lower than zero.</exception>
-        /// <exception cref="ArgumentNullException">This exception is due to the path is null.</exception>
+        /// <exception cref="ArgumentNullException">This exception is thrown when size or path is null.</exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void Start(Container source, Size size, string path)
         {
-            if (size.Width <= 0 || size.Height <= 0)
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
+            else if (size.Width <= 0 || size.Height <= 0)
             {
                 throw new InvalidOperationException("size should larger than zero");
             }
index 55a3596..84e110d 100755 (executable)
@@ -121,6 +121,7 @@ namespace Tizen.NUI
         /// The conversion constructor from an hexcode of four floats.
         /// </summary>
         /// <param name="hexColor">Hex color code</param>
+        /// <exception cref="ArgumentNullException">This exception is thrown when hexColor is null.</exception>
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -128,6 +129,10 @@ namespace Tizen.NUI
         {
             try
             {
+                if (null == hexColor)
+                {
+                    throw new ArgumentNullException(nameof(hexColor));
+                }
                 hexColor = hexColor.Replace("#", "");
 
                 R = ((float)Convert.ToInt32(hexColor.Substring(0, 2), 16)) / 255.0f;
@@ -159,7 +164,7 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="other">The copy target.</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public Color(Color other) : this(other.R, other.G, other.B, other.A)
+        public Color(Color other) : this((float)other?.R, (float)other.G, (float)other.B, (float)other.A)
         {
         }
 
@@ -294,7 +299,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator Vector4(Color color)
         {
-            return new Vector4(color.R, color.G, color.B, color.A);
+            return new Vector4((float)color?.R, (float)color.G, (float)color.B, (float)color.A);
         }
 
         /// <summary>
@@ -304,7 +309,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator Color(Vector4 vec)
         {
-            return new Color(vec.R, vec.G, vec.B, vec.A);
+            return new Color((float)vec?.R, (float)vec.G, (float)vec.B, (float)vec.A);
         }
 
         /// <summary>
@@ -313,9 +318,14 @@ namespace Tizen.NUI
         /// <param name="arg1">The first value.</param>
         /// <param name="arg2">The second value.</param>
         /// <returns>The color containing the result of the addition.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public static Color operator +(Color arg1, Color arg2)
         {
+            if (null == arg1)
+            {
+                throw new ArgumentNullException(nameof(arg1));
+            }
             Color result = arg1.Add(arg2);
             return ValueCheck(result);
         }
@@ -326,9 +336,14 @@ namespace Tizen.NUI
         /// <param name="arg1">The first value.</param>
         /// <param name="arg2">The second value.</param>
         /// <returns>The color containing the result of the subtraction.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public static Color operator -(Color arg1, Color arg2)
         {
+            if (null == arg1)
+            {
+                throw new ArgumentNullException(nameof(arg1));
+            }
             Color result = arg1.Subtract(arg2);
             return ValueCheck(result);
         }
@@ -338,9 +353,14 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="arg1">The target value.</param>
         /// <returns>The color containg the negation.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public static Color operator -(Color arg1)
         {
+            if (null == arg1)
+            {
+                throw new ArgumentNullException(nameof(arg1));
+            }
             Color result = arg1.Subtract();
             return ValueCheck(result);
         }
@@ -351,9 +371,14 @@ namespace Tizen.NUI
         /// <param name="arg1">The first value.</param>
         /// <param name="arg2">The second value.</param>
         /// <returns>The color containing the result of the multiplication.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public static Color operator *(Color arg1, Color arg2)
         {
+            if (null == arg1)
+            {
+                throw new ArgumentNullException(nameof(arg1));
+            }
             Color result = arg1.Multiply(arg2);
             return ValueCheck(result);
         }
@@ -364,9 +389,14 @@ namespace Tizen.NUI
         /// <param name="arg1">The first value.</param>
         /// <param name="arg2">The second value.</param>
         /// <returns>The color containing the result of the multiplication.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public static Color operator *(Color arg1, float arg2)
         {
+            if (null == arg1)
+            {
+                throw new ArgumentNullException(nameof(arg1));
+            }
             Color result = arg1.Multiply(arg2);
             return ValueCheck(result);
         }
@@ -377,9 +407,14 @@ namespace Tizen.NUI
         /// <param name="arg1">The first value.</param>
         /// <param name="arg2">The second value.</param>
         /// <returns>The color containing the result of the division.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public static Color operator /(Color arg1, Color arg2)
         {
+            if (null == arg1)
+            {
+                throw new ArgumentNullException(nameof(arg1));
+            }
             Color result = arg1.Divide(arg2);
             return ValueCheck(result);
         }
@@ -390,9 +425,14 @@ namespace Tizen.NUI
         /// <param name="arg1">The first value.</param>
         /// <param name="arg2">The second value.</param>
         /// <returns>The color containing the result of the division.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public static Color operator /(Color arg1, float arg2)
         {
+            if (null == arg1)
+            {
+                throw new ArgumentNullException(nameof(arg1));
+            }
             Color result = arg1.Divide(arg2);
             return ValueCheck(result);
         }
@@ -504,6 +544,11 @@ namespace Tizen.NUI
 
         internal static float[] ValueCheck(float[] arr)
         {
+            if (null == arr)
+            {
+                throw new ArgumentNullException(nameof(arr));
+            }
+
             for (int i = 0; i < arr.Length; i++)
             {
                 if (arr[i] < 0.0f)
index a0bb48f..7e2818f 100755 (executable)
@@ -191,7 +191,10 @@ namespace Tizen.NUI
             }
             set
             {
-                NUILog.Debug("TextColor set to " + value.R + "," + value.G + "," + value.B);
+                if (value != null)
+                {
+                    NUILog.Debug("TextColor set to " + value.R + "," + value.G + "," + value.B);
+                }
 
                 _textColor = value;
                 _textField.TextColor = _textColor;
index cbdf7f8..3bd3a77 100755 (executable)
@@ -223,9 +223,15 @@ namespace Tizen.NUI
         /// }
         ///
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when viewType is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public void Register(Func<CustomView> createFunction, System.Type viewType)
         {
+            if (null == viewType)
+            {
+                throw new ArgumentNullException(nameof(viewType));
+            }
+
             // add the mapping between the view name and it's create function
             _constructorMap.Add(viewType.ToString(), createFunction);
 
index 828c09d..90c95d5 100755 (executable)
@@ -97,10 +97,15 @@ namespace Tizen.NUI
         /// Copy other extents
         /// </summary>
         /// <param name="that"></param>
+        /// <exception cref="ArgumentNullException"> Thrown when that is null. </exception>
         /// <since_tizen> Only used by Tizen.NUI.Components, will not be opened </since_tizen>
         [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
         public void CopyFrom(Extents that)
         {
+            if (null == that)
+            {
+                throw new ArgumentNullException(nameof(that));
+            }
             Interop.Extents.Extents_start_set(swigCPtr, that.Start);
             Interop.Extents.Extents_end_set(swigCPtr, that.End);
             Interop.Extents.Extents_top_set(swigCPtr, that.Top);
index d262169..fb07266 100755 (executable)
@@ -106,6 +106,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Gets or sets a size of the window.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public Size2D WindowSize
         {
@@ -120,6 +121,11 @@ namespace Tizen.NUI
             }
             set
             {
+                if (null == value)
+                {
+                    throw new ArgumentNullException(nameof(value));
+                }
+
                 global::System.IntPtr intPtr = Interop.GLWindow.GlWindow_GetPositionSize(swigCPtr);
                 Rectangle val = new Rectangle(intPtr, true);
                 Rectangle ret = new Rectangle(val.X, val.Y, value.Width, value.Height);
@@ -396,9 +402,15 @@ namespace Tizen.NUI
         /// This API is for setting several orientations one time.
         /// </summary>
         /// <param name="orientations">The list of orientations.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when orientations is null. </exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void SetAvailableOrientations(List<GLWindow.GLWindowOrientation> orientations)
         {
+            if (null == orientations)
+            {
+                throw new ArgumentNullException(nameof(orientations));
+            }
+
             PropertyArray orientationArray = new PropertyArray();
             for (int i = 0; i < orientations.Count; i++)
             {
index be726cd..ff1a1d2 100755 (executable)
@@ -41,20 +41,23 @@ namespace Tizen.NUI
         public virtual float ConvertScriptToPixel(string scriptValue)
         {
             float convertedValue = 0;
-            if (scriptValue.EndsWith("dp"))
+            if (scriptValue != null)
             {
-                convertedValue = ConvertToPixel(float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("dp")), CultureInfo.InvariantCulture));
-            }
-            else if (scriptValue.EndsWith("px"))
-            {
-                convertedValue = float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("px")), CultureInfo.InvariantCulture);
-            }
-            else
-            {
-                if (!float.TryParse(scriptValue, NumberStyles.Any, CultureInfo.InvariantCulture, out convertedValue))
+                if (scriptValue.EndsWith("dp"))
+                {
+                    convertedValue = ConvertToPixel(float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("dp")), CultureInfo.InvariantCulture));
+                }
+                else if (scriptValue.EndsWith("px"))
+                {
+                    convertedValue = float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("px")), CultureInfo.InvariantCulture);
+                }
+                else
                 {
-                    NUILog.Error("Cannot convert the script {scriptValue}\n");
-                    convertedValue = 0;
+                    if (!float.TryParse(scriptValue, NumberStyles.Any, CultureInfo.InvariantCulture, out convertedValue))
+                    {
+                        NUILog.Error("Cannot convert the script {scriptValue}\n");
+                        convertedValue = 0;
+                    }
                 }
             }
             return convertedValue;
index 6de37ca..1f98fa4 100755 (executable)
@@ -14,6 +14,7 @@
  * limitations under the License.
  *
  */
+using System;
 using System.ComponentModel;
 
 namespace Tizen.NUI
@@ -36,11 +37,16 @@ namespace Tizen.NUI
         /// <param name="samplingMode">The filtering method used when sampling pixels from the input image while fitting it to desired size.</param>
         /// <param name="orientationCorrection">Reorient the image to respect any orientation metadata in its header.</param>
         /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case loading failed.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static PixelBuffer LoadImageFromFile(string url, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             PixelBuffer ret = new PixelBuffer(Interop.ImageLoading.LoadImageFromFile__SWIG_0(url, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode, orientationCorrection), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -55,11 +61,16 @@ namespace Tizen.NUI
         /// <param name="fittingMode">The method used to fit the shape of the image before loading to the shape defined by the size parameter.</param>
         /// <param name="samplingMode">The filtering method used when sampling pixels from the input image while fitting it to desired size.</param>
         /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case loading failed.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static PixelBuffer LoadImageFromFile(string url, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             PixelBuffer ret = new PixelBuffer(Interop.ImageLoading.LoadImageFromFile__SWIG_1(url, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -73,11 +84,16 @@ namespace Tizen.NUI
         /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
         /// <param name="fittingMode">The method used to fit the shape of the image before loading to the shape defined by the size parameter.</param>
         /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case loading failed.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static PixelBuffer LoadImageFromFile(string url, Size2D size, FittingModeType fittingMode)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             PixelBuffer ret = new PixelBuffer(Interop.ImageLoading.LoadImageFromFile__SWIG_2(url, Uint16Pair.getCPtr(uSize), (int)fittingMode), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -90,11 +106,16 @@ namespace Tizen.NUI
         /// <param name="url">The URL of the image file to load.</param>
         /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
         /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case loading failed.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static PixelBuffer LoadImageFromFile(string url, Size2D size)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             PixelBuffer ret = new PixelBuffer(Interop.ImageLoading.LoadImageFromFile__SWIG_3(url, Uint16Pair.getCPtr(uSize)), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -125,11 +146,16 @@ namespace Tizen.NUI
         /// <param name="samplingMode">The image filter to use if the image needs to be downsampled to the requested size.</param>
         /// <param name="orientationCorrection">Whether to use image metadata to rotate or flip the image, for example, from portrait to landscape.</param>
         /// <returns>Dimensions that image will have if it is loaded with given parameters.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static Size2D GetClosestImageSize(string filename, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             var val = new Uint16Pair(Interop.ImageLoading.GetClosestImageSize__SWIG_0(filename, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode, orientationCorrection), true);
             Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
@@ -145,11 +171,16 @@ namespace Tizen.NUI
         /// <param name="fittingMode">The method to use to map the source image to the desired dimensions.</param>
         /// <param name="samplingMode">The image filter to use if the image needs to be downsampled to the requested size.</param>
         /// <returns>Dimensions that image will have if it is loaded with given parameters.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static Size2D GetClosestImageSize(string filename, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             var val = new Uint16Pair(Interop.ImageLoading.GetClosestImageSize__SWIG_1(filename, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode), true);
             Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
@@ -164,11 +195,16 @@ namespace Tizen.NUI
         /// <param name="size">The requested size for the image</param>
         /// <param name="fittingMode">The method to use to map the source image to the desired dimensions.</param>
         /// <returns>Dimensions that image will have if it is loaded with given parameters.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static Size2D GetClosestImageSize(string filename, Size2D size, FittingModeType fittingMode)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             var val = new Uint16Pair(Interop.ImageLoading.GetClosestImageSize__SWIG_2(filename, Uint16Pair.getCPtr(uSize), (int)fittingMode), true);
             Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
@@ -182,11 +218,16 @@ namespace Tizen.NUI
         /// <param name="filename">The name of the image.</param>
         /// <param name="size">The requested size for the image</param>
         /// <returns>Dimensions that image will have if it is loaded with given parameters.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static Size2D GetClosestImageSize(string filename, Size2D size)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             var val = new Uint16Pair(Interop.ImageLoading.GetClosestImageSize__SWIG_3(filename, Uint16Pair.getCPtr(uSize)), true);
             Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
@@ -235,11 +276,16 @@ namespace Tizen.NUI
         /// <param name="samplingMode">The filtering method used when sampling pixels from the input image while fitting it to desired size.</param>
         /// <param name="orientationCorrection">Reorient the image to respect any orientation metadata in its header.</param>
         /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case downloading or decoding failed.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static PixelBuffer DownloadImageSynchronously(string url, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             PixelBuffer ret = new PixelBuffer(Interop.ImageLoading.DownloadImageSynchronously__SWIG_0(url, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode, orientationCorrection), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -254,11 +300,16 @@ namespace Tizen.NUI
         /// <param name="fittingMode">The method used to fit the shape of the image before loading to the shape defined by the size parameter.</param>
         /// <param name="samplingMode">The filtering method used when sampling pixels from the input image while fitting it to desired size.</param>
         /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case downloading or decoding failed.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static PixelBuffer DownloadImageSynchronously(string url, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             PixelBuffer ret = new PixelBuffer(Interop.ImageLoading.DownloadImageSynchronously__SWIG_1(url, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -272,11 +323,16 @@ namespace Tizen.NUI
         /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
         /// <param name="fittingMode">The method used to fit the shape of the image before loading to the shape defined by the size parameter.</param>
         /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case downloading or decoding failed.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static PixelBuffer DownloadImageSynchronously(string url, Size2D size, FittingModeType fittingMode)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             PixelBuffer ret = new PixelBuffer(Interop.ImageLoading.DownloadImageSynchronously__SWIG_2(url, Uint16Pair.getCPtr(uSize), (int)fittingMode), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -289,11 +345,16 @@ namespace Tizen.NUI
         /// <param name="url">The URL of the image file to load.</param>
         /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
         /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case downloading or decoding failed.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when size is null. </exception>
         /// <since_tizen> 5 </since_tizen>
         /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static PixelBuffer DownloadImageSynchronously(string url, Size2D size)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
             PixelBuffer ret = new PixelBuffer(Interop.ImageLoading.DownloadImageSynchronously__SWIG_3(url, Uint16Pair.getCPtr(uSize)), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
index c6c3029..87c5445 100755 (executable)
@@ -69,6 +69,7 @@ namespace Tizen.NUI
         /// <summary>
         /// OriginalKey property.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
         public object OriginalKey
         {
             get
@@ -77,6 +78,11 @@ namespace Tizen.NUI
             }
             set
             {
+                if (null == value)
+                {
+                    throw new ArgumentNullException(nameof(value));
+                }
+
                 _originalKey = value;
                 if (value is int || value is Int32)
                 {
index 3bda12f..d83222a 100755 (executable)
@@ -263,9 +263,15 @@ namespace Tizen.NUI
         /// </summary>
         /// <seealso cref="Container.Add">
         /// </seealso>
+        /// <exception cref="ArgumentNullException"> Thrown when child is null. </exception>
         /// <since_tizen> 4 </since_tizen>
         public override void Add(View child)
         {
+            if (null == child)
+            {
+                throw new ArgumentNullException(nameof(child));
+            }
+
             Container oldParent = child.GetParent();
 
             if (oldParent != this)
@@ -291,9 +297,15 @@ namespace Tizen.NUI
         /// </summary>
         /// <seealso cref="Container.Remove">
         /// </seealso>
+        /// <exception cref="ArgumentNullException"> Thrown when child is null. </exception>
         /// <since_tizen> 4 </since_tizen>
         public override void Remove(View child)
         {
+            if (null == child)
+            {
+                throw new ArgumentNullException(nameof(child));
+            }
+
             Interop.Actor.ActorRemove(swigCPtr, View.getCPtr(child));
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -344,6 +356,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Downcasts a handle to layer handle.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when handle is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         /// Please do not use! this will be deprecated!
         /// Instead please use as keyword.
@@ -351,6 +364,10 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static Layer DownCast(BaseHandle handle)
         {
+            if (null == handle)
+            {
+                throw new ArgumentNullException(nameof(handle));
+            }
             Layer ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Layer;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index b1502f7..7fccbde 100755 (executable)
@@ -627,9 +627,14 @@ namespace Tizen.NUI
         /// Derived classes can use this to set their own child properties on the child layout's owner.<br />
         /// </summary>
         /// <param name="child">The Layout child.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when child is null. </exception>
         /// <since_tizen> 6 </since_tizen>
         protected override void OnChildAdd(LayoutItem child)
         {
+            if (null == child)
+            {
+                throw new ArgumentNullException(nameof(child));
+            }
             InsertChild(child);
         }
 
index 0a45cab..b5f2db1 100755 (executable)
@@ -48,10 +48,15 @@ namespace Tizen.NUI
         /// <summary>
         /// From ILayoutParent.<br />
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when childLayout is null. </exception>
         /// <since_tizen> 6 </since_tizen>
         /// <param name="childLayout">LayoutItem to add to the layout group.</param>
         public virtual void Add(LayoutItem childLayout)
         {
+            if (null == childLayout)
+            {
+                throw new ArgumentNullException(nameof(childLayout));
+            }
             LayoutChildren.Add(childLayout);
             childLayout.SetParent(this);
             // Child added to use a Add transition.
@@ -300,7 +305,7 @@ namespace Tizen.NUI
                     {
                         if (childDimension.AsRoundedValue() == LayoutParamPolicies.MatchParent)
                         {
-                            // Crashed. Cannot calculate. 
+                            // Crashed. Cannot calculate.
 
                             // Child wants to be our size, but our size is not fixed.
                             // Constrain child to not be bigger than us.
@@ -533,9 +538,15 @@ namespace Tizen.NUI
         /// <param name="child">The child to measure.</param>
         /// <param name="parentWidthMeasureSpec">The width requirements for this view.</param>
         /// <param name="parentHeightMeasureSpec">The height requirements for this view.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when child is null. </exception>
         /// <since_tizen> 6 </since_tizen>
         protected virtual void MeasureChild(LayoutItem child, MeasureSpecification parentWidthMeasureSpec, MeasureSpecification parentHeightMeasureSpec)
         {
+            if (null == child)
+            {
+                throw new ArgumentNullException(nameof(child));
+            }
+
             View childOwner = child.Owner;
 
             MeasureSpecification childWidthMeasureSpec = GetChildMeasureSpecification(
@@ -561,11 +572,16 @@ namespace Tizen.NUI
         /// <param name="widthUsed">Extra space that has been used up by the parent horizontally (possibly by other children of the parent).</param>
         /// <param name="parentHeightMeasureSpec">The height requirements for this view.</param>
         /// <param name="heightUsed">Extra space that has been used up by the parent vertically (possibly by other children of the parent).</param>
+        /// <exception cref="ArgumentNullException"> Thrown when child is null. </exception>
         /// <since_tizen> 6 </since_tizen>
         protected virtual void MeasureChildWithMargins(LayoutItem child, MeasureSpecification parentWidthMeasureSpec, LayoutLength widthUsed, MeasureSpecification parentHeightMeasureSpec, LayoutLength heightUsed)
         {
-            View childOwner = child.Owner;
+            if (null == child)
+            {
+                throw new ArgumentNullException(nameof(child));
+            }
 
+            View childOwner = child.Owner;
 
             MeasureSpecification childWidthMeasureSpec = GetChildMeasureSpecification(
                         new MeasureSpecification(
index 318acfb..690d412 100755 (executable)
@@ -43,9 +43,12 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public NUIComponentApplication(IDictionary<Type, string> typeInfo) : base(new NUIComponentCoreBackend())
         {
-            foreach (var component in typeInfo)
+            if (typeInfo != null)
             {
-                RegisterComponent(component.Key, component.Value);
+                foreach (var component in typeInfo)
+                {
+                    RegisterComponent(component.Key, component.Value);
+                }
             }
             (Backend as NUIComponentCoreBackend).ComponentFactories = _componentFactories;
         }
index f6473fd..eaeca2e 100755 (executable)
@@ -679,7 +679,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position operator +(Position arg1, Position arg2)
         {
-            return arg1.Add(arg2);
+            return arg1?.Add(arg2);
         }
 
         /// <summary>
@@ -691,7 +691,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position operator -(Position arg1, Position arg2)
         {
-            return arg1.Subtract(arg2);
+            return arg1?.Subtract(arg2);
         }
 
         /// <summary>
@@ -702,7 +702,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position operator -(Position arg1)
         {
-            return arg1.Subtract();
+            return arg1?.Subtract();
         }
 
         /// <summary>
@@ -714,7 +714,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position operator *(Position arg1, Position arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -726,7 +726,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position operator *(Position arg1, float arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -738,7 +738,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position operator /(Position arg1, Position arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -750,7 +750,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position operator /(Position arg1, float arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -759,7 +759,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator Vector3(Position Position)
         {
-            return new Vector3(Position.X, Position.Y, Position.Z);
+            return new Vector3((float)Position?.X, (float)Position.Y, (float)Position.Z);
         }
 
         /// <summary>
@@ -768,7 +768,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator Position(Vector3 vec)
         {
-            return new Position(vec.X, vec.Y, vec.Z);
+            return new Position((float)vec?.X, (float)vec.Y, (float)vec.Z);
         }
 
         /// <summary>
@@ -780,7 +780,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static implicit operator Position(Position2D position2d)
         {
-            return new Position(position2d.X, position2d.Y, 0);
+            return new Position((float)position2d?.X, (float)position2d.Y, 0);
         }
 
         /// <summary>
index e94aa7b..9abbc87 100755 (executable)
@@ -183,7 +183,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position2D operator +(Position2D arg1, Position2D arg2)
         {
-            return arg1.Add(arg2);
+            return arg1?.Add(arg2);
         }
 
         /// <summary>
@@ -195,7 +195,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position2D operator -(Position2D arg1, Position2D arg2)
         {
-            return arg1.Subtract(arg2);
+            return arg1?.Subtract(arg2);
         }
 
         /// <summary>
@@ -206,7 +206,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position2D operator -(Position2D arg1)
         {
-            return arg1.Subtract();
+            return arg1?.Subtract();
         }
 
         /// <summary>
@@ -218,7 +218,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position2D operator *(Position2D arg1, Position2D arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -230,7 +230,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position2D operator *(Position2D arg1, int arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -242,7 +242,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position2D operator /(Position2D arg1, Position2D arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -254,7 +254,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Position2D operator /(Position2D arg1, int arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -317,7 +317,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator Vector2(Position2D position2d)
         {
-            return new Vector2((float)position2d.X, (float)position2d.Y);
+            return new Vector2((float)position2d?.X, (float)position2d.Y);
         }
 
         /// <summary>
@@ -328,7 +328,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator Position2D(Vector2 vec)
         {
-            return new Position2D((int)vec.X, (int)vec.Y);
+            return new Position2D((int)vec?.X, (int)vec.Y);
         }
 
         /// <summary>
@@ -340,7 +340,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static implicit operator Position2D(Position position)
         {
-            return new Position2D((int)position.X, (int)position.Y);
+            return new Position2D((int)position?.X, (int)position.Y);
         }
 
         /// <inheritdoc/>
index 0edb133..3bad805 100755 (executable)
@@ -153,8 +153,13 @@ namespace Tizen.NUI
         /// This function should be first
         /// </summary>
         /// <param name="value">The value to add at the end of the array.</param>
+        /// <exception cref="global::System.ArgumentNullException"> Thrown when value is null. </exception>
         public PropertyArray Add(KeyValue value)
         {
+            if (null == value)
+            {
+                throw new global::System.ArgumentNullException(nameof(value));
+            }
             PropertyArray ret = new PropertyArray(Interop.Property.Property_Array_Add(swigCPtr, PropertyValue.getCPtr(value.TrueValue)), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index a34f4b7..f6a9eed 100755 (executable)
@@ -172,8 +172,13 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="keyValue">The keyvalue to insert.</param>
         /// <returns>Returns a reference to this object.</returns>
+        /// <exception cref="global::System.ArgumentNullException"> Thrown when keyValue is null. </exception>
         public PropertyMap Add(KeyValue keyValue)
         {
+            if (null == keyValue)
+            {
+                throw new global::System.ArgumentNullException(nameof(keyValue));
+            }
             if (keyValue.KeyInt != null)
             {
                 Interop.PropertyMap.Property_Map_Add__SWIG_2(swigCPtr, (int)keyValue.KeyInt, PropertyValue.getCPtr(keyValue.TrueValue));
index e61e33a..c9612ae 100755 (executable)
@@ -144,9 +144,14 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="handle">Handle to an object of BaseHandle type.</param>
         /// <returns>Handle to an object of the PropertyNotification type.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when handle is null. </exception>
         /// <since_tizen> 4 </since_tizen>
         public static PropertyNotification DownCast(BaseHandle handle)
         {
+            if (null == handle)
+            {
+                throw new ArgumentNullException(nameof(handle));
+            }
             PropertyNotification ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PropertyNotification;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index b0ea75d..cc6ff7a 100755 (executable)
@@ -249,11 +249,16 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="obj">An object to create.</param>
         /// <returns>The created value.</returns>
+        /// <exception cref="global::System.ArgumentNullException"> Thrown when obj is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         static public PropertyValue CreateFromObject(System.Object obj)
         {
-            System.Type type = obj.GetType();
+            if (null == obj)
+            {
+                throw new global::System.ArgumentNullException(nameof(obj));
+            }
 
+            System.Type type = obj.GetType();
             PropertyValue value;
             if (type.IsEnum)
             {
index 14bae45..fe6a5db 100755 (executable)
@@ -131,7 +131,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector2 operator +(RelativeVector2 arg1, RelativeVector2 arg2)
         {
-            RelativeVector2 result = arg1.Add(arg2);
+            RelativeVector2 result = arg1?.Add(arg2);
             return result;
         }
 
@@ -144,7 +144,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector2 operator -(RelativeVector2 arg1, RelativeVector2 arg2)
         {
-            RelativeVector2 result = arg1.Subtract(arg2);
+            RelativeVector2 result = arg1?.Subtract(arg2);
             return result;
         }
 
@@ -157,7 +157,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector2 operator *(RelativeVector2 arg1, RelativeVector2 arg2)
         {
-            RelativeVector2 result = arg1.Multiply(arg2);
+            RelativeVector2 result = arg1?.Multiply(arg2);
             return result;
         }
 
@@ -170,7 +170,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector2 operator *(RelativeVector2 arg1, float arg2)
         {
-            RelativeVector2 result = arg1.Multiply(arg2);
+            RelativeVector2 result = arg1?.Multiply(arg2);
             return result;
         }
 
@@ -183,7 +183,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector2 operator /(RelativeVector2 arg1, RelativeVector2 arg2)
         {
-            RelativeVector2 result = arg1.Divide(arg2);
+            RelativeVector2 result = arg1?.Divide(arg2);
             return result;
         }
 
@@ -196,7 +196,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector2 operator /(RelativeVector2 arg1, float arg2)
         {
-            RelativeVector2 result = arg1.Divide(arg2);
+            RelativeVector2 result = arg1?.Divide(arg2);
             return result;
         }
 
@@ -205,7 +205,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator Vector2(RelativeVector2 relativeVector2)
         {
-            return new Vector2(relativeVector2.X, relativeVector2.Y);
+            return new Vector2((float)relativeVector2?.X, (float)relativeVector2.Y);
         }
 
         /// <summary>
@@ -213,7 +213,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator RelativeVector2(Vector2 vec)
         {
-            return new RelativeVector2(vec.X, vec.Y);
+            return new RelativeVector2((float)vec?.X, (float)vec.Y);
         }
 
         /// <summary>
index f0db2d2..1a01567 100755 (executable)
@@ -145,7 +145,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector3 operator +(RelativeVector3 arg1, RelativeVector3 arg2)
         {
-            RelativeVector3 result = arg1.Add(arg2);
+            RelativeVector3 result = arg1?.Add(arg2);
             return result;
         }
 
@@ -158,7 +158,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector3 operator -(RelativeVector3 arg1, RelativeVector3 arg2)
         {
-            RelativeVector3 result = arg1.Subtract(arg2);
+            RelativeVector3 result = arg1?.Subtract(arg2);
             return result;
         }
 
@@ -171,7 +171,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector3 operator *(RelativeVector3 arg1, RelativeVector3 arg2)
         {
-            RelativeVector3 result = arg1.Multiply(arg2);
+            RelativeVector3 result = arg1?.Multiply(arg2);
             return result;
         }
 
@@ -184,7 +184,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector3 operator *(RelativeVector3 arg1, float arg2)
         {
-            RelativeVector3 result = arg1.Multiply(arg2);
+            RelativeVector3 result = arg1?.Multiply(arg2);
             return result;
         }
 
@@ -197,7 +197,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector3 operator /(RelativeVector3 arg1, RelativeVector3 arg2)
         {
-            RelativeVector3 result = arg1.Divide(arg2);
+            RelativeVector3 result = arg1?.Divide(arg2);
             return result;
         }
 
@@ -210,7 +210,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector3 operator /(RelativeVector3 arg1, float arg2)
         {
-            RelativeVector3 result = arg1.Divide(arg2);
+            RelativeVector3 result = arg1?.Divide(arg2);
             return result;
         }
 
index 2662d40..1decc2e 100755 (executable)
@@ -184,7 +184,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector4 operator +(RelativeVector4 arg1, RelativeVector4 arg2)
         {
-            RelativeVector4 result = arg1.Add(arg2);
+            RelativeVector4 result = arg1?.Add(arg2);
             return result;
         }
 
@@ -197,7 +197,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector4 operator -(RelativeVector4 arg1, RelativeVector4 arg2)
         {
-            RelativeVector4 result = arg1.Subtract(arg2);
+            RelativeVector4 result = arg1?.Subtract(arg2);
             return result;
         }
 
@@ -210,7 +210,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector4 operator *(RelativeVector4 arg1, RelativeVector4 arg2)
         {
-            RelativeVector4 result = arg1.Multiply(arg2);
+            RelativeVector4 result = arg1?.Multiply(arg2);
             return result;
         }
 
@@ -223,7 +223,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector4 operator *(RelativeVector4 arg1, float arg2)
         {
-            RelativeVector4 result = arg1.Multiply(arg2);
+            RelativeVector4 result = arg1?.Multiply(arg2);
             return result;
         }
 
@@ -236,7 +236,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector4 operator /(RelativeVector4 arg1, RelativeVector4 arg2)
         {
-            RelativeVector4 result = arg1.Divide(arg2);
+            RelativeVector4 result = arg1?.Divide(arg2);
             return result;
         }
 
@@ -249,7 +249,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static RelativeVector4 operator /(RelativeVector4 arg1, float arg2)
         {
-            RelativeVector4 result = arg1.Divide(arg2);
+            RelativeVector4 result = arg1?.Divide(arg2);
             return result;
         }
 
@@ -258,7 +258,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator Vector4(RelativeVector4 relativeVector4)
         {
-            return new Vector4(relativeVector4.X, relativeVector4.Y, relativeVector4.Z, relativeVector4.W);
+            return new Vector4((float)relativeVector4?.X, (float)relativeVector4.Y, (float)relativeVector4.Z, (float)relativeVector4.W);
         }
 
         /// <summary>
@@ -266,7 +266,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator RelativeVector4(Vector4 vec)
         {
-            return new RelativeVector4(vec.X, vec.Y, vec.Z, vec.W);
+            return new RelativeVector4((float)vec?.X, (float)vec.Y, (float)vec.Z, (float)vec.W);
         }
 
         /// <summary>
index 67c03e9..3943291 100755 (executable)
@@ -71,7 +71,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Rotation operator +(Rotation arg1, Rotation arg2)
         {
-            return arg1.Add(arg2);
+            return arg1?.Add(arg2);
         }
 
         /// <summary>
@@ -83,7 +83,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Rotation operator -(Rotation arg1, Rotation arg2)
         {
-            return arg1.Subtract(arg2);
+            return arg1?.Subtract(arg2);
         }
 
         /// <summary>
@@ -94,7 +94,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Rotation operator -(Rotation arg1)
         {
-            return arg1.Subtract();
+            return arg1?.Subtract();
         }
 
         /// <summary>
@@ -106,7 +106,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Rotation operator *(Rotation arg1, Rotation arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -118,7 +118,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector3 operator *(Rotation arg1, Vector3 arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -130,7 +130,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Rotation operator *(Rotation arg1, float arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -142,7 +142,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Rotation operator /(Rotation arg1, Rotation arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -154,7 +154,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Rotation operator /(Rotation arg1, float arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
index 8ae5a7d..f65e33c 100755 (executable)
@@ -172,7 +172,7 @@ namespace Tizen.NUI
         /// <since_tizen> 5 </since_tizen>
         public static Size operator +(Size arg1, Size arg2)
         {
-            return arg1.Add(arg2);
+            return arg1?.Add(arg2);
         }
 
         /// <summary>
@@ -184,7 +184,7 @@ namespace Tizen.NUI
         /// <since_tizen> 5 </since_tizen>
         public static Size operator -(Size arg1, Size arg2)
         {
-            return arg1.Subtract(arg2);
+            return arg1?.Subtract(arg2);
         }
 
         /// <summary>
@@ -195,7 +195,7 @@ namespace Tizen.NUI
         /// <since_tizen> 5 </since_tizen>
         public static Size operator -(Size arg1)
         {
-            return arg1.Subtract();
+            return arg1?.Subtract();
         }
 
         /// <summary>
@@ -207,7 +207,7 @@ namespace Tizen.NUI
         /// <since_tizen> 5 </since_tizen>
         public static Size operator *(Size arg1, Size arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -219,7 +219,7 @@ namespace Tizen.NUI
         /// <since_tizen> 5 </since_tizen>
         public static Size operator *(Size arg1, float arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -231,7 +231,7 @@ namespace Tizen.NUI
         /// <since_tizen> 5 </since_tizen>
         public static Size operator /(Size arg1, Size arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -243,7 +243,7 @@ namespace Tizen.NUI
         /// <since_tizen> 5 </since_tizen>
         public static Size operator /(Size arg1, float arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -325,7 +325,7 @@ namespace Tizen.NUI
         /// <since_tizen> 5 </since_tizen>
         public static implicit operator Vector3(Size size)
         {
-            return new Vector3(size.Width, size.Height, size.Depth);
+            return new Vector3((float)size?.Width, (float)size.Height, (float)size.Depth);
         }
 
         /// <summary>
@@ -335,7 +335,7 @@ namespace Tizen.NUI
         /// <since_tizen> 5 </since_tizen>
         public static implicit operator Size(Vector3 vec)
         {
-            return new Size(vec.Width, vec.Height, vec.Depth);
+            return new Size((int)vec?.Width, (int)vec.Height, (int)vec.Depth);
         }
 
         /// <summary>
@@ -347,7 +347,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static implicit operator Size(Size2D size2d)
         {
-            return new Size(size2d.Width, size2d.Height, 0);
+            return new Size((int)size2d?.Width, (int)size2d.Height, 0);
         }
 
 
index 818a625..075b066 100755 (executable)
@@ -126,7 +126,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Size2D operator +(Size2D arg1, Size2D arg2)
         {
-            return arg1.Add(arg2);
+            return arg1?.Add(arg2);
         }
 
         /// <summary>
@@ -138,7 +138,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Size2D operator -(Size2D arg1, Size2D arg2)
         {
-            return arg1.Subtract(arg2);
+            return arg1?.Subtract(arg2);
         }
 
         /// <summary>
@@ -149,7 +149,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Size2D operator -(Size2D arg1)
         {
-            return arg1.Subtract();
+            return arg1?.Subtract();
         }
 
         /// <summary>
@@ -161,7 +161,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Size2D operator *(Size2D arg1, Size2D arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -174,7 +174,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Size2D operator *(Size2D arg1, int arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -186,7 +186,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Size2D operator /(Size2D arg1, Size2D arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -198,7 +198,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Size2D operator /(Size2D arg1, int arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -209,7 +209,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator Vector2(Size2D size)
         {
-            return new Vector2((float)size.Width, (float)size.Height);
+            return new Vector2((float)size?.Width, (float)size.Height);
         }
 
         /// <summary>
@@ -220,7 +220,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static implicit operator Size2D(Vector2 vector2)
         {
-            return new Size2D((int)vector2.X, (int)vector2.Y);
+            return new Size2D((int)vector2?.X, (int)vector2.Y);
         }
 
         /// <summary>
@@ -232,7 +232,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static implicit operator Size2D(Size size)
         {
-            return new Size2D((int)size.Width, (int)size.Height);
+            return new Size2D((int)size?.Width, (int)size.Height);
         }
 
 
index a997e18..d959eca 100755 (executable)
@@ -737,12 +737,17 @@ namespace Tizen.NUI.UIComponents
         /// </summary>
         /// <param name="handle">The handle to an object.</param>
         /// <returns>The handle to a slider or an uninitialized handle.</returns>
+        /// <exception cref="ArgumentNullException"> Thrown when handle is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         /// This will be deprecated
         [Obsolete("Deprecated in API6; Will be removed in API9. Please use Tizen.NUI.Components")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static Slider DownCast(BaseHandle handle)
         {
+            if (null == handle)
+            {
+                throw new ArgumentNullException(nameof(handle));
+            }
             Slider ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Slider;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index 931f582..0c7e850 100755 (executable)
@@ -64,7 +64,7 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="other">The copy target.</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public Vector2(Vector2 other) : this(other.X, other.Y)
+        public Vector2(Vector2 other) : this((float)other?.X, (float)other.Y)
         {
         }
 
@@ -314,7 +314,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector2 operator +(Vector2 arg1, Vector2 arg2)
         {
-            return arg1.Add(arg2);
+            return arg1?.Add(arg2);
         }
 
         /// <summary>
@@ -326,7 +326,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector2 operator -(Vector2 arg1, Vector2 arg2)
         {
-            return arg1.Subtract(arg2);
+            return arg1?.Subtract(arg2);
         }
 
         /// <summary>
@@ -337,7 +337,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector2 operator -(Vector2 arg1)
         {
-            return arg1.Subtract();
+            return arg1?.Subtract();
         }
 
         /// <summary>
@@ -349,7 +349,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector2 operator *(Vector2 arg1, Vector2 arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -361,7 +361,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector2 operator *(Vector2 arg1, float arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -373,7 +373,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector2 operator /(Vector2 arg1, Vector2 arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -385,7 +385,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector2 operator /(Vector2 arg1, float arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
index 379987e..49059ea 100755 (executable)
@@ -450,7 +450,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector3 operator +(Vector3 arg1, Vector3 arg2)
         {
-            return arg1.Add(arg2);
+            return arg1?.Add(arg2);
         }
 
         /// <summary>
@@ -462,7 +462,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector3 operator -(Vector3 arg1, Vector3 arg2)
         {
-            return arg1.Subtract(arg2);
+            return arg1?.Subtract(arg2);
         }
 
         /// <summary>
@@ -473,7 +473,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector3 operator -(Vector3 arg1)
         {
-            return arg1.Subtract();
+            return arg1?.Subtract();
         }
 
         /// <summary>
@@ -485,7 +485,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector3 operator *(Vector3 arg1, Vector3 arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -497,7 +497,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector3 operator *(Vector3 arg1, float arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -509,7 +509,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector3 operator /(Vector3 arg1, Vector3 arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -521,7 +521,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector3 operator /(Vector3 arg1, float arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
index 49e0480..f53896f 100755 (executable)
@@ -480,7 +480,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector4 operator +(Vector4 arg1, Vector4 arg2)
         {
-            return arg1.Add(arg2);
+            return arg1?.Add(arg2);
         }
 
         /// <summary>
@@ -492,7 +492,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector4 operator -(Vector4 arg1, Vector4 arg2)
         {
-            return arg1.Subtract(arg2);
+            return arg1?.Subtract(arg2);
         }
 
         /// <summary>
@@ -503,7 +503,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector4 operator -(Vector4 arg1)
         {
-            return arg1.Subtract();
+            return arg1?.Subtract();
         }
 
         /// <summary>
@@ -515,7 +515,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector4 operator *(Vector4 arg1, Vector4 arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -527,7 +527,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector4 operator *(Vector4 arg1, float arg2)
         {
-            return arg1.Multiply(arg2);
+            return arg1?.Multiply(arg2);
         }
 
         /// <summary>
@@ -539,7 +539,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector4 operator /(Vector4 arg1, Vector4 arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
@@ -551,7 +551,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public static Vector4 operator /(Vector4 arg1, float arg2)
         {
-            return arg1.Divide(arg2);
+            return arg1?.Divide(arg2);
         }
 
         /// <summary>
index 23aea02..b1d7bad 100755 (executable)
@@ -49,10 +49,16 @@ namespace Tizen.NUI
         /// This function expects an array of structures with the same format that was given in the construction.
         /// </summary>
         /// <param name="vertices">The vertex data that will be copied to the buffer.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when vertices is null. </exception>
         /// <since_tizen> 8 </since_tizen>
 
         public void SetData<VertexType>(VertexType[] vertices) where VertexType : struct
         {
+            if (null == vertices)
+            {
+                throw new ArgumentNullException(nameof(vertices));
+            }
+
             int structSize = Marshal.SizeOf<VertexType>();
             global::System.IntPtr buffer = Marshal.AllocHGlobal(structSize * vertices.Length);
 
index 036b3cf..eab37dc 100644 (file)
@@ -52,7 +52,7 @@ namespace Tizen.NUI
         /// Constructor
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public ImageShadow(ImageShadow other) : this(other.Url, other.Border, other.Offset, other.Extents)
+        public ImageShadow(ImageShadow other) : this(other?.Url, other.Border, other.Offset, other.Extents)
         {
         }
 
index 33fb725..be4c30e 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.NUI
         /// Copy constructor.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public Shadow(Shadow other) : this(other.BlurRadius, other.Offset, other.Color, other.Extents)
+        public Shadow(Shadow other) : this((float)other?.BlurRadius, other.Offset, other.Color, other.Extents)
         {
         }
 
index 4bd1b6a..ee9a8fa 100755 (executable)
@@ -80,7 +80,7 @@ namespace Tizen.NUI
         /// Copy Constructor
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        protected ShadowBase(ShadowBase other) : this(other.Offset, other.Extents)
+        protected ShadowBase(ShadowBase other) : this(other?.Offset, other.Extents)
         {
         }
 
index 90d9617..6617172 100755 (executable)
@@ -30,7 +30,7 @@ namespace Tizen.NUI
         /// Creates a new widgetView manager object.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        public WidgetViewManager(NUIApplication nuiApplication, string appId) : this(Interop.WidgetViewManager.WidgetViewManager_New(Application.getCPtr(nuiApplication.ApplicationHandle), appId), true)
+        public WidgetViewManager(NUIApplication nuiApplication, string appId) : this(Interop.WidgetViewManager.WidgetViewManager_New(Application.getCPtr(nuiApplication?.ApplicationHandle), appId), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
index 793e97a..4d7f319 100755 (executable)
@@ -326,6 +326,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Gets or sets a size of the window.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
         /// <since_tizen> 4 </since_tizen>
         public Size2D WindowSize
         {
@@ -342,6 +343,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Gets or sets a position of the window.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
         /// <since_tizen> 4 </since_tizen>
         public Position2D WindowPosition
         {
@@ -753,7 +755,10 @@ namespace Tizen.NUI
             Interop.Actor.ActorAdd(Layer.getCPtr(GetRootLayer()), View.getCPtr(view));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             this.GetRootLayer().AddViewToLayerList(view); // Maintain the children list in the Layer
-            view.InternalParent = this.GetRootLayer();
+            if (null != view)
+            {
+                view.InternalParent = this.GetRootLayer();
+            }
         }
 
         /// <summary>
@@ -765,7 +770,10 @@ namespace Tizen.NUI
         {
             Interop.Actor.ActorRemove(Layer.getCPtr(GetRootLayer()), View.getCPtr(view));
             this.GetRootLayer().RemoveViewFromLayerList(view); // Maintain the children list in the Layer
-            view.InternalParent = null;
+            if (null != view)
+            {
+                view.InternalParent = null;
+            }
         }
 
         /// <summary>
@@ -900,6 +908,7 @@ namespace Tizen.NUI
         /// Adds a layer to the stage.
         /// </summary>
         /// <param name="layer">Layer to add.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when layer is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public void AddLayer(Layer layer)
         {
@@ -910,6 +919,7 @@ namespace Tizen.NUI
         /// Removes a layer from the stage.
         /// </summary>
         /// <param name="layer">Layer to remove.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when layer is null. </exception>
         /// <since_tizen> 3 </since_tizen>
         public void RemoveLayer(Layer layer)
         {
@@ -1097,9 +1107,12 @@ namespace Tizen.NUI
         public void SetAvailableOrientations(List<Window.WindowOrientation> orientations)
         {
             PropertyArray orientationArray = new PropertyArray();
-            for (int i = 0; i < orientations.Count; i++)
+            if (null != orientations)
             {
-                orientationArray.PushBack(new PropertyValue((int)orientations[i]));
+                for (int i = 0; i < orientations.Count; i++)
+                {
+                    orientationArray.PushBack(new PropertyValue((int)orientations[i]));
+                }
             }
 
             Interop.Window.Window_SetAvailableOrientations(swigCPtr, PropertyArray.getCPtr(orientationArray));
@@ -1127,6 +1140,10 @@ namespace Tizen.NUI
 
         internal void Add(Layer layer)
         {
+            if (null == layer)
+            {
+                throw new ArgumentNullException(nameof(layer));
+            }
             Interop.Window.Add(swigCPtr, Layer.getCPtr(layer));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
@@ -1136,6 +1153,10 @@ namespace Tizen.NUI
 
         internal void Remove(Layer layer)
         {
+            if (null == layer)
+            {
+                throw new ArgumentNullException(nameof(layer));
+            }
             Interop.Window.Remove(swigCPtr, Layer.getCPtr(layer));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
@@ -1228,6 +1249,10 @@ namespace Tizen.NUI
 
         internal void SetWindowSize(Size2D size)
         {
+            if (null == size)
+            {
+                throw new ArgumentNullException(nameof(size));
+            }
             var val = new Uint16Pair((uint)size.Width, (uint)size.Height);
             Interop.Window.SetSize(swigCPtr, Uint16Pair.getCPtr(val));
 
@@ -1247,6 +1272,10 @@ namespace Tizen.NUI
 
         internal void SetPosition(Position2D position)
         {
+            if (null == position)
+            {
+                throw new ArgumentNullException(nameof(position));
+            }
             var val = new Uint16Pair((uint)position.X, (uint)position.Y);
             Interop.Window.SetPosition(swigCPtr, Uint16Pair.getCPtr(val));
 
index b7d5b27..4e33927 100755 (executable)
@@ -209,6 +209,7 @@ namespace Tizen.NUI.Binding
         /// </summary>
         /// <param name="property">The BindableProperty on which to assign a value.</param>
         /// <param name="value">The value to set.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when property is null. </exception>
         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void SetValue(BindableProperty property, object value)
@@ -219,6 +220,10 @@ namespace Tizen.NUI.Binding
             }
             else
             {
+                if (null == property)
+                {
+                    throw new ArgumentNullException(nameof(property));
+                }
                 property.PropertyChanged?.Invoke(this, null, value);
 
                 OnPropertyChanged(property.PropertyName);
@@ -264,9 +269,15 @@ namespace Tizen.NUI.Binding
         /// </summary>
         /// <param name="bindable">The object on which to set the inherited binding context.</param>
         /// <param name="value">The inherited context to set.</param>
+        /// <exception cref="ArgumentNullException"> Thrown when bindable is null. </exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static void SetInheritedBindingContext(BindableObject bindable, object value)
         {
+            if (null == bindable)
+            {
+                throw new ArgumentNullException(nameof(bindable));
+            }
+
             BindablePropertyContext bpContext = bindable.GetContext(BindingContextProperty);
             if (bpContext != null && ((bpContext.Attributes & BindableContextAttributes.IsManuallySet) != 0))
                 return;
index 8860292..8a738c2 100755 (executable)
@@ -140,8 +140,12 @@ namespace Tizen.NUI.Binding
         [EditorBrowsable(EditorBrowsableState.Never)]
         public override string ConvertToString(object value)
         {
-            Color color = (Color)value;
-            return color.R.ToString() + " " + color.G.ToString() + " " + color.B.ToString() + " " + color.A.ToString();
+            if (value != null)
+            {
+                Color color = (Color)value;
+                return color.R.ToString() + " " + color.G.ToString() + " " + color.B.ToString() + " " + color.A.ToString();
+            }
+            return "";
         }
     }
 }
index 2aa496c..3184e3d 100755 (executable)
@@ -336,10 +336,16 @@ namespace Tizen.NUI.Binding
         /// Invoked whenever the ChildAdded event needs to be emitted.Implement this method to add class handling for this event.
         /// </summary>
         /// <param name="child">The element that was added.</param>
-        /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+        /// <exception cref="ArgumentNullException"> Thrown when child is null. </exception>
+        /// This will be public opened later after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected virtual void OnChildAdded(Element child)
         {
+            if (child == null)
+            {
+                throw new ArgumentNullException(nameof(child));
+            }
+
             child.Parent = this;
 
             child.ApplyBindings(skipBindingContext: false, fromBindingContextChanged: true);
@@ -355,10 +361,16 @@ namespace Tizen.NUI.Binding
         /// Invoked whenever the ChildRemoved event needs to be emitted.Implement this method to add class handling for this event.
         /// </summary>
         /// <param name="child">The element that was removed.</param>
-        /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+        /// <exception cref="ArgumentNullException"> Thrown when child is null. </exception>
+        /// This will be public opened later after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected virtual void OnChildRemoved(Element child)
         {
+            if (child == null)
+            {
+                throw new ArgumentNullException(nameof(child));
+            }
+
             child.Parent = null;
 
             ChildRemoved?.Invoke(child, new ElementEventArgs(child));
index 69ef3f3..ae81b77 100755 (executable)
@@ -54,13 +54,18 @@ namespace Tizen.NUI.Binding.Internals
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static INameScope GetNameScope(BindableObject bindable)
         {
-            return (INameScope)bindable.GetValue(NameScopeProperty);
+            return (INameScope)bindable?.GetValue(NameScopeProperty);
         }
 
+        /// <exception cref="ArgumentNullException"> Thrown when bindable is null. </exception>
         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static void SetNameScope(BindableObject bindable, INameScope value)
         {
+            if (null == bindable)
+            {
+                throw new ArgumentNullException(nameof(bindable));
+            }
             bindable.SetValue(NameScopeProperty, value);
         }
     }
index 007a392..5136a3c 100755 (executable)
@@ -43,8 +43,12 @@ namespace Tizen.NUI.Binding
         [EditorBrowsable(EditorBrowsableState.Never)]
         public override string ConvertToString(object value)
         {
-            Size size = (Size)value;
-            return size.Width.ToString() + " " + size.Height.ToString() + " " + size.Depth.ToString();
+            if (value != null)
+            {
+                Size size = (Size)value;
+                return size.Width.ToString() + " " + size.Height.ToString() + " " + size.Depth.ToString();
+            }
+            return "";
         }
     }
 
@@ -75,8 +79,12 @@ namespace Tizen.NUI.Binding
         [EditorBrowsable(EditorBrowsableState.Never)]
         public override string ConvertToString(object value)
         {
-            Size2D size = (Size2D)value;
-            return size.Width.ToString() + " " + size.Height.ToString();
+            if (value != null)
+            {
+                Size2D size = (Size2D)value;
+                return size.Width.ToString() + " " + size.Height.ToString();
+            }
+            return "";
         }
     }
 }
index 9dc577e..603e70e 100755 (executable)
@@ -149,7 +149,7 @@ namespace Tizen.NUI
             AnimationBehavior behavior = null;
             behaviors.TryGetValue(behaviorKey, out behavior);
 
-            if (null != behavior)
+            if (null != instance && null != behavior)
             {
                 var elementType = instance.GetType();
                 PropertyInfo propertyInfo = elementType.GetProperties().FirstOrDefault(fi => fi.Name == behavior.Property);
@@ -185,7 +185,7 @@ namespace Tizen.NUI
             AnimationBehavior behavior = null;
             behaviors.TryGetValue(behaviorKey, out behavior);
 
-            if (null != behavior)
+            if (null != instance && null != behavior)
             {
                 var elementType = instance.GetType();
                 PropertyInfo propertyInfo = elementType.GetProperties().FirstOrDefault(fi => fi.Name == behavior.Property);