本文整理汇总了C#中global.JavaCast方法的典型用法代码示例。如果您正苦于以下问题:C# global.JavaCast方法的具体用法?C# global.JavaCast怎么用?C# global.JavaCast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类global
的用法示例。
在下文中一共展示了global.JavaCast方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnSuccess
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);
}
}
示例2: OnSuccess
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);
}
示例3: OnSuccess
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);
// Cache the receipts to file for later use when the network may not be accessible
ToCache(receipts);
}
catch (Exception e)
{
OnFailure(OuyaErrorCodes.ThrowDuringOnSuccess, "Error decrypting receipts: " + e.Message, Bundle.Empty);
}
_tcs.SetResult(receipts);
}
示例4: OnSuccess
public void OnSuccess(global::Java.Lang.Object result)
{
var str = result.JavaCast<Java.Lang.String>();
tcs.SetResult(str.ToString());
}
示例5: OnSuccess
public void OnSuccess(global::Java.Lang.Object result)
{
var str = result.JavaCast<Java.Lang.String>();
var receipts = _purchaseUtils.CreateReceiptsFromResponse(str.ToString());
_tcs.SetResult(receipts);
}
示例6: OnSuccess
public void OnSuccess(global::Java.Lang.Object result)
{
var str = result.JavaCast<Java.Lang.String>();
bool purchaseSucceeded = _purchaseUtils.IsPurchaseResponseMatching(str.ToString(), _product, _uniquePurchaseId);
_tcs.SetResult(purchaseSucceeded);
}
示例7: OnSuccess
public void OnSuccess(global::Java.Lang.Object result)
{
var list = result.JavaCast<JavaList<Product>>();
_tcs.SetResult(list);
}