Beispiel #1
0
    private void RecvResult <R>(BaseModel ret, R result)
    {
        string name = ret.GetType().Name;

        if (ret.Error == Error.None)
        {
            Debug.Log((object)(name + " result:" + result));
            switch (name)
            {
            case "CheckRegisterModel":
            {
                CheckRegisterModel checkRegisterModel = (CheckRegisterModel)ret;
                SetUser(checkRegisterModel.result.userInfo);
                SetAccount(checkRegisterModel.result.uh);
                break;
            }

            case "AssetBundleVersionModel":
            {
                AssetBundleVersionModel assetBundleVersionModel = (AssetBundleVersionModel)ret;
                SetUser(assetBundleVersionModel.result.userInfo);
                break;
            }

            case "RegistCreateModel":
            {
                RegistCreateModel registCreateModel = (RegistCreateModel)ret;
                SetUser(registCreateModel.result.userInfo);
                SetAccount(registCreateModel.result.uh);
                break;
            }

            case "StatusInfoModel":
            {
                OnceStatusInfoModel onceStatusInfoModel = (OnceStatusInfoModel)ret;
                SetUser(onceStatusInfoModel.result.user);
                break;
            }
            }
        }
        else
        {
            Debug.LogError((object)(name + " error:" + ret.Error));
            MonoBehaviourSingleton <AccountManager> .I.ClearAccount();
        }
        if (MonoBehaviourSingleton <UserInfoManager> .I.userInfo != null)
        {
            m_progress = PROGRESS.REGIST_OK;
        }
        else
        {
            m_progress++;
        }
        Debug.Log((object)("progress:" + m_progress));
        m_isSending = false;
    }
 public async Task <bool> EmailExistAsync(CheckRegisterModel model)
 {
     return(await _userManager.FindByEmailAsync(model.Email) == null);
 }
Beispiel #3
0
 public async Task <bool> EmailExist([FromBody] CheckRegisterModel model)
 {
     return(await this._auth.EmailExistAsync(model));
 }