public Stream GetQRCodeImage(string clientId) { if (CacheUtil.Exists(clientId) == false) { return(null); } MyQQEntity myQQEntity = new MyQQEntity(); myQQEntity.IsInitialized = false; myQQEntity.Online = MyQQEntity.OnlineStatus.None; CacheUtil.Update(clientId, myQQEntity); return(loginService.GetQRCodeStream()); }
public ResponseWrapper <string> GetClientId() { ResponseWrapper <string> response = new ResponseWrapper <string>(); string clientId = TokenUtil.NewToken(); MyQQEntity myQQEntity = new MyQQEntity(); myQQEntity.ClientID = clientId; myQQEntity.Online = MyQQEntity.OnlineStatus.None; CacheUtil.Add(clientId, myQQEntity); response.ReturnCode = 1; response.Message = "Get client id successfully."; response.InnerMessage = "Please remember to append the client id value for the next api request."; response.Result = clientId; return(response); }