コード例 #1
0
        public static async Task <SoundCloudSessionStatus> LoginAsync()
        {
            try
            {
                var result = await _authClient.LoginAsync("non-expiring");

                if (result.Status == SoundCloudSessionStatus.Connected)
                {
                    _session = result.Session;
                }

                return(result.Status);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex.InnerException);
            }
        }
コード例 #2
0
        public static async Task <SoundCloudSessionStatus> GetSessionStatusAsync()
        {
            try
            {
                var result = await _authClient.InitializeAsync();

                if (result.Status == SoundCloudSessionStatus.Connected)
                {
                    _session = result.Session;
                }

                return(result.Status);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex.InnerException);
            }
        }