Esempio n. 1
0
        private static IGetSocialNativeBridge FindBridgeImplementation(AvailableRuntimes currentRuntime)
        {
            var type       = typeof(IGetSocialNativeBridge);
            var nativeImpl = AppDomain.CurrentDomain.GetAssemblies()
                             .SelectMany(s => s.GetTypes())
                             .Where(p => type.IsAssignableFrom(p) && !p.IsAbstract)
                             .Select(implementation => (IGetSocialNativeBridge)Activator.CreateInstance(implementation))
                             .FirstOrDefault(impl => impl.RuntimeImplementation.Contains(currentRuntime));

            return(nativeImpl);
        }
Esempio n. 2
0
 bool IRuntimeFrameworkService.IsAvailable(string framework)
 {
     return(AvailableRuntimes.Contains(framework));
 }