public virtual void parse(String json) { if (!result.ok()) { // RestAPI 如果不是200,说明返回内容有“错误”,此时解析内容 var raw = (IDictionary <String, Object>)JsonAdapter.JSON.ToObject(json); var status = BmobInput.Parse <Status>(raw); this.exception = new BmobException(status.code == null ? result : status); this.data = default(T); } else { var type = typeof(T); if (type.IsArray || typeof(IList).IsAssignableFrom(type)) { // batch or ... var raw = (IList)JsonAdapter.JSON.ToObject(json); this.data = BmobInput.Parse <T>(raw); } else { // 解析[CRUD]的返回值对象 var raw = (IDictionary <String, Object>)JsonAdapter.JSON.ToObject(json); this.data = BmobInput.Parse <T>(raw); } } }
public override void readFields(BmobInput input) { base.readFields(input); this.code = input.getInt("code"); this.message = input.getString("message"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); this.ParentId = input.getString("ParentId"); this.Name = input.getString("Name"); }
public override void readFields(BmobInput input) { base.readFields(input); this.life = input.getInt("life"); this.attack = input.getInt("attack"); }
//public Image Image //{ // get // { // return // } //} public override void readFields(BmobInput input) { base.readFields(input); this.filename = input.getString("filename"); this.group = input.getString("group"); this.url = input.getString("url"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); this.sex = input.getBoolean("sex"); this.age = input.getInt("age"); }
public virtual void parse(String json) { if (!result.ok()) { this.exception = new BmobException(result.ToString()); this.data = default(T); } else { var type = typeof(T); if (type.IsArray || typeof(IList).IsAssignableFrom(type)) { // batch or ... var raw = (IList)JsonAdapter.JSON.ToObject(json); this.data = BmobInput.Parse <T>(raw); } else { // 解析[CRUD]的返回值对象 var raw = (IDictionary <String, Object>)JsonAdapter.JSON.ToObject(json); this.data = BmobInput.Parse <T>(raw); } } }
public override void readFields(BmobInput input) { base.readFields(input); Name = input.getString("Name"); Description = input.getString("Description"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); this.url = input.getFile("url"); this.user = input.getString("user"); }
public override void readFields(BmobInput input) { base.readFields(input); pos_x = input.getDouble("pos_x"); pos_y = input.getDouble("pos_y"); pos_z = input.getDouble("pos_z"); rot_w = input.getDouble("rot_w"); rot_x = input.getDouble("rot_x"); rot_y = input.getDouble("rot_y"); rot_z = input.getDouble("rot_z"); scale_x = input.getDouble("scale_x"); scale_y = input.getDouble("scale_y"); scale_z = input.getDouble("scale_z"); type = input.getInt("type"); text = input.getString("text"); texture = input.getFile("texture"); video = input.getFile("video"); model = input.Get <BmobPointer <BmobModel> >("model"); mark = input.Get <BmobPointer <Mark> >("mark"); version = input.getInt("version"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); this.name = input.getString("Name"); this.hp = input.getString("Hp"); this.apk = input.getString("Apk"); }
public object PostFile([FromBody] Resource_View resourceView) { HttpCookie cookie1 = HttpContext.Current.Request.Cookies["CurrentCourse"]; String id = cookie1["CourseId"]; int courseId = int.Parse(id); String a = ""; // String objectId = ""; Resource resource = new Resource(); resource.id = BmobInput.Parse <BmobInt>(resourceView.id); resource.file = resourceView.file; resource.type = resourceView.type; resource.courseId = BmobInput.Parse <BmobInt>(courseId); resource.unitId = BmobInput.Parse <BmobInt>(resourceView.unitId); resource.knowledgeId = BmobInput.Parse <BmobInt>(resourceView.knowledgeId); //var query = new BmobQuery(); //query.WhereEqualTo("id", course.id); var f = Bmob.CreateTaskAsync("Resource", resource); try { a = f.Result.objectId; } catch { a = "失败"; } return(a); }
} //分数 //----------------------------------------------------------------- /// <summary> /// 重写读数据的方法 /// </summary> public override void readFields(BmobInput input) { base.readFields(input); this.playerName = input.getString("playerName"); this.score = input.getInt("score"); }
public override void parse(String json) { // 文件上传返回值 var raw = (IDictionary <String, Object>)JsonAdapter.JSON.ToObject(json); var firstR = get(raw, "r"); if (firstR == null) { throw newPaserException(json); } bool isok = firstR is IDictionary <String, Object>; object secondR = null; if (isok) { secondR = get(firstR as IDictionary <String, Object>, "r"); } if (secondR == null || !(secondR is IDictionary || secondR is IDictionary <String, Object>)) { this.exception = new BmobException("文件上传失败!"); this.data = default(T); } else { this.data = BmobInput.Parse <T>(secondR as IDictionary <String, Object>); } }
/// <summary> /// 把服务端返回的数据转化为本地对象值 /// </summary> /// <param name="input"></param> public override void readFields(BmobInput input) { base.readFields(input); userName = input.Get <string> ("username"); coin = input.Get <int> ("coin"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); enabled = input.getBoolean("enabled"); status = input.getInt("status"); }
public override void readFields(BmobInput input) { base.readFields(input); this.id = input.getString("id"); this.data = input.getString("data"); }
public override void readFields(BmobInput input) { base.readFields(input); this.password = input.getInt("password"); this.userid = input.getString("userid"); }
public override void readFields(BmobInput input) { base.readFields(input); this.userId = input.getString("userId"); this.content = input.getString("content"); }
public object PostFile([FromBody] Course_View cl) { String a = ""; String objectId = ""; Course course = new Course(); course.id = BmobInput.Parse <BmobInt>(cl.id); course.name = cl.name; course.program = cl.program; course.experiment = cl.experiment; course.time = cl.time; var query = new BmobQuery(); query.WhereEqualTo("id", course.id); var f = Bmob.FindTaskAsync <Course>("Course", query); try { objectId = f.Result.results[0].objectId; var future = Bmob.UpdateTaskAsync("Course", objectId, course); a = future.Result.updatedAt; } catch { a = "失败"; } return(a); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); objectId = input.getString("objectId"); price = input.getDouble("price"); count = input.getInt("count"); }
public override void readFields(BmobInput input) { base.readFields(input); userId = input.getString("userId"); jinBiCaoZuo = input.getString("jinBiCaoZuo"); beiZhu = input.getString("beiZhu"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); mainCategory = input.getString("mainCategory"); photoUrl = input.getString("photoUrl"); photoName = input.getString("photoName"); name = input.getString("name"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); this.userId = input.getString("userId"); this.test = input.getString("test"); //this.playerName = input.getString("playerName"); }
public override void readFields(BmobInput input) { base.readFields(input); LeftTime = input.getDate("LeftTime"); DeviceId = input.Get <string>("DeviceId"); CURL = input.Get <string>("CURL"); ProductId = input.Get <string>("ProductId"); }
public override void readFields(BmobInput input) { base.readFields(input); this.username = input.getString("username"); this.password = input.getString("password"); this.user = input.Get <BmobPointer <UserExt> >("user"); }
public override void readFields(BmobInput input) { base.readFields(input); this.name = input.getString("name"); this.users = input.Get<BmobRelation<BmobUser>>("users"); this.roles = input.Get<BmobRelation<BmobRole>>("roles"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); this.Title = input.getString("Title"); this.Code = input.getString("Code"); this.Author = input.getString("Author"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); this.score = input.getInt("score"); this.cheatMode = input.getBoolean("cheatMode"); this.playerName = input.getString("playerName"); }
public override void readFields(BmobInput input) { base.readFields(input); this.hongBaoId = input.getString("hongBaoId"); this.jine = input.getString("jine"); this.userId = input.getString("userId"); this.hongBaoType = input.getString("hongBaoType"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); this.username = input.getString("username"); this.Name = input.getString("Name"); this.Password = input.getString("Password"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); //读取属性值 this.id = input.getInt("id"); this.name = input.getString("name"); this.courseId = input.getInt("courseId"); }
public override void readFields(BmobInput input) { base.readFields(input); foreach (var key in input.keySet()) { kvs.Add(key, input.getRaw(key)); } }
/// <summary> /// 成员函数 /// </summary> /// <param name="input"></param> public override void readFields(BmobInput input) { base.readFields(input); //读取相应的字段 this.objectId = input.getString("objectId"); this.playerName = input.getString("PlayerName"); this.score = input.getInt("PlayerScore"); this.id = input.getInt("Id"); }
public override void readFields(BmobInput input) { base.readFields(input); this.username = input.getString("username"); this.password = input.getString("password"); this.email = input.getString("email"); this.sessionToken = input.getString("sessionToken"); this.emailVerified = input.getBoolean("emailVerified"); }
public override void readFields(BmobInput input) { base.readFields(input); this.arrint = input.getList<int>("arrint"); this.arrstring = input.getList<string>("arrstring"); this.jo = input.getInt("jo"); this.jo2 = input.getInt("jo2"); this.obj = input.getInt("obj"); this.s = input.getString("s"); }
public override void readFields(BmobInput input) { base.readFields(input); this.badge = input.getInt("badge"); this.channels = input.getList<String>("channels"); this.timeZone = input.getString("timeZone"); this.deviceType = input.getString("deviceType"); this.installationId = input.getString("installationId"); this.deviceToken = input.getString("deviceToken"); this.notificationUri = input.getString("notificationUri"); this.deviceId = input.getString("deviceId"); }
//读字段信息 public override void readFields(BmobInput input) { base.readFields(input); this.Id = input.getString(nameof(this.Id)); this.Date = input.getDate(nameof(this.Date)); this.Level = input.getString(nameof(this.Level)); this.Logger = input.getString(nameof(this.Logger)); this.Category = input.getString(nameof(this.Category)); this.Message = input.getString(nameof(this.Message)); this.Note = input.getString(nameof(this.Note)); this.Request = input.getString(nameof(this.Request)); this.Response = input.getString(nameof(this.Response)); this.Position = input.getString(nameof(this.Position)); }
public override void readFields(BmobInput input) { this.sms_state = input.getString("sms_state"); this.verify_state = input.getBoolean("verify_state"); }
public override void readFields(BmobInput input) { this.msg = input.getString("msg"); }
public override void readFields(BmobInput input) { this.smsId = input.getInt("smsId"); }
public override void readFields(BmobInput input) { base.readFields(input); this.file = input.getString("file"); }
public override void readFields(BmobInput input) { base.readFields(input); name = input.getString("name"); }
public override void readFields(BmobInput input) { base.readFields(input); this.username = input.getString("username"); this.password = input.getString("password"); this.user = input.Get<BmobPointer<UserExt>>("user"); }
public override void readFields(BmobInput input) { base.readFields (input); this.life = input.getInt ("life"); this.attack = input.getInt ("attack"); }
public override void readFields(BmobInput input) { this.latitude = input.getDouble("latitude"); this.longitude = input.getDouble("longitude"); }
public override void readFields(BmobInput input) { base.readFields(input); this.level = input.getString("level"); }
public override void readFields(BmobInput input) { this.updatedAt = input.getString("updatedAt"); }
public override void readFields(BmobInput input) { this.timestamp = input.getInt("timestamp"); this.datetime = input.getString("datetime"); }
public override void readFields(BmobInput input) { base.readFields(input); }
public virtual void readFields(BmobInput input) { }
public override void readFields(BmobInput input) { base.readFields(input); friendNames = input.getString("friends"); }
public override void readFields(BmobInput input) { this.iso = input.getString("iso"); }
public override void readFields(BmobInput input) { this.createdAt = input.getString("createdAt"); this.objectId = input.getString("objectId"); }