[NUI] Make vulkan constructor as InhouseAPI, Fix Codacy errors (#407)
authordongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 22 Aug 2018 07:04:35 +0000 (16:04 +0900)
committerGitHub <noreply@github.com>
Wed, 22 Aug 2018 07:04:35 +0000 (16:04 +0900)
src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
src/Tizen.NUI/src/public/BaseComponents/TextField.cs
src/Tizen.NUI/src/public/NUIApplication.cs

index bca0c94..ff796af 100755 (executable)
@@ -955,7 +955,7 @@ namespace Tizen.NUI.BaseComponents
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            if (this != null && _textEditorTextChangedCallbackDelegate != null)
+            if (this.HasBody() && _textEditorTextChangedCallbackDelegate != null)
             {
                 TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
             }
@@ -1121,7 +1121,7 @@ namespace Tizen.NUI.BaseComponents
         {
             ScrollStateChangedEventArgs e = new ScrollStateChangedEventArgs();
 
-            if (textEditor != null)
+            if (textEditor != global::System.IntPtr.Zero)
             {
                 // Populate all members of "e" (ScrollStateChangedEventArgs) with real data
                 e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
index 06d7543..412267d 100755 (executable)
@@ -1007,7 +1007,7 @@ namespace Tizen.NUI.BaseComponents
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
-            if (this != null)
+            if (this.HasBody())
             {
                 if (_textFieldMaxLengthReachedCallbackDelegate != null)
                 {
index cc44cde..bd2d361 100755 (executable)
@@ -131,14 +131,16 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Internal constructor with Graphics Backend Type
+        /// Internal inhouse constructor with Graphics Backend Type
         /// </summary>
         /// <param name="backend"></param>
         /// <param name="windowMode"></param>
         /// <param name="windowSize"></param>
         /// <param name="windowPosition"></param>
         /// <param name="styleSheet"></param>
-        internal NUIApplication(Graphics.BackendType backend, WindowMode windowMode = WindowMode.Opaque, Size2D windowSize = null, Position2D windowPosition = null, string styleSheet = "") : base(new NUICoreBackend(styleSheet, windowMode))
+        /// InhouseAPI, this could be opend in NextTizen
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public NUIApplication(Graphics.BackendType backend, WindowMode windowMode = WindowMode.Opaque, Size2D windowSize = null, Position2D windowPosition = null, string styleSheet = "") : base(new NUICoreBackend(styleSheet, windowMode))
         {
             //windowMode and styleSheet will be added later. currenlty it's not working as expected.
             Graphics.Backend = backend;
@@ -355,7 +357,9 @@ namespace Tizen.NUI
     /// <summary>
     /// Graphics BackendType
     /// </summary>
-    internal class Graphics
+    /// InhouseAPI, this could be opend in NextTizen
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class Graphics
     {
         public enum BackendType
         {