Esempio n. 1
0
        public static IPlatform Platform(this HttpRequest request)
        {
            var service  = new UserAgentService(request.HttpContext);
            var resolver = new PlatformResolver(service);

            return(resolver.Platform);
        }
        private static void RegisterIfFound <T>()
        {
            var type = PlatformResolver.ResolveImplementation <T>();

            if (type == null)
            {
                return;
            }
            ServiceLocator.Register <T>(type);
        }
        static DispatcherHelper()
        {
            Type type = PlatformResolver.ResolveImplementation <IDispatcher>();

            if (type == null)
            {
                return;
            }
            Default = (IDispatcher)Activator.CreateInstance(type);
        }
Esempio n. 4
0
 public Distribution(Version version) : this(version, PlatformResolver.Resolve(), RuntimeInformation.OSArchitecture)
 {
 }