summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs')
-rw-r--r--Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs24
1 files changed, 20 insertions, 4 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs b/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
index a34c2faa..7b07a31a 100644
--- a/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
+++ b/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
@@ -183,14 +183,30 @@ namespace Xamarin.Forms.Platform.Tizen
_assemblies = new List<Assembly>();
// Add this renderer assembly to the list
- RegisterAssembly(GetType().GetTypeInfo().Assembly);
+ _assemblies.Add(GetType().GetTypeInfo().Assembly);
}
- internal void RegisterAssembly(Assembly asm)
+ internal void RegisterAssemblyRecursively(Assembly asm)
{
- if (!_assemblies.Contains(asm))
+ if (_assemblies.Contains(asm))
+ return;
+
+ _assemblies.Add(asm);
+
+ foreach (var refName in asm.GetReferencedAssemblies())
{
- _assemblies.Add(asm);
+ if (!refName.Name.StartsWith("System.") && !refName.Name.StartsWith("Microsoft.") && !refName.Name.StartsWith("mscorlib"))
+ {
+ try
+ {
+ Assembly refAsm = Assembly.Load(refName);
+ RegisterAssemblyRecursively(refAsm);
+ }
+ catch
+ {
+ Log.Warn("Reference Assembly can not be loaded. {0}", refName.FullName);
+ }
+ }
}
}