mirror of
https://github.com/esiur/esiur-js.git
synced 2026-03-18 15:30:38 +00:00
Generator
This commit is contained in:
@@ -82,6 +82,7 @@ import PropertyValue from '../../Data/PropertyValue.js';
|
||||
import PropertyValueArray from '../../Data/PropertyValueArray.js';
|
||||
import { UInt8 } from '../../Data/ExtendedTypes.js';
|
||||
import ConnectionStatus from './ConnectionStatus.js';
|
||||
import { Prop, TemplateDescriber } from '../../Resource/Template/TemplateDescriber.js';
|
||||
|
||||
export default class DistributedConnection extends IStore {
|
||||
|
||||
@@ -3184,9 +3185,6 @@ export default class DistributedConnection extends IStore {
|
||||
|
||||
|
||||
static get template() {
|
||||
return {
|
||||
namespace: "Esiur",
|
||||
properties: [["status", UInt8]]
|
||||
};
|
||||
return new TemplateDescriber("Esiur", [new Prop("status", UInt8)]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,15 +171,6 @@ export default class DistributedResource extends IResource
|
||||
var makeSetter = function(index)
|
||||
{
|
||||
return async function (value) {
|
||||
if (self._p.destroyed)
|
||||
throw new Error("Trying to access a destroyed object.");
|
||||
|
||||
if (self._p.suspended)
|
||||
throw new Error("Trying to access a suspended object.");
|
||||
|
||||
if (self._p.attached)
|
||||
return;
|
||||
|
||||
await self._set(index, value);
|
||||
};
|
||||
};
|
||||
@@ -286,11 +277,15 @@ export default class DistributedResource extends IResource
|
||||
|
||||
_set(index, value)
|
||||
{
|
||||
if (this._p.destroyed)
|
||||
throw new Error("Trying to access a destroyed object.");
|
||||
|
||||
if (this._p.suspended)
|
||||
throw new Error("Trying to access a suspended object.");
|
||||
|
||||
if (!this._p.attached)
|
||||
{
|
||||
console.log("Resource not attached.");
|
||||
return;
|
||||
}
|
||||
throw new Error("Resource not attached.");
|
||||
|
||||
|
||||
if (this._p.neglect)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user