{
CheckAsciiCasing();
+ if (!Directory.Exists(preloadPath))
+ return;
+
string[] paths = Directory.GetFiles(preloadPath, "*.preload");
Array.Sort(paths);
foreach (string path in paths)
{
string fileName = Path.GetFileName(path);
+
+ // GetFileName() can return NULL
+ if (fileName == null)
+ continue;
+
// ex) Tizen.preload / 0A.Tizen.preload / A0.Tizen.preload / .0.Tizen.preload / .00.Tizen.preload
if (!char.IsNumber(fileName, 0) || !char.IsNumber(fileName, 1))
continue;
Assembly asm = AssemblyLoadContext.Default.LoadFromAssemblyName(new AssemblyName(assemblyStr));
Type type = asm.GetType(typenameStr);
if (type == null)
+ {
Console.WriteLine("[Warning] Check the '" + line + "' in " + fileName);
+ continue;
+ }
if (methodStr != "")
{
MethodInfo method = type.GetMethod(methodStr, bindingFlag);
+ if (method == null)
+ {
+ Console.WriteLine("[Warning] Check the '" + line + "' in " + fileName);
+ continue;
+ }
method.Invoke(null, null);
}
}