Esempio n. 1
0
        /// <summary>
        /// ActivateSigleTonData
        /// </summary>
        public static void ActivateSigleTonData()
        {
            IJsonServices jsServices = UnityManager.Resolve <IJsonServices>();
            var           model      = jsServices.BasicCallAsync().GetAwaiter().GetResult();

            AirportData = model;
        }
        protected override IController  GetControllerInstance(System.Web.Routing.RequestContext requestContext, Type controllerType)
        {
            if (controllerType == null)
            {
                throw new HttpException(404, String.Format("The controller for path '{0}' could not be found" + "or it does not implement IController.", requestContext.HttpContext.Request.Path));
            }

            if (!typeof(IController).IsAssignableFrom(controllerType))
            {
                throw new UnityControllerFactoryException(string.Format("Failed to create an instance of the controller from a non controller type was '{0}'", controllerType.AssemblyQualifiedName));
            }

            var obj = UnityManager.Resolve(controllerType);

            return(obj as IController);
        }
Esempio n. 3
0
 static CompareService()
 {
     Log = UnityManager.Resolve <ILogger>();
 }