{
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1707: Identifiers should not contain underscores")]
public enum DefaultItemLayoutProperty
{
/// <summary>
internal static readonly int RequiresSync = Interop.RenderTask.RequiresSyncGet();
}
+#pragma warning disable CA1707
internal static SWIGTYPE_p_f_r_Dali__Vector2__bool DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION
{
get
return ret;
}
}
+#pragma warning restore CA1707
public RenderTask() : this(Interop.RenderTask.NewRenderTask(), true)
{
}
/// <since_tizen> 3 </since_tizen>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1707: Identifiers should not contain underscores")]
public enum RefreshRate
{
REFRESH_ONCE = 0,
/// (Example : if we change SynchronousLoading property from 'true' to 'false', or if we call this function during UpdateImage)
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- protected virtual void UpdateImage(int key, PropertyValue value, bool requiredVisualCreation = true)
+ protected void UpdateImage(int key, PropertyValue value, bool requiredVisualCreation = true)
{
// Update image property map value as inputed value.
if (key != 0)
};
private states currentStates;
- private const string tag = "NUITEST";
private event EventHandler finishedEventHandler;
private void OnFinished()
/// <summary>
/// Copy the previously selected text from the text control into the clipboard.
/// </summary>
+ /// <exception cref="ArgumentNullException"> Thrown when argument is null. </exception>
/// <param name="textEditor">The textEditor control from which the text is copied.</param>
/// <returns>The copied text.</returns>
/// <since_tizen> 9 </since_tizen>
public static string CopyToClipboard(TextEditor textEditor)
{
+ if (textEditor == null)
+ {
+ throw new ArgumentNullException(nameof(textEditor), "TextEditor should not be null.");
+ }
string copiedText = Interop.TextEditor.CopyText(textEditor.SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return copiedText;
/// <summary>
/// Copy the previously selected text from the text control into the clipboard.
/// </summary>
+ /// <exception cref="ArgumentNullException"> Thrown when argument is null. </exception>
/// <param name="textField">The textField control from which the text is copied.</param>
/// <returns>The copied text.</returns>
/// <since_tizen> 9 </since_tizen>
public static string CopyToClipboard(TextField textField)
{
+ if (textField == null)
+ {
+ throw new ArgumentNullException(nameof(textField), "TextField should not be null.");
+ }
string copiedText = Interop.TextField.CopyText(textField.SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return copiedText;
/// <summary>
/// Cut the previously selected text from the text control into the clipboard.
/// </summary>
+ /// <exception cref="ArgumentNullException"> Thrown when argument is null. </exception>
/// <param name="textEditor">The textEditor control from which the text is cut.</param>
/// <returns>The cut text.</returns>
/// <since_tizen> 9 </since_tizen>
public static string CutToClipboard(TextEditor textEditor)
{
+ if (textEditor == null)
+ {
+ throw new ArgumentNullException(nameof(textEditor), "TextEditor should not be null.");
+ }
string cutText = Interop.TextEditor.CutText(textEditor.SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return cutText;
/// <summary>
/// Cut the previously selected text from the text control into the clipboard.
/// </summary>
+ /// <exception cref="ArgumentNullException"> Thrown when argument is null. </exception>
/// <param name="textField">The textField control from which the text is cut.</param>
/// <returns>The cut text.</returns>
/// <since_tizen> 9 </since_tizen>
public static string CutToClipboard(TextField textField)
{
+ if (textField == null)
+ {
+ throw new ArgumentNullException(nameof(textField), "TextField should not be null.");
+ }
string cutText = Interop.TextField.CutText(textField.SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return cutText;
/// the text will be appended to the last cursor position and the text control will gain focus.
/// If some text inside the text control is selected, it will be replaced by the pasted text.
/// </remarks>
+ /// <exception cref="ArgumentNullException"> Thrown when argument is null. </exception>
/// <param name="textEditor">The textEditor control into which the text is pasted.</param>
/// <since_tizen> 9 </since_tizen>
public static void PasteTo(TextEditor textEditor)
{
+ if (textEditor == null)
+ {
+ throw new ArgumentNullException(nameof(textEditor), "TextEditor should not be null.");
+ }
Interop.TextEditor.PasteText(textEditor.SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// the text will be appended to the last cursor position and the text control will gain focus.
/// If some text inside the text control is selected, it will be replaced by the pasted text.
/// </remarks>
+ /// <exception cref="ArgumentNullException"> Thrown when argument is null. </exception>
/// <param name="textField">The textField control into which the text is pasted.</param>
/// <since_tizen> 9 </since_tizen>
public static void PasteTo(TextField textField)
{
+ if (textField == null)
+ {
+ throw new ArgumentNullException(nameof(textField), "TextEditor should not be null.");
+ }
Interop.TextField.PasteText(textField.SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// If the classes that are not derived from Control (such as View, ImageView and TextLabel) want to use this system,
/// please set <see cref="EnableControlState"/> to true.
/// </summary>
+ /// <exception cref="ArgumentNullException"> Thrown when set 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 ControlState ControlState
{
return;
}
+ if (value == null)
+ {
+ throw new ArgumentNullException(nameof(value), "ControlState should not be null.");
+ }
var prevState = ControlState;
/// Apply initial style to the view.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- protected virtual void InitializeStyle(ViewStyle style = null)
+ protected void InitializeStyle(ViewStyle style = null)
{
if (style == null && ThemeManager.InitialThemeDisabled)
{
/// </code>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1065: Do not raise exceptions in unexpected locations")]
public static Matrix Identity
{
get
/// </code>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1065: Do not raise exceptions in unexpected locations")]
public static Matrix3 Identity
{
get
/// <since_tizen> 3 </since_tizen>
public static implicit operator Vector3(RelativeVector3 relativeVector3)
{
+ if (relativeVector3 == null) return null;
return new Vector3(relativeVector3.X, relativeVector3.Y, relativeVector3.Z);
}
/// <since_tizen> 3 </since_tizen>
public static implicit operator RelativeVector3(Vector3 vec)
{
+ if (vec == null) return null;
return new RelativeVector3(vec.X, vec.Y, vec.Z);
}
/// A delay before the time period in milliseconds
/// </summary>
/// <since_tizen> 9 </since_tizen>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1065: Do not raise exceptions in unexpected locations")]
public int DelayMilliseconds
{
set
/// The duration of the time period in milliseconds
/// </summary>
/// <since_tizen> 9 </since_tizen>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1065: Do not raise exceptions in unexpected locations")]
public int DurationMilliseconds
{
set
/// <since_tizen> 12 </since_tizen>
public virtual void Add(T handler)
{
+ if (handler == null)
+ {
+ // Do nothing.
+ return;
+ }
handlers.Add(new WeakHandler<T>(handler));
OnCountIncreased();
/// <since_tizen> 12 </since_tizen>
public virtual void Remove(T handler)
{
+ if (handler == null)
+ {
+ // Do nothing.
+ return;
+ }
+
int lastIndex = handlers.FindLastIndex(item => item.Equals(handler));
if (lastIndex >= 0)
/// Removes listener for drop targets
/// </summary>
/// <param name="targetView">The target view</param>
- /// <param name="callback">The callback function to remove</param>
+ /// <param name="_">The callback function to remove(Not used)</param>
/// <since_tizen> 10 </since_tizen>
- public void RemoveListener(View targetView, DragAndDropEventHandler callback)
+ public void RemoveListener(View targetView, DragAndDropEventHandler _)
{
if (!targetEventDictionary.ContainsKey(targetView))
{
/// Removes listener for drop targets
/// </summary>
/// <param name="targetWindow">The target window</param>
- /// <param name="callback">The callback function to remove</param>
+ /// <param name="_">The callback function to remove(Not used)</param>
[EditorBrowsable(EditorBrowsableState.Never)]
- public void RemoveListener(Window targetWindow, DragAndDropWindowEventHandler callback)
+ public void RemoveListener(Window targetWindow, DragAndDropWindowEventHandler _)
{
if (!targetWindowEventDictionary.ContainsKey(targetWindow))
{
}
[EditorBrowsable(EditorBrowsableState.Never)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1065: Do not raise exceptions in unexpected locations")]
public override string ToString()
{
string ret = Interop.ImageUrl.GetUrl(SwigCPtr);
/// <param name="width">Buffer width in pixels.</param>
/// <param name="height">Buffer height in pixels.</param>
/// <param name="pixelFormat">The pixel format.</param>
- /// <param name="releaseFunction">The function used to release the memory.</param>
+ /// <param name="_">Not used parameter.</param>
/// <since_tizen> 5 </since_tizen>
/// This will be deprecated after API level 9. ReleaseFunction is not useful in C#.
[EditorBrowsable(EditorBrowsableState.Never)]
- public PixelData(byte[] buffer, uint bufferSize, uint width, uint height, PixelFormat pixelFormat, PixelData.ReleaseFunction releaseFunction) : this(Interop.PixelData.New(buffer, bufferSize, width, height, (int)pixelFormat), true)
+ [Obsolete("Do not use this constructor. Use PixelData(byte[], uint, uint, uint, PixelFormat).")]
+ public PixelData(byte[] buffer, uint bufferSize, uint width, uint height, PixelFormat pixelFormat, PixelData.ReleaseFunction _) : this(Interop.PixelData.New(buffer, bufferSize, width, height, (int)pixelFormat), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// Enumeration for Pixel formats.<br />
/// Pixel format, default color depth is RGBA 32 bit with alpha.
/// </summary>
- /// /// <since_tizen> 3 </since_tizen>
+ /// <since_tizen> 3 </since_tizen>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1707: Identifiers should not contain underscores")]
public enum PixelFormat
{
/// <summary>
/// <exception cref="ArgumentNullException"> Thrown when vertices is null or length of the vertices is 0. </exception>
/// <exception cref="OverflowException"> Thrown when length of the vertices is overflow. </exception>
/// <since_tizen> 8 </since_tizen>
-
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1715: Identifiers should have correct prefix")]
public void SetData<VertexType>(VertexType[] vertices) where VertexType : struct
{
if (null == vertices || vertices.Length == 0)
/// </example>
/// <summary></summary>
/// <since_tizen> 9 </since_tizen>
+#pragma warning disable CA1724
public static class ThemeManager
+#pragma warning restore CA1724
{
/// <summary>
/// The default light theme name preloaded in platform.
}
else if (null == path)
{
- throw new ArgumentNullException("path should not be null");
+ throw new ArgumentNullException(nameof(path), "path should not be null");
}
else if (null == position)
{
}
else if (null == path)
{
- throw new ArgumentNullException("path should not be null");
+ throw new ArgumentNullException(nameof(path), "path should not be null");
}
else if (quality > 100)
{
}
else if (null == path)
{
- throw new ArgumentNullException("path should not be null");
+ throw new ArgumentNullException(nameof(path), "path should not be null");
}
else if (null == color)
{
}
else if (null == path)
{
- throw new ArgumentNullException("path should not be null");
+ throw new ArgumentNullException(nameof(path), "path should not be null");
}
if (source is View || source is Layer)
/// <code>
/// RenderEffect.CreateBackgroundBlurEffect(blurRadius);
/// </code>
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
sealed class BackgroundBlurEffect : RenderEffect
{