mirror of
https://github.com/esiur/esiur-js.git
synced 2025-05-07 12:52:58 +00:00
fix
This commit is contained in:
parent
90a67b66a3
commit
4aa71458bc
@ -352,10 +352,10 @@ export default class DataSerializer {
|
|||||||
|
|
||||||
static recordComposer(
|
static recordComposer(
|
||||||
value, connection) {
|
value, connection) {
|
||||||
var rt = BinaryList();
|
let rt = new BinaryList();
|
||||||
|
|
||||||
|
|
||||||
var template = Warehouse.getTemplateByType(value.constructor);
|
let template = Warehouse.getTemplateByType(value.constructor);
|
||||||
|
|
||||||
if (template == null)
|
if (template == null)
|
||||||
return new DataSerializerComposeResults(
|
return new DataSerializerComposeResults(
|
||||||
@ -363,10 +363,8 @@ export default class DataSerializer {
|
|||||||
|
|
||||||
rt.addDC(DC.guidToBytes(template.classId));
|
rt.addDC(DC.guidToBytes(template.classId));
|
||||||
|
|
||||||
var recordData = value.serialize();
|
for (let pt of template.properties) {
|
||||||
|
let propValue = value[pt.name];
|
||||||
for (var pt in template.properties) {
|
|
||||||
var propValue = recordData[pt.name];
|
|
||||||
rt.addDC(Codec.compose(propValue, connection));
|
rt.addDC(Codec.compose(propValue, connection));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3117,7 +3117,7 @@ export default class DistributedConnection extends IStore {
|
|||||||
|
|
||||||
|
|
||||||
this._sendParams()
|
this._sendParams()
|
||||||
.addUint8(0x40 | IIPPacket.IIPPacketAction.StaticCall)
|
.addUint8(0x40 | IIPPacketAction.StaticCall)
|
||||||
.addUint32(c)
|
.addUint32(c)
|
||||||
.addGuid(classId)
|
.addGuid(classId)
|
||||||
.addUint8(index)
|
.addUint8(index)
|
||||||
|
@ -442,7 +442,7 @@ export default class TemplateGenerator {
|
|||||||
//rt += `var rt = new AsyncReply<${rtTypeName}>();\r\n`;
|
//rt += `var rt = new AsyncReply<${rtTypeName}>();\r\n`;
|
||||||
rt += `\t\tvar rt = new Esiur.Core.AsyncReply();\r\n`;
|
rt += `\t\tvar rt = new Esiur.Core.AsyncReply();\r\n`;
|
||||||
if (f.isStatic) {
|
if (f.isStatic) {
|
||||||
rt += `\t\tconnection.staticCall(Guid.parse('${template.classId.toString()}'), ${f.index}, args)\r\n`;
|
rt += `\t\tconnection.staticCall(Esiur.Data.Guid.parse('${template.classId.toString()}'), ${f.index}, args)\r\n`;
|
||||||
} else {
|
} else {
|
||||||
rt += `\t\tthis._invoke(${f.index}, args)\r\n`;
|
rt += `\t\tthis._invoke(${f.index}, args)\r\n`;
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ const namespace = {
|
|||||||
define: function(target, type, className) {
|
define: function(target, type, className) {
|
||||||
let sc = className.split('.');
|
let sc = className.split('.');
|
||||||
|
|
||||||
for(let i = 0; i < sc.length; i++) {
|
for(let i = 0; i < sc.length - 1; i++) {
|
||||||
if (target[sc[i]] == undefined)
|
if (target[sc[i]] == undefined)
|
||||||
target[sc[i]] = {};
|
target[sc[i]] = {};
|
||||||
target = target[sc[i]];
|
target = target[sc[i]];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user