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;
collectionRef = collection;
currentIndex = -1;
currentObject = null;
- currentSize = collectionRef.Count;
+ currentSize = collectionRef?.Count ?? 0;
}
// Type-safe iterator Current
collectionRef = collection;
currentIndex = -1;
currentObject = null;
- currentSize = collectionRef.Count;
+ currentSize = collectionRef?.Count ?? 0;
}
// Type-safe iterator Current
[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;
/// </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;
/// <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);
/// <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);
/// <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);
/// 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)
{
/// <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);
/// <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;
/// <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>
[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;
/// 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!");
}
/// <summary>
- /// Sets or gets the loop count.
+ /// Sets or gets the loop count.
/// </summary>
/// <remarks>
/// The minus value means the infinite loop count.
}
/// <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>
/// <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>
return true;
}
+ if (null == state)
+ {
+ throw new ArgumentNullException(nameof(state));
+ }
if (state.IsCombined)
{
index = ((List<StateValuePair<T>>)StateValueList).FindIndex(x => state.Contains(x.State));
/// <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();
/// <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;
/// <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;
[EditorBrowsable(EditorBrowsableState.Never)]
public void Reset(View view)
{
- view.ControlStateChangeEventInternal -= OnViewControlState;
+ if (view != null)
+ {
+ view.ControlStateChangeEventInternal -= OnViewControlState;
+ }
selector?.Clear();
selector = null;
dirty = false;
/// </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.
[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;
}
/// <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>
}
set
{
+ if (value == null)
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
if (_layout != null)
{
// Note: it only works if minimum size is >= than natural size.
///<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>
{
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);
/// 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:
default:
break;
}
-
return false;
}
/// <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);
/// </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)
{
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;
/// <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())
/// <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())
/// <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)
/// 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");
}
{
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)
{
/// <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");
}
{
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)
{
/// 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");
}
{
throw new ArgumentNullException("path should not be null");
}
+ else if (null == color)
+ {
+ throw new ArgumentNullException(nameof(color));
+ }
if (source is View || source is Layer)
{
/// <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");
}
/// 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)]
{
try
{
+ if (null == hexColor)
+ {
+ throw new ArgumentNullException(nameof(hexColor));
+ }
hexColor = hexColor.Replace("#", "");
R = ((float)Convert.ToInt32(hexColor.Substring(0, 2), 16)) / 255.0f;
/// </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)
{
}
/// <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>
/// <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>
/// <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);
}
/// <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);
}
/// </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);
}
/// <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);
}
/// <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);
}
/// <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);
}
/// <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);
}
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)
}
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;
/// }
///
/// </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);
/// 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);
/// <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
{
}
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);
/// 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++)
{
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;
* limitations under the License.
*
*/
+using System;
using System.ComponentModel;
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();
/// <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();
/// <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();
/// <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();
/// <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());
/// <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());
/// <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());
/// <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());
/// <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();
/// <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();
/// <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();
/// <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();
/// <summary>
/// OriginalKey property.
/// </summary>
+ /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
public object OriginalKey
{
get
}
set
{
+ if (null == value)
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
+
_originalKey = value;
if (value is int || value is Int32)
{
/// </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)
/// </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();
/// <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.
[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;
/// 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);
}
/// <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.
{
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.
/// <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(
/// <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(
[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;
}
/// <since_tizen> 3 </since_tizen>
public static Position operator +(Position arg1, Position arg2)
{
- return arg1.Add(arg2);
+ return arg1?.Add(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position operator -(Position arg1, Position arg2)
{
- return arg1.Subtract(arg2);
+ return arg1?.Subtract(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position operator -(Position arg1)
{
- return arg1.Subtract();
+ return arg1?.Subtract();
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position operator *(Position arg1, Position arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position operator *(Position arg1, float arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position operator /(Position arg1, Position arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position operator /(Position arg1, float arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <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>
/// <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>
[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>
/// <since_tizen> 3 </since_tizen>
public static Position2D operator +(Position2D arg1, Position2D arg2)
{
- return arg1.Add(arg2);
+ return arg1?.Add(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position2D operator -(Position2D arg1, Position2D arg2)
{
- return arg1.Subtract(arg2);
+ return arg1?.Subtract(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position2D operator -(Position2D arg1)
{
- return arg1.Subtract();
+ return arg1?.Subtract();
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position2D operator *(Position2D arg1, Position2D arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position2D operator *(Position2D arg1, int arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position2D operator /(Position2D arg1, Position2D arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Position2D operator /(Position2D arg1, int arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <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>
/// <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>
[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/>
/// 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;
/// </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));
/// </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;
/// </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)
{
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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>
/// <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>
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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;
}
/// <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>
/// <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>
/// <since_tizen> 3 </since_tizen>
public static Rotation operator +(Rotation arg1, Rotation arg2)
{
- return arg1.Add(arg2);
+ return arg1?.Add(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Rotation operator -(Rotation arg1, Rotation arg2)
{
- return arg1.Subtract(arg2);
+ return arg1?.Subtract(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Rotation operator -(Rotation arg1)
{
- return arg1.Subtract();
+ return arg1?.Subtract();
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Rotation operator *(Rotation arg1, Rotation arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector3 operator *(Rotation arg1, Vector3 arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Rotation operator *(Rotation arg1, float arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Rotation operator /(Rotation arg1, Rotation arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Rotation operator /(Rotation arg1, float arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <since_tizen> 5 </since_tizen>
public static Size operator +(Size arg1, Size arg2)
{
- return arg1.Add(arg2);
+ return arg1?.Add(arg2);
}
/// <summary>
/// <since_tizen> 5 </since_tizen>
public static Size operator -(Size arg1, Size arg2)
{
- return arg1.Subtract(arg2);
+ return arg1?.Subtract(arg2);
}
/// <summary>
/// <since_tizen> 5 </since_tizen>
public static Size operator -(Size arg1)
{
- return arg1.Subtract();
+ return arg1?.Subtract();
}
/// <summary>
/// <since_tizen> 5 </since_tizen>
public static Size operator *(Size arg1, Size arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 5 </since_tizen>
public static Size operator *(Size arg1, float arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 5 </since_tizen>
public static Size operator /(Size arg1, Size arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <since_tizen> 5 </since_tizen>
public static Size operator /(Size arg1, float arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <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>
/// <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>
[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);
}
/// <since_tizen> 3 </since_tizen>
public static Size2D operator +(Size2D arg1, Size2D arg2)
{
- return arg1.Add(arg2);
+ return arg1?.Add(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Size2D operator -(Size2D arg1, Size2D arg2)
{
- return arg1.Subtract(arg2);
+ return arg1?.Subtract(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Size2D operator -(Size2D arg1)
{
- return arg1.Subtract();
+ return arg1?.Subtract();
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Size2D operator *(Size2D arg1, Size2D arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Size2D operator *(Size2D arg1, int arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Size2D operator /(Size2D arg1, Size2D arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Size2D operator /(Size2D arg1, int arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <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>
/// <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>
[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);
}
/// </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;
/// </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)
{
}
/// <since_tizen> 3 </since_tizen>
public static Vector2 operator +(Vector2 arg1, Vector2 arg2)
{
- return arg1.Add(arg2);
+ return arg1?.Add(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector2 operator -(Vector2 arg1, Vector2 arg2)
{
- return arg1.Subtract(arg2);
+ return arg1?.Subtract(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector2 operator -(Vector2 arg1)
{
- return arg1.Subtract();
+ return arg1?.Subtract();
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector2 operator *(Vector2 arg1, Vector2 arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector2 operator *(Vector2 arg1, float arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector2 operator /(Vector2 arg1, Vector2 arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector2 operator /(Vector2 arg1, float arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector3 operator +(Vector3 arg1, Vector3 arg2)
{
- return arg1.Add(arg2);
+ return arg1?.Add(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector3 operator -(Vector3 arg1, Vector3 arg2)
{
- return arg1.Subtract(arg2);
+ return arg1?.Subtract(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector3 operator -(Vector3 arg1)
{
- return arg1.Subtract();
+ return arg1?.Subtract();
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector3 operator *(Vector3 arg1, Vector3 arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector3 operator *(Vector3 arg1, float arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector3 operator /(Vector3 arg1, Vector3 arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector3 operator /(Vector3 arg1, float arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector4 operator +(Vector4 arg1, Vector4 arg2)
{
- return arg1.Add(arg2);
+ return arg1?.Add(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector4 operator -(Vector4 arg1, Vector4 arg2)
{
- return arg1.Subtract(arg2);
+ return arg1?.Subtract(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector4 operator -(Vector4 arg1)
{
- return arg1.Subtract();
+ return arg1?.Subtract();
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector4 operator *(Vector4 arg1, Vector4 arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector4 operator *(Vector4 arg1, float arg2)
{
- return arg1.Multiply(arg2);
+ return arg1?.Multiply(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector4 operator /(Vector4 arg1, Vector4 arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public static Vector4 operator /(Vector4 arg1, float arg2)
{
- return arg1.Divide(arg2);
+ return arg1?.Divide(arg2);
}
/// <summary>
/// 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);
/// 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)
{
}
/// 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)
{
}
/// Copy Constructor
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- protected ShadowBase(ShadowBase other) : this(other.Offset, other.Extents)
+ protected ShadowBase(ShadowBase other) : this(other?.Offset, other.Extents)
{
}
/// 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();
}
/// <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
{
/// <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
{
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>
{
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>
/// 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)
{
/// 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)
{
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));
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();
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();
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));
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));
/// </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)
}
else
{
+ if (null == property)
+ {
+ throw new ArgumentNullException(nameof(property));
+ }
property.PropertyChanged?.Invoke(this, null, value);
OnPropertyChanged(property.PropertyName);
/// </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;
[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 "";
}
}
}
/// 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);
/// 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));
[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);
}
}
[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 "";
}
}
[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 "";
}
}
}
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);
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);