[NUI] Reduce build warning CA1805 (Deprecated, BaseComponents, etc)
authorEunki Hong <eunkiki.hong@samsung.com>
Tue, 1 Apr 2025 15:17:13 +0000 (00:17 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Wed, 9 Apr 2025 02:09:46 +0000 (11:09 +0900)
Phase 2 of #6805.

Build warning counts : 1521 -> 1424 (Reduce 97)

Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
16 files changed:
src/Tizen.NUI/src/deprecated/Rendering/Renderer_Deprecated.cs
src/Tizen.NUI/src/public/BaseComponents/AnimatedVectorImageView.cs
src/Tizen.NUI/src/public/BaseComponents/ImageView.cs
src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs
src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
src/Tizen.NUI/src/public/BaseComponents/TextField.cs
src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/BaseComponents/ViewAccessibility.cs
src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs
src/Tizen.NUI/src/public/BaseComponents/ViewEvent.cs
src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs
src/Tizen.NUI/src/public/BaseComponents/ViewVisuals.cs
src/Tizen.NUI/src/public/BaseComponents/VisualView.cs
src/Tizen.NUI/src/public/Common/Color.cs
src/Tizen.NUI/src/public/Rendering/Renderable.cs

index c245b2e23945dd165ba2221cf8a718579e6bb13b..d234a4e0b0d13fb8b7cd1d3ca1f96f8aa6e86eb9 100755 (executable)
@@ -27,8 +27,8 @@ namespace Tizen.NUI
     /// <since_tizen> 3 </since_tizen>
     public class Renderer : Animatable
     {
-        private Geometry CurrentGeometry = null;
-        private Shader CurrentShader = null;
+        private Geometry CurrentGeometry;
+        private Shader CurrentShader;
 
         /// <summary>
         /// Create an instance of Renderer.
index 3d197dc4d50841d27a7cdc0f57515b8163b9c5ca..669c306a339b5014e0067c04ccf456b7e214a9f5 100755 (executable)
@@ -838,12 +838,12 @@ namespace Tizen.NUI.BaseComponents
 
 
         #region Private
-        private string resourceUrl = null;
-        private int repeatCnt = 0;
+        private string resourceUrl;
+        private int repeatCnt;
         private RepeatModes repeatMode = RepeatModes.Restart;
         private int minimumFrame = -1, maximumFrame = -1;
-        private string minimumFrameMarker = null;
-        private string maximumFrameMarker = null;
+        private string minimumFrameMarker;
+        private string maximumFrameMarker;
         private minMaxSetTypes isMinMaxFrameSet = minMaxSetTypes.NotSetByUser;
         private int innerCurrentFrame = -1;
         private EndActions innerEndAction = EndActions.Cancel;
index b6517035e5905ae0299193de7ae9b7a20f2501a8..c818d8342e972d9ba7510fd5fdcfc835286b9274 100755 (executable)
@@ -151,9 +151,9 @@ namespace Tizen.NUI.BaseComponents
             ImageVisualProperty.FastTrackUploading,
         };
         internal PropertyMap cachedImagePropertyMap;
-        internal bool imagePropertyUpdatedFlag = false;
+        internal bool imagePropertyUpdatedFlag;
 
-        private bool imagePropertyUpdateProcessAttachedFlag = false;
+        private bool imagePropertyUpdateProcessAttachedFlag;
         private Rectangle _border;
 
         // Development Guide : Please make ensure that these 5 values are matched with current image.
@@ -161,7 +161,7 @@ namespace Tizen.NUI.BaseComponents
         private string _alphaMaskUrl = "";
         private int _desired_width = -1;
         private int _desired_height = -1;
-        private bool _fastTrackUploading = false;
+        private bool _fastTrackUploading;
 
         private TriggerableSelector<string> resourceUrlSelector;
         private TriggerableSelector<Rectangle> borderSelector;
@@ -1947,7 +1947,7 @@ namespace Tizen.NUI.BaseComponents
                 NotifyPropertyChanged();
             }
         }
-        private bool adjustViewSize = false;
+        private bool adjustViewSize;
 
         /// <summary>
         /// ImageView PlaceHolderUrl, type string.
index 07d9482f7913de02dda6c65bcd76d9f23959dc83..ee2c6752488c413aa4950cf602c7150c9ecef56e 100755 (executable)
@@ -1660,7 +1660,7 @@ namespace Tizen.NUI.BaseComponents
         private VisualEventSignalCallbackType visualEventSignalCallback;
         private EventHandler<VisualEventSignalArgs> visualEventSignalHandler;
 
-        static private int dynamicPropertyCallbackId = 0;
+        static private int dynamicPropertyCallbackId;
         //static private Dictionary<int, DynamicPropertyCallbackType> dynamicPropertyCallbacks = new Dictionary<int, DynamicPropertyCallbackType>();
         static private ConcurrentDictionary<int, WeakReference<LottieAnimationView>> weakReferencesOfLottie = new ConcurrentDictionary<int, WeakReference<LottieAnimationView>>();
 
index a8b19242e48109e8ac90c455c0fa5f0f20c11c07..8fe213f0cc08341e966de632ca897e442eafb097 100755 (executable)
@@ -34,23 +34,23 @@ namespace Tizen.NUI.BaseComponents
     {
         static private string defaultStyleName = "Tizen.NUI.BaseComponents.TextEditor";
         static private string defaultFontFamily = "TizenSans";
-        private string textEditorTextSid = null;
-        private string textEditorPlaceHolderTextSid = null;
-        private InputMethodContext inputMethodContext = null;
+        private string textEditorTextSid;
+        private string textEditorPlaceHolderTextSid;
+        private InputMethodContext inputMethodContext;
         private string fontFamily = defaultFontFamily;
         private float fontSizeScale = 1.0f;
-        private bool hasSystemLanguageChanged = false;
-        private bool hasSystemFontSizeChanged = false;
-        private bool hasSystemFontTypeChanged = false;
-        private bool isSettingTextInCSharp = false;
-
-        private Color internalPlaceholderTextColor = null;
-        private Vector4 internalPrimaryCursorColor = null;
-        private Vector4 internalSecondaryCursorColor = null;
-        private Vector4 internalSelectionHighlightColor = null;
-        private Vector4 internalInputColor = null;
-        private Vector4 internalTextColor = null;
-        private Color internalGrabHandleColor = null;
+        private bool hasSystemLanguageChanged;
+        private bool hasSystemFontSizeChanged;
+        private bool hasSystemFontTypeChanged;
+        private bool isSettingTextInCSharp;
+
+        private Color internalPlaceholderTextColor;
+        private Vector4 internalPrimaryCursorColor;
+        private Vector4 internalSecondaryCursorColor;
+        private Vector4 internalSelectionHighlightColor;
+        private Vector4 internalInputColor;
+        private Vector4 internalTextColor;
+        private Color internalGrabHandleColor;
 
 
         static TextEditor()
index c0822ceb855dfa129f3f17984de87a02a3de1c78..d398cd647400658de462e324d5a02d1d6a069e0b 100755 (executable)
@@ -33,24 +33,24 @@ namespace Tizen.NUI.BaseComponents
     {
         static private string defaultStyleName = "Tizen.NUI.BaseComponents.TextField";
         static private string defaultFontFamily = "TizenSans";
-        private string textFieldTextSid = null;
-        private string textFieldPlaceHolderTextSid = null;
-        private string textFieldPlaceHolderTextFocusedSid = null;
-        private InputMethodContext inputMethodCotext = null;
+        private string textFieldTextSid;
+        private string textFieldPlaceHolderTextSid;
+        private string textFieldPlaceHolderTextFocusedSid;
+        private InputMethodContext inputMethodCotext;
         private string fontFamily = defaultFontFamily;
         private float fontSizeScale = 1.0f;
-        private bool hasSystemLanguageChanged = false;
-        private bool hasSystemFontSizeChanged = false;
-        private bool hasSystemFontTypeChanged = false;
-        private bool isSettingTextInCSharp = false;
-
-        private Vector4 internalPlaceholderTextColor = null;
-        private Vector4 internalPrimaryCursorColor = null;
-        private Vector4 internalSecondaryCursorColor = null;
-        private Vector4 internalSelectionHighlightColor = null;
-        private Vector4 internalInputColor = null;
-        private Color internalTextColor = null;
-        private Color internalGrabHandleColor = null;
+        private bool hasSystemLanguageChanged;
+        private bool hasSystemFontSizeChanged;
+        private bool hasSystemFontTypeChanged;
+        private bool isSettingTextInCSharp;
+
+        private Vector4 internalPlaceholderTextColor;
+        private Vector4 internalPrimaryCursorColor;
+        private Vector4 internalSecondaryCursorColor;
+        private Vector4 internalSelectionHighlightColor;
+        private Vector4 internalInputColor;
+        private Color internalTextColor;
+        private Color internalGrabHandleColor;
 
 
         static TextField() 
index 8e8a3c96801654fdc4538ac300501bb7a6214e2f..c71d9bd54ee7521e2c73e9d84ac60bdb65a6dbd6 100755 (executable)
@@ -244,16 +244,16 @@ namespace Tizen.NUI.BaseComponents
 
         static private string defaultStyleName = "Tizen.NUI.BaseComponents.TextLabel";
         static private string defaultFontFamily = "BreezeSans";
-        private string textLabelSid = null;
+        private string textLabelSid;
         private TextLabelSelectorData selectorData;
         private string fontFamily = defaultFontFamily;
         private float fontSizeScale = 1.0f;
 
         private bool textIsEmpty = true;
 
-        private bool hasSystemLanguageChanged = false;
-        private bool hasSystemFontSizeChanged = false;
-        private bool hasSystemFontTypeChanged = false;
+        private bool hasSystemLanguageChanged;
+        private bool hasSystemFontSizeChanged;
+        private bool hasSystemFontTypeChanged;
 
         private Color internalTextColor;
         private Color internalAnchorColor;
index e4abf63fc828a6b26a31bc15019cc3138ac21a29..f2d289572656727f7b0d309dddf1292b9f83ca86 100755 (executable)
@@ -31,8 +31,8 @@ namespace Tizen.NUI.BaseComponents
         private static HashSet<BindableProperty> positionPropertyGroup = new HashSet<BindableProperty>();
         private static HashSet<BindableProperty> sizePropertyGroup = new HashSet<BindableProperty>();
         private static HashSet<BindableProperty> scalePropertyGroup = new HashSet<BindableProperty>();
-        private static bool defaultGrabTouchAfterLeave = false;
-        private static bool defaultAllowOnlyOwnTouch = false;
+        private static bool defaultGrabTouchAfterLeave;
+        private static bool defaultAllowOnlyOwnTouch;
 
         internal BackgroundExtraData backgroundExtraData;
         private int widthPolicy = LayoutParamPolicies.WrapContent;
@@ -40,51 +40,59 @@ namespace Tizen.NUI.BaseComponents
         private LayoutExtraData layoutExtraData;
         private ThemeData themeData;
         private Dictionary<Type, object> attached;
-        private bool isThemeChanged = false;
+        private bool isThemeChanged;
 
         // Collection of image-sensitive properties, and need to update C# side cache value.
         private static readonly List<int> cachedNUIViewBackgroundImagePropertyKeyList = new List<int> {
             ImageVisualProperty.URL,
             ImageVisualProperty.SynchronousLoading,
         };
-        private string backgroundImageUrl = null;
-        private bool backgroundImageSynchronousLoading = false;
+        private string backgroundImageUrl;
+        private bool backgroundImageSynchronousLoading;
 
         // List of constraints
-        private Constraint widthConstraint = null;
-        private Constraint heightConstraint = null;
-
-        private Size2D internalMaximumSize = null;
-        private Size2D internalMinimumSize = null;
-        private Extents internalMargin = null;
-        private Extents internalPadding = null;
-        private Vector3 internalSizeModeFactor = null;
-        private Vector2 internalCellIndex = null;
-        private Color internalBackgroundColor = null;
-        private Color internalColor = null;
-        private Position internalPivotPoint = null;
-        private Position internalPosition = null;
-        private Position2D internalPosition2D = null;
-        private Vector3 internalScale = null;
-        private Size internalSize = null;
-        private Size2D internalSize2D = null;
-        private int layoutCount = 0;
+        private Constraint widthConstraint;
+        private Constraint heightConstraint;
+
+        private float userSizeWidth;
+        private float userSizeHeight;
+
+        private Size2D internalMaximumSize;
+        private Size2D internalMinimumSize;
+        private Extents internalMargin;
+        private Extents internalPadding;
+        private Vector3 internalSizeModeFactor;
+        private Vector2 internalCellIndex;
+        private Color internalBackgroundColor;
+        private Color internalColor;
+        private Position internalPivotPoint;
+        private Position internalPosition;
+        private Position2D internalPosition2D;
+        private Vector3 internalScale;
+        private Size internalSize;
+        private Size2D internalSize2D;
+        private int layoutCount;
         private ControlState propagatableControlStates = ControlState.All;
 
         private string internalName = string.Empty;
-        private Position internalCurrentParentOrigin = null;
-        private Position internalCurrentAnchorPoint = null;
-        private Vector3 internalTargetSize = null;
-        private Size2D internalCurrentSize = null;
-        private Position internalCurrentPosition = null;
-        private Vector3 internalCurrentWorldPosition = null;
-        private Vector3 internalCurrentScale = null;
-        private Vector3 internalCurrentWorldScale = null;
-        private Vector4 internalCurrentColor = null;
-        private Vector4 internalCurrentWorldColor = null;
-        private Vector2 internalCurrentScreenPosition = null;
-
-        private static int aliveCount = 0;
+        private Position internalCurrentParentOrigin;
+        private Position internalCurrentAnchorPoint;
+        private Vector3 internalTargetSize;
+        private Size2D internalCurrentSize;
+        private Position internalCurrentPosition;
+        private Vector3 internalCurrentWorldPosition;
+        private Vector3 internalCurrentScale;
+        private Vector3 internalCurrentWorldScale;
+        private Vector4 internalCurrentColor;
+        private Vector4 internalCurrentWorldColor;
+        private Vector2 internalCurrentScreenPosition;
+
+        /// <summary>
+        /// Indicates that this View should listen Touch event to handle its ControlState.
+        /// </summary>
+        private bool enableControlState;
+
+        private static int aliveCount;
 
         static View()
         {
index a5b8f70456d8c08a4c6ce149314d55297396b99d..bc092bf69045037f2da3f950e797d3437f052e39 100755 (executable)
@@ -32,12 +32,12 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Start position in stored text.
         /// </summary>
-        public int StartOffset { get; set; } = 0;
+        public int StartOffset { get; set; }
 
         /// <summary>
         /// End position in stored text.
         /// </summary>
-        public int EndOffset { get; set; } = 0;
+        public int EndOffset { get; set; }
 
         /// <summary>
         /// Text content in stored text.
index b6f287b6cc1daf2c21e68f415cdc8a63b9ba844a..d061fef07cc86b01778083f20281ff071f0ec082 100755 (executable)
@@ -27,9 +27,6 @@ namespace Tizen.NUI.BaseComponents
     /// <since_tizen> 3 </since_tizen>
     public partial class View
     {
-        private float userSizeWidth = 0.0f;
-        private float userSizeHeight = 0.0f;
-
         /// <summary>
         /// StyleNameProperty (DALi json)
         /// </summary>
index 9dc225de2bf65dc7c59b486b01ce15a12a55e3fd..32faa31def1edcb1df04ab804e98f03a358aca53 100755 (executable)
@@ -106,12 +106,12 @@ namespace Tizen.NUI.BaseComponents
         private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
 
         // List of dispatch Event
-        private PanGestureDetector panGestureDetector = null;
-        private LongPressGestureDetector longGestureDetector = null;
-        private PinchGestureDetector pinchGestureDetector = null;
-        private TapGestureDetector tapGestureDetector = null;
-        private RotationGestureDetector rotationGestureDetector = null;
-        private int configGestureCount = 0;
+        private PanGestureDetector panGestureDetector;
+        private LongPressGestureDetector longGestureDetector;
+        private PinchGestureDetector pinchGestureDetector;
+        private TapGestureDetector tapGestureDetector;
+        private RotationGestureDetector rotationGestureDetector;
+        private int configGestureCount;
         private bool dispatchTouchEvents = true;
         private bool dispatchParentTouchEvents = true;
         private bool dispatchHoverEvents = true;
index e66632eb14ba602a1738dc56b189648a20aab3c5..d37773af40c45f51d2d83cac1c02f64479b2233e 100755 (executable)
@@ -346,11 +346,6 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        /// <summary>
-        /// Indicates that this View should listen Touch event to handle its ControlState.
-        /// </summary>
-        private bool enableControlState = false;
-
         private int LeftFocusableViewId
         {
             get
@@ -1441,6 +1436,11 @@ namespace Tizen.NUI.BaseComponents
                 internalCurrentScreenPosition?.Dispose();
                 internalCurrentScreenPosition = null;
 
+                backgroundExtraData?.Dispose();
+                backgroundExtraData = null;
+                layoutExtraData?.Dispose();
+                layoutExtraData = null;
+
                 if (visualContainers != null)
                 {
                     foreach (var visualContainer in visualContainers)
index 99ee999362bd8ab24bb8ba53ce5be444273bd737..82320cc0a54b4f07666f3af72b918735f7258529 100755 (executable)
@@ -29,7 +29,7 @@ namespace Tizen.NUI.BaseComponents
     public partial class View
     {
         #region Internal and Private
-        private List<Tizen.NUI.Visuals.VisualObjectsContainer> visualContainers = null;
+        private List<Tizen.NUI.Visuals.VisualObjectsContainer> visualContainers;
 
         /// <summary>
         /// Range of visual for the container.
index 9ea5693c62aa3326b513a30f09cba1b26f3e23af..0110f1e3d80358b818e0fff73a412d99a41974d3 100755 (executable)
@@ -42,10 +42,10 @@ namespace Tizen.NUI.BaseComponents
     /// <since_tizen> 3 </since_tizen>
     public class VisualView : CustomView
     {
-        private Dictionary<int, string> visualNameDictionary = null;
-        private Dictionary<int, VisualBase> visualDictionary = null;
-        private Dictionary<int, PropertyMap> tranformDictionary = null;
-        private PropertyArray animateArray = null;
+        private Dictionary<int, string> visualNameDictionary;
+        private Dictionary<int, VisualBase> visualDictionary;
+        private Dictionary<int, PropertyMap> tranformDictionary;
+        private PropertyArray animateArray;
 
         /// <summary>
         /// Constructor.
index 258efbfc3d8c0d1b1839b9491379418f2021bd0c..7fac08a39f7917564cd773e9e90d760b55a30dfc 100755 (executable)
@@ -1083,7 +1083,7 @@ namespace Tizen.NUI
         }
 
         internal delegate void ColorChangedCallback(float r, float g, float b, float a);
-        private ColorChangedCallback callback = null;
+        private ColorChangedCallback callback;
 
         /// <summary>
         /// The red component.
index e362a7d21eb71afb502cded9548429e0ef553746..1d34e8b0f8cae69675d53408f0645989e2013ce5 100755 (executable)
@@ -27,8 +27,8 @@ namespace Tizen.NUI
     [EditorBrowsable(EditorBrowsableState.Never)]
     public partial class Renderable : Animatable
     {
-        private Geometry geometry = null;
-        private Shader shader = null;
+        private Geometry geometry;
+        private Shader shader;
 
         /// <summary>
         /// Create an instance of Renderable without Geometry or Shader.