Ejemplo n.º 1
0
 public UserGetCardWeChatMsgBehavior(
     IOrchardServices os,
     IWxUserService userService,
     IWeChatApi weChat,
     ICardCouponService ccService)
     : base(os)
 {
     this.WxUserService = userService;
     this.WeChat        = weChat;
     this.CardCoupon    = ccService;
     Logger             = NullLogger.Instance;
 }
Ejemplo n.º 2
0
        // Our connector
        // We load this first. See the ini [Startup] ServiceConnectors
        // We give the port we want our applications to connect to us, the
        // name of the dll (determined by the "name=Wx.Connector" in the
        // WxConnectors/prebuild.xml) and the name of the class in the
        // dll assembly that we want to use...
        // ServiceConnectors = "8114/Wx.Connector.dll:WxServiceConnector"
        //
        // In the [Network] section we have configured an ssl port on 8114
        // So, we will use https://* to talk to our application server.
        //
        // We load our Wx.Service (see: Wx.Service/Wx.ServiceBase)
        //
        // Then we pass our server the handler that is given the Wx.Service
        //
        public WxUserServiceConnector(IConfigSource config, IHttpServer server, string configName)
            : base(config, server, configName)
        {
            IConfig serverConfig = config.Configs[m_ConfigName];
            if (serverConfig == null)
                throw new Exception(String.Format("No section {0} in config file", m_ConfigName));

            string WxUserService = serverConfig.GetString("LocalServiceModule",
                    String.Empty);

            if (WxUserService == String.Empty)
                throw new Exception("No LocalServiceModule in config file");

            Object[] args = new Object[] { config };
            m_WxUserService = ServerUtils.LoadPlugin<IWxUserService>(WxUserService, args);

            server.AddStreamHandler(new WxUsersHandler(m_WxUserService));
        }
Ejemplo n.º 3
0
 public EnjoyController(
     IOrchardServices os,
     IEnjoyAuthService auth,
     IWeChatApi wechat,
     IMerchantService merchant,
     IWxUserService wxUserService,
     IShopService shop,
     ICardCouponService cardCoupon,
     IWeChatMsgHandler handler)
 {
     this._authService       = auth;
     this._os                = os;
     this._merchantService   = merchant;
     this._weChat            = wechat;
     this.Logger             = NullLogger.Instance;
     this._handler           = handler;
     this._wxUserService     = wxUserService;
     this._shopservice       = shop;
     this._cardCouponService = cardCoupon;
 }
Ejemplo n.º 4
0
        // Our connector
        // We load this first. See the ini [Startup] ServiceConnectors
        // We give the port we want our applications to connect to us, the
        // name of the dll (determined by the "name=Wx.Connector" in the
        // WxConnectors/prebuild.xml) and the name of the class in the
        // dll assembly that we want to use...
        // ServiceConnectors = "8114/Wx.Connector.dll:WxServiceConnector"
        //
        // In the [Network] section we have configured an ssl port on 8114
        // So, we will use https://* to talk to our application server.
        //
        // We load our Wx.Service (see: Wx.Service/Wx.ServiceBase)
        //
        // Then we pass our server the handler that is given the Wx.Service
        //
        public WxUserServiceConnector(IConfigSource config, IHttpServer server, string configName)
            : base(config, server, configName)
        {
            IConfig serverConfig = config.Configs[m_ConfigName];

            if (serverConfig == null)
            {
                throw new Exception(String.Format("No section {0} in config file", m_ConfigName));
            }

            string WxUserService = serverConfig.GetString("LocalServiceModule",
                                                          String.Empty);

            if (WxUserService == String.Empty)
            {
                throw new Exception("No LocalServiceModule in config file");
            }

            Object[] args = new Object[] { config };
            m_WxUserService = ServerUtils.LoadPlugin <IWxUserService>(WxUserService, args);

            server.AddStreamHandler(new WxUsersHandler(m_WxUserService));
        }
Ejemplo n.º 5
0
 //
 // Here we go...
 //
 // WxServiceConnector creates an instance of our WxService and hands it to us
 // as it creates our instance...
 // Our instance gets passed to the server, then we're live and ready for action
 //
 public WxUsersHandler(IWxUserService service)
     : base("POST", "/WxUser")
 {
     m_WxService = service;
     m_log.Info("[WxUsersHandler]: Loading");
 }
 public JwtAccountController(IUserService userService, IConfiguration configuration, IWxUserService wxUserService)
 {
     _userService   = userService;
     _configuration = configuration;
     _wxUserService = wxUserService;
 }
Ejemplo n.º 7
0
 public WxUserController(IWxUserService _service, IWxUserTagService _tagService, IWxAccountService _accountService)
 {
     this.service        = _service;
     this.tagService     = _tagService;
     this.accountService = _accountService;
 }
Ejemplo n.º 8
0
 public UserSyncModel(IWxUserService service, IWxAccountService accountService)
 {
     _service        = service;
     _accountService = accountService;
 }
Ejemplo n.º 9
0
 public UserController(IWxUserService wxUserService)
 {
     this.wxUserService = wxUserService;
 }
Ejemplo n.º 10
0
 //
 // Here we go...
 //
 // WxServiceConnector creates an instance of our WxService and hands it to us
 // as it creates our instance...
 // Our instance gets passed to the server, then we're live and ready for action
 //
 public WxUsersHandler(IWxUserService service) : base("POST", "/WxUser")
 {
     m_WxService = service;
     m_log.Info("[WxUsersHandler]: Loading");
 }
Ejemplo n.º 11
0
 public DetailModel(IWxUserService service)
 {
     this._service = service;
 }
Ejemplo n.º 12
0
 public RemarkModel(IWxUserService service)
 {
     this._service = service;
 }
Ejemplo n.º 13
0
 public IndexModel(IWxUserService service, IWxAccountService accountService)
 {
     _service        = service;
     _accountService = accountService;
 }