public void OnSuccess(global::Java.Lang.Object result) { var str = result.JavaCast <Java.Lang.String>().ToString(); using (var helper = new OuyaEncryptionHelper()) { var response = new JSONObject(str); var id = helper.DecryptPurchaseResponse(response, _publicKey); if (id != _uniquePurchaseId) { OnFailure(OuyaErrorCodes.ThrowDuringOnSuccess, "Received purchase ID does not match what we expected to receive", Bundle.Empty); } _tcs.SetResult(true); } }
public void OnSuccess(global::Java.Lang.Object result) { var gamerInfo = result.JavaCast <GamerInfo>(); try { // Cache the gamerInfo to file for later use when the network may not be accessible ToCache(gamerInfo); } catch (Exception e) { OnFailure(OuyaErrorCodes.ThrowDuringOnSuccess, "Error retrieving gamerInfo: " + e.Message, Bundle.Empty); } _tcs.SetResult(gamerInfo); }
public void OnSuccess(global::Java.Lang.Object result) { var str = result.JavaCast <Java.Lang.String>().ToString(); // Parse receipts into a list IList <Receipt> receipts = null; try { receipts = ReceiptsFromResponse(str, _publicKey); // Cache the receipts to file for later use when the network may not be accessible ToCache(receipts, _gamerUuid); } catch (Exception e) { OnFailure(OuyaErrorCodes.ThrowDuringOnSuccess, "Error decrypting receipts: " + e.Message, Bundle.Empty); } _tcs.SetResult(receipts); }
public void OnSuccess(global::Java.Lang.Object result) { var str = result.JavaCast <Java.Lang.String>().ToString(); // Parse gamerUuid into string string gamerUuid = string.Empty; try { gamerUuid = str; // Cache the gamerUuid to file for later use when the network may not be accessible ToCache(gamerUuid); } catch (Exception e) { OnFailure(OuyaErrorCodes.ThrowDuringOnSuccess, "Error retrieving gamerUuid: " + e.Message, Bundle.Empty); } _tcs.SetResult(gamerUuid); }
public void OnSuccess(global::Java.Lang.Object result) { var str = result.JavaCast <Java.Lang.String>(); tcs.SetResult(str.ToString()); }
int global::Java.Lang.IComparable.CompareTo(global::Java.Lang.Object another) { return(CompareTo(another.JavaCast <global::EstimoteMgmtSdk.Feature.Settings.Mapping.Version> ())); }
public void OnSuccess(global::Java.Lang.Object result) { var list = result.JavaCast <JavaList <Product> >(); _tcs.SetResult(list); }
int global::Java.Lang.IComparable.CompareTo(global::Java.Lang.Object p0) { Version p0Cast = p0 == null ? null : p0.JavaCast <Version> (); return(this.CompareTo(p0Cast)); }