Example #1
0
        public async Task <bool> AutoLogin()
        {
            try
            {
                LiveConnectSession Session;
                this.handler        = new RefreshTokenHandler();
                this.LiveAuthClient = new LiveAuthClient(this.ClientID, this.handler);
                LiveConnectSession s = this.LiveAuthClient.InitializeAsync().Result.Session;

                if (this.handler != null)
                {
                    Session = s;
                    this.liveConnectClient = new LiveConnectClient(Session);
                    return(true);
                }
                else
                {
                    Session = null;
                    return(false);
                }
            }
            catch (Exception) { }


            return(false);
        }
 public void clearClients()
 {
     this.LiveAuthClient = null;
     this.liveConnectClient = null;
     this.handler = null;
 }
        public async Task<bool> AutoLogin()
        {
            try
            {
                LiveConnectSession Session;
                this.handler = new RefreshTokenHandler();
                this.LiveAuthClient = new LiveAuthClient(this.ClientID, this.handler);
                LiveConnectSession s = this.LiveAuthClient.InitializeAsync().Result.Session;

                if (this.handler != null)
                {

                    Session = s;
                    this.liveConnectClient = new LiveConnectClient(Session);
                    return true;
                }
                else
                {
                    Session = null;
                    return false;
                }
            }
            catch (Exception) { }


            return false;


        }
Example #4
0
 public void clearClients()
 {
     this.LiveAuthClient    = null;
     this.liveConnectClient = null;
     this.handler           = null;
 }