}
}
- PreloadLibICU();
+ PreloadLibICU();\r
PreloadTizenFX();
PreloadEnd();
static void PreloadTizenFX()\r
{\r
- PreloadElmSharp();
- PreloadSystemInfo();
- PreloadTizenSynchronizationContext();\r
- }
-
- static void PreloadElmSharp()\r
- {\r
try
{
Assembly assem = LoadAssembly("ElmSharp");
var type = assem.GetType("ElmSharp.Window");\r
type.GetMethod("Preload", BindingFlags.NonPublic | BindingFlags.Static).Invoke(null, null);\r
+\r
+ assem = LoadAssembly("Tizen.System.Information");
+ type = assem.GetType("Tizen.System.Information");
+ type.GetMethod("TryGetValue", BindingFlags.Public | BindingFlags.Static).MakeGenericMethod(typeof(int)).Invoke(null, new object[] { "http://tizen.org/feature/screen.width", null });\r
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
- Console.WriteLine("Fail to preload ElmSharp");
- }
- }
-
- static void PreloadSystemInfo()\r
- {\r
- try
- {
- Assembly assem = LoadAssembly("Tizen.System.Information");
- var type = assem.GetType("Tizen.System.Information");
- type.GetMethod("TryGetValue", BindingFlags.Static | BindingFlags.Public).MakeGenericMethod(typeof(int)).Invoke(null, new object[]{ "http://tizen.org/feature/screen.width", null});
+ Console.WriteLine("Fail to preload TizenFX");
}
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- Console.WriteLine("Fail to preload system information");
- }\r
- }
-
- static void PreloadTizenSynchronizationContext()\r
- {\r
- try
- {\r
- Assembly assem = LoadAssembly("Tizen.Applications.Common");\r
- var type = assem.GetType("Tizen.Applications.TizenSynchronizationContext");\r
- type = type.GetNestedType("GSourceManager", BindingFlags.Static | BindingFlags.NonPublic);\r
- type.GetMethod("Post", BindingFlags.Static | BindingFlags.Public).Invoke(null, new object[] { null });
- }\r
- catch (Exception e)\r
- {
- Console.WriteLine(e.ToString());
- Console.WriteLine("Fail to preload TizenSynchronizationContext");\r
- }\r
}
}
}