summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>2017-01-05 10:22:46 +0100
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>2017-01-05 11:04:42 +0100
commit4a3f29faebc1a96ce5197a25934538d79f0b1687 (patch)
tree8b1bee7a75129ede04a4add57da17bdecf595c05
parent7223102c41562dbe6049ca916e5c6456971e0c5d (diff)
downloadlauncher-4a3f29faebc1a96ce5197a25934538d79f0b1687.tar.gz
launcher-4a3f29faebc1a96ce5197a25934538d79f0b1687.tar.bz2
launcher-4a3f29faebc1a96ce5197a25934538d79f0b1687.zip
Use executables when trying to resolve an assembly
Some applications define types referenced from XAML in the executable files, this commit handles such cases. Change-Id: I422e7ad1b8d463c8afac663a4eab58cd150c983a Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
-rwxr-xr-xTizen.Runtime/Tizen.Runtime.Coreclr/AssemblyLoader.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyLoader.cs b/Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyLoader.cs
index 35a8ddf..3423d80 100755
--- a/Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyLoader.cs
+++ b/Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyLoader.cs
@@ -29,14 +29,16 @@ namespace Tizen.Runtime.Coreclr
private const string DllAssemblySuffix = ".dll";
+ private const string ExeAssemblySuffix = ".exe";
+
private const string NativeDllAssemblySuffix = NativeAssemblyInfix + DllAssemblySuffix;
- private static readonly string[] s_suffixes = new string[] { NativeDllAssemblySuffix, DllAssemblySuffix };
+ private static readonly string[] s_suffixes = new string[] { NativeDllAssemblySuffix, DllAssemblySuffix, ExeAssemblySuffix };
private SortedSet<string> _dllDirectories = new SortedSet<string>();
private SortedSet<string> _nativeDirectories = new SortedSet<string>();
- private HashSet<FileInfo> _dllCache = new HashSet<FileInfo>();
+ private HashSet<FileInfo> _assemblyCache = new HashSet<FileInfo>();
public AssemblyLoader()
{
@@ -64,9 +66,9 @@ namespace Tizen.Runtime.Coreclr
{
var info = new FileInfo(file);
- if (info.Extension == DllAssemblySuffix)
+ if (s_suffixes.Contains(info.Extension))
{
- _dllCache.Add(info);
+ _assemblyCache.Add(info);
}
}
}
@@ -77,7 +79,7 @@ namespace Tizen.Runtime.Coreclr
_dllDirectories.Remove(directory);
_nativeDirectories.Remove(directory);
- _dllCache.RemoveWhere(x => x.DirectoryName == directory);
+ _assemblyCache.RemoveWhere(x => x.DirectoryName == directory);
}
public Assembly LoadFromPath(string path)
@@ -125,7 +127,7 @@ namespace Tizen.Runtime.Coreclr
{
foreach (string suffix in s_suffixes)
{
- var info = _dllCache.FirstOrDefault(x => x.Name == assemblyName.Name + suffix);
+ var info = _assemblyCache.FirstOrDefault(x => x.Name == assemblyName.Name + suffix);
if (info != null)
{