[Tizen S] Integrate app types(dotnet, dotnet-nui)
[platform/core/dotnet/launcher.git] / Managed / Tizen.Runtime / Preloader.cs
index aa8de31..ea0737b 100644 (file)
@@ -50,7 +50,11 @@ namespace Tizen.Runtime
             if (!Directory.Exists(preloadPath))
                 return;
 
+            // If TIZEN_UIFW is not set or NUI, do not preload UI related dll
             string uifw = System.Environment.GetEnvironmentVariable("TIZEN_UIFW");
+            if (uifw == null || uifw != "NUI")
+                return;
+
             string[] paths = Directory.GetFiles(preloadPath, "*.preload");
             Array.Sort(paths);
             foreach (string path in paths)
@@ -69,12 +73,8 @@ namespace Tizen.Runtime
                 if (fileName.IndexOf('.') != 2)
                     continue;
 
-                // if TIZEN_UIFW is not set, do not preload UI related dll
-                if (uifw == null && (fileName.Contains("NUI") || fileName.Contains("ElmSharp") || fileName.Contains("XSF")))
-                    continue;
-                else if (uifw == "ElmSharp" && (fileName.Contains("NUI") || fileName.Contains("XSF")))
-                    continue;
-                else if (uifw == "NUI" && (fileName.Contains("ElmSharp") || fileName.Contains("XSF")))
+                // TIZEN_UIFW only set NUI
+                if (fileName.Contains("ElmSharp") || fileName.Contains("XSF"))
                     continue;
 
                 try