Esempio n. 1
0
        public string Index()
        {
            MsgContainer.Output = string.Empty;

            MsgContainer.Append("开始运行");
            var cb = new ContainerBuilder();

            cb.RegisterModule <CoreModule>();
            cb.RegisterModule <SmsCoreModule>();
            cb.RegisterModule <ConsoleSmsModule>();
            cb.RegisterModule <HttpApiSmsModule>();

            var container = cb.Build();

            var userBll = container.Resolve <IUserBll>();
            var login   = userBll.Login("yueluo", "newbe");

            MsgContainer.Append(login);

            login = userBll.Login("newbe", "yueluo");
            MsgContainer.Append(login);

            MsgContainer.Append("结束运行");


            return(MsgContainer.Output);
        }
Esempio n. 2
0
 public void Send(string phone, string message)
 {
     MsgContainer.Append(string.Format("已调用API给{0}发送消息:{1}", phone, message));
 }