Beispiel #1
0
    protected override void Init()
    {
#if UNITY_IPHONE && !UNITY_EDITOR
        send = new SendSMSIOS();
#elif UNITY_ANDROID && !UNITY_EDITOR
        send = new SendSMSAndroid();
#else
        send = new SendSMSEditor();
#endif
    }
Beispiel #2
0
 /// <summary>
 /// 发送短信
 /// </summary>
 /// <param name="mobiles">手机号码</param>
 /// <param name="content">内容</param>
 /// <returns>发送结果:0-成功;其他-错误信息</returns>
 public static string SendMessage(string mobiles, string content)
 {
     MyConfig = GetConfig();
     if (MyConfig != null)
     {
         ISendSMS iSend = (ISendSMS)MyConfig.TheClass;
         iSend.Config = MyConfig.ConfigString;
         return(iSend.Send(mobiles, content));
     }
     else
     {
         return("无法加载短信网关配置信息,请检查sms.config配置文件是否正确。");
     }
 }
Beispiel #3
0
        public AccountController(UserManager <ApplictionUser> userManger,
                                 SignInManager <ApplictionUser> signInManager,
                                 ILogger <AccountController> logger,
                                 GoogleReCAPTCHAService googleReCAPTCHAService,
                                 IEmailSender emailSender,
                                 ISendSMS sendSMS)

        {
            this.userManger             = userManger;
            this.signInManager          = signInManager;
            this.logger                 = logger;
            this.googleReCAPTCHAService = googleReCAPTCHAService;
            this.emailSender            = emailSender;
            this.sendSMS                = sendSMS;
        }