//--- (end of generated code: YFileRecord definitions) public YFileRecord(string data) { YAPI.TJsonParser p; Nullable<YAPI.TJSONRECORD> node; //--- (generated code: YFileRecord attributes initialization) //--- (end of generated code: YFileRecord attributes initialization) p = new YAPI.TJsonParser(data, false); node = p.GetChildNode(null, "name"); this._name = node.Value.svalue; node = p.GetChildNode(null, "size"); this._size = (int)node.Value.ivalue; node = p.GetChildNode(null, "crc"); this._crc = (int)node.Value.ivalue; }
//--- (end of generated code: YFileRecord definitions) public YFileRecord(string data) { YAPI.TJsonParser p; Nullable <YAPI.TJSONRECORD> node; //--- (generated code: YFileRecord attributes initialization) //--- (end of generated code: YFileRecord attributes initialization) p = new YAPI.TJsonParser(data, false); node = p.GetChildNode(null, "name"); this._name = node.Value.svalue; node = p.GetChildNode(null, "size"); this._size = (int)node.Value.ivalue; node = p.GetChildNode(null, "crc"); this._crc = (int)node.Value.ivalue; }
//--- (end of generated code: YWlanRecord definitions) public YWlanRecord(string data) { YAPI.TJsonParser p; Nullable <YAPI.TJSONRECORD> node; //--- (generated code: YWlanRecord attributes initialization) //--- (end of generated code: YWlanRecord attributes initialization) p = new YAPI.TJsonParser(data, false); node = p.GetChildNode(null, "ssid"); this._ssid = node.Value.svalue; node = p.GetChildNode(null, "sec"); this._sec = node.Value.svalue; node = p.GetChildNode(null, "rssi"); this._rssi = (int)node.Value.ivalue; node = p.GetChildNode(null, "channel"); this._channel = (int)node.Value.ivalue; }
// Token: 0x060000B5 RID: 181 RVA: 0x000058E8 File Offset: 0x00003AE8 public int load(int msValidity) { YAPI.YDevice dev = null; string errmsg = ""; YAPI.TJsonParser apires = null; string errbuf = ""; string funcId = ""; int devdesc = 0; string serial = ""; string funcName = ""; string funcVal = ""; YAPI.TJSONRECORD?node = null; int res = this._getDevice(ref dev, ref errmsg); if (YAPI.YISERR(res)) { this._throw(res, errmsg); return(res); } res = dev.requestAPI(out apires, ref errmsg); if (YAPI.YISERR(res)) { this._throw(res, errmsg); return(res); } int fundescr = YAPI.yapiGetFunction(this._className, this._func, ref errmsg); if (YAPI.YISERR(fundescr)) { this._throw(res, errmsg); return(fundescr); } devdesc = 0; res = YAPI.yapiGetFunctionInfo(fundescr, ref devdesc, ref serial, ref funcId, ref funcName, ref funcVal, ref errbuf); if (YAPI.YISERR(res)) { this._throw(res, errmsg); return(res); } node = apires.GetChildNode(null, funcId); if (node == null) { this._throw(-8, "unexpected JSON structure: missing function " + funcId); return(-8); } this._parse(node.GetValueOrDefault()); this._cacheExpiration = YAPI.GetTickCount() + (long)msValidity; return(0); }
//--- (end of generated code: YWlanRecord definitions) public YWlanRecord(string data) { YAPI.TJsonParser p; Nullable<YAPI.TJSONRECORD> node; //--- (generated code: YWlanRecord attributes initialization) //--- (end of generated code: YWlanRecord attributes initialization) p = new YAPI.TJsonParser(data, false); node = p.GetChildNode(null, "ssid"); this._ssid = node.Value.svalue; node = p.GetChildNode(null, "sec"); this._sec = node.Value.svalue; node = p.GetChildNode(null, "rssi"); this._rssi = (int)node.Value.ivalue; node = p.GetChildNode(null, "channel"); this._channel = (int)node.Value.ivalue; }