public static void GetMetaData(AssetStorePublisher account, PackageDataSource packageDataSource, AssetStoreAPI.DoneCallback callback) { AssetStoreClient.CreatePendingGet("metadata", "/metadata/0", delegate(AssetStoreResponse res) { DebugUtils.Log(res.data); string errorMessage; JSONValue jval; bool flag = AssetStoreAPI.Parse(res, out errorMessage, out jval); if (flag && !jval.ContainsKey("error_fields")) { callback(errorMessage); return; } string str = "none"; try { str = "account"; string text = AssetStoreAPI.OnAssetStorePublisher(jval, account, packageDataSource); if (text != null) { callback(text); return; } } catch (JSONTypeException ex) { callback("Malformed metadata response from server: " + str + " - " + ex.Message); } catch (KeyNotFoundException ex2) { callback("Malformed metadata response from server. " + str + " - " + ex2.Message); } callback(null); }); }
public static void GetMetaData(AssetStorePublisher account, PackageDataSource packageDataSource, AssetStoreAPI.DoneCallback callback) { AssetStoreClient.CreatePendingGet("metadata", "/metadata/0", (AssetStoreResponse res) => { string str; JSONValue jSONValue; DebugUtils.Log(res.data); if (AssetStoreAPI.Parse(res, out str, out jSONValue) && !jSONValue.ContainsKey("error_fields")) { callback(str); return; } string str1 = "none"; try { str1 = "account"; string str2 = AssetStoreAPI.OnAssetStorePublisher(jSONValue, account, packageDataSource); if (str2 != null) { callback(str2); return; } } catch (JSONTypeException jSONTypeException) { callback(string.Concat("Malformed metadata response from server: ", str1, " - ", jSONTypeException.Message)); } catch (KeyNotFoundException keyNotFoundException) { callback(string.Concat("Malformed metadata response from server. ", str1, " - ", keyNotFoundException.Message)); } callback(null); }); }