public UnityController(IUnityContainer container, ICityService cityService, IAccountService accountService, IMembershipService membershipService, ISetWeChatService setWeChatService, SecurityHelper securityHelper) { _container = container; _cityService = cityService; _accountService = accountService; _membershipService = membershipService; _setWeChatService = setWeChatService; _securityHelper = securityHelper; }
// GET: /InvestGame/ public WeixinController(IUnityContainer container, ISetWeChatService setWeChatService) { //var config = System.Web.HttpContext.Current.Server.MapPath("~/log4net.config"); ////string config = Path.GetDirectoryName(typeof(HomeController).Assembly.Location) + "\\log4net.config"; //var repository = new FileInfo(config); //XmlConfigurator.Configure(repository); ////logService = new LogService(); //logService = log4net.LogManager.GetLogger(typeof(HomeController)); _container = container; SetWeChatService = setWeChatService; //SetWeChat = SetWeChatService.GetById(1); //if (SetWeChat != null) //{ // Token = SetWeChat.token; // AppId = SetWeChat.appID; //} SetWeChat = new SetWeChat(); Token = WxPayConfig.TOKEN; AppId = WxPayConfig.APPID; }