[NUI] use auto-property initializer for StyleManager.ThemeMap (#1966)
authorYeongJong Lee <cleanlyj@naver.com>
Tue, 1 Sep 2020 10:34:14 +0000 (19:34 +0900)
committerGitHub <noreply@github.com>
Tue, 1 Sep 2020 10:34:14 +0000 (19:34 +0900)
Code cleanup

src/Tizen.NUI.Components/Utils/StyleManager.cs

index c1e2244..c66f4fe 100755 (executable)
@@ -26,12 +26,7 @@ namespace Tizen.NUI.Components
     /// </summary>
     [EditorBrowsable(EditorBrowsableState.Never)]
     public sealed class StyleManager
-    {   
-        /// <summary>
-        /// (Theme name, Theme instance)
-        /// </summary>
-        private Dictionary<string, Theme> themeMap;
-
+    {
         /// <summary>
         /// StyleManager construct.
         /// </summary>
@@ -82,20 +77,10 @@ namespace Tizen.NUI.Components
             }
         }
 
-        private Dictionary<string, Theme> ThemeMap
-        {
-            get
-            {
-                if (themeMap == null)
-                {
-                    themeMap = new Dictionary<string, Theme>()
-                    {
-                        ["DEFAULT"] = ThemeManager.DefaultTheme
-                    };
-                }
-                return themeMap;
-            }
-        }
+        /// <summary>
+        /// (Theme name, Theme instance)
+        /// </summary>
+        private Dictionary<string, Theme> ThemeMap { get; } = new Dictionary<string, Theme> { ["DEFAULT"] = ThemeManager.DefaultTheme };
 
         /// <summary>
         /// Register style in StyleManager.