private void getLinkedCards() { checkCredentials(); log(DIVIDER); Task.Factory.StartNew(() => { log("GET LINKED CARDS"); try { var result = m_PaymentController.GetLinkedCards(); if (result != null && result.ErrorCode == 0) { m_LinkedCards = result.LinkedCards; log(JsonConvert.SerializeObject(result, Formatting.Indented)); } else { log(string.Format("GET LINKED CARDS ERROR : {0}({1})", (result == null ? "null" : result.ErrorMessage), (result == null ? "null" : result.ErrorCode.ToString()))); } } catch (InvalidOperationException e) { log(string.Format("ERROR : {0}", e.Message)); return; } }); }