mirror of
https://github.com/esiur/esiur-js.git
synced 2025-05-06 04:22:58 +00:00
fix
This commit is contained in:
parent
87e04c37ac
commit
b04ff2b5a4
@ -172,7 +172,7 @@ export default class DataDeserializer {
|
|||||||
let record;
|
let record;
|
||||||
|
|
||||||
if (template.definedType != null) {
|
if (template.definedType != null) {
|
||||||
record = Warehouse.createInstance(template.definedType);
|
record = new template.definedType();
|
||||||
} else {
|
} else {
|
||||||
record = new Record();
|
record = new Record();
|
||||||
}
|
}
|
||||||
@ -221,7 +221,7 @@ export default class DataDeserializer {
|
|||||||
|
|
||||||
if (template != null) {
|
if (template != null) {
|
||||||
if (template.definedType != null) {
|
if (template.definedType != null) {
|
||||||
var enumVal = Warehouse.createInstance(template.definedType);
|
var enumVal = new template.definedType();
|
||||||
enumVal.index = index;
|
enumVal.index = index;
|
||||||
enumVal.name = template.constants[index].name;
|
enumVal.name = template.constants[index].name;
|
||||||
enumVal.value = template.constants[index].value;
|
enumVal.value = template.constants[index].value;
|
||||||
@ -238,7 +238,7 @@ export default class DataDeserializer {
|
|||||||
connection.getTemplate(classId).then((tmp) => {
|
connection.getTemplate(classId).then((tmp) => {
|
||||||
if (tmp != null) {
|
if (tmp != null) {
|
||||||
if (tmp.definedType != null) {
|
if (tmp.definedType != null) {
|
||||||
var enumVal = Warehouse.createInstance(tmp.definedType);
|
var enumVal = new tmp.definedType();
|
||||||
enumVal.index = index;
|
enumVal.index = index;
|
||||||
enumVal.name = tmp.constants[index].name;
|
enumVal.name = tmp.constants[index].name;
|
||||||
enumVal.value = tmp.constants[index].value;
|
enumVal.value = tmp.constants[index].value;
|
||||||
|
@ -132,7 +132,7 @@ export class RepresentationTypeParseResults {
|
|||||||
|
|
||||||
export default class RepresentationType {
|
export default class RepresentationType {
|
||||||
|
|
||||||
static getRuntimeType() {
|
getRuntimeType() {
|
||||||
let runtimeType = null;
|
let runtimeType = null;
|
||||||
|
|
||||||
if (IdentifierToTypeMap[this.identifier] != undefined)
|
if (IdentifierToTypeMap[this.identifier] != undefined)
|
||||||
|
@ -2586,7 +2586,7 @@ export default class DistributedConnection extends IStore {
|
|||||||
{
|
{
|
||||||
template = Warehouse.getTemplateByClassId(classId, TemplateType.Wrapper);
|
template = Warehouse.getTemplateByClassId(classId, TemplateType.Wrapper);
|
||||||
if (template?.definedType != null)
|
if (template?.definedType != null)
|
||||||
dr = new template.getDependencies(self, id, rt[1], rt[2]);
|
dr = new template.definedType(self, id, rt[1], rt[2]);
|
||||||
else
|
else
|
||||||
dr = new DistributedResource(self, id, rt[1], rt[2]);
|
dr = new DistributedResource(self, id, rt[1], rt[2]);
|
||||||
}
|
}
|
||||||
@ -2640,7 +2640,7 @@ export default class DistributedConnection extends IStore {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (resource == null) {
|
if (resource == null) {
|
||||||
Warehouse.put(id.toString(), dr, this, null, template)
|
Warehouse.put(id.toString(), dr, self, null, template)
|
||||||
.then(initResource)
|
.then(initResource)
|
||||||
.error((ex) => reply.triggerError(ex));
|
.error((ex) => reply.triggerError(ex));
|
||||||
} else {
|
} else {
|
||||||
|
@ -244,7 +244,7 @@ export default class TypeTemplate {
|
|||||||
|
|
||||||
if (type.prototype instanceof DistributedResource)
|
if (type.prototype instanceof DistributedResource)
|
||||||
this.templateType = TemplateType.Wrapper;
|
this.templateType = TemplateType.Wrapper;
|
||||||
if (type.prototype instanceof IRecord)
|
else if (type.prototype instanceof IRecord)
|
||||||
this.templateType = TemplateType.Record;
|
this.templateType = TemplateType.Record;
|
||||||
else if (type.prototype instanceof IResource)
|
else if (type.prototype instanceof IResource)
|
||||||
this.templateType = TemplateType.Resource;
|
this.templateType = TemplateType.Resource;
|
||||||
|
@ -318,7 +318,7 @@ export class WH extends IEventHandler
|
|||||||
|
|
||||||
if (type.prototype instanceof DistributedResource)
|
if (type.prototype instanceof DistributedResource)
|
||||||
templateType = TemplateType.Wrapper;
|
templateType = TemplateType.Wrapper;
|
||||||
if (type.prototype instanceof IResource)
|
else if (type.prototype instanceof IResource)
|
||||||
templateType = TemplateType.Resource;
|
templateType = TemplateType.Resource;
|
||||||
else if (type.prototype instanceof IRecord)
|
else if (type.prototype instanceof IRecord)
|
||||||
templateType = TemplateType.Record;
|
templateType = TemplateType.Record;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user