Inheritance: global::Java.Lang.Object, IOuyaResponseListener
Exemplo n.º 1
0
        public async Task <string> RequestGamerUuidAsync()
        {
            if (!String.IsNullOrEmpty(_gamerUuid))
            {
                return(_gamerUuid);
            }
            var tcs      = new TaskCompletionSource <string>();
            var listener = new GamerUuidListener(tcs);

            try
            {
                RequestGamerUuid(listener);
                _gamerUuid = await tcs.Task.TimeoutAfter(timeout);
            }
            catch (Exception e)
            {
                Log(e.GetType().Name + ": " + e.Message);
                _gamerUuid = GamerUuidListener.FromCache();
            }
            return(_gamerUuid);
        }
Exemplo n.º 2
0
 public async Task<string> RequestGamerUuidAsync()
 {
     if (!String.IsNullOrEmpty(_gamerUuid))
         return _gamerUuid;
     var tcs = new TaskCompletionSource<string>();
     var listener = new GamerUuidListener(tcs);
     try
     {
         RequestGamerUuid(listener);
         _gamerUuid = await tcs.Task.TimeoutAfter(timeout);
     }
     catch (Exception e)
     {
         Log(e.GetType().Name + ": " + e.Message);
         _gamerUuid = GamerUuidListener.FromCache();
     }
     return _gamerUuid;
 }