mirror of
https://github.com/esiur/esiur-dart.git
synced 2026-04-03 09:48:21 +00:00
Rename
This commit is contained in:
@@ -341,14 +341,18 @@ class DistributedConnection extends NetworkConnection with IStore
|
||||
|
||||
if (rt <= 0)
|
||||
{
|
||||
// print("hold");
|
||||
var size = ends - offset;
|
||||
data.holdFor(msg, offset, size, size - rt);
|
||||
return ends;
|
||||
}
|
||||
else
|
||||
{
|
||||
//print("CMD ${packet.command} ${offset} ${ends}");
|
||||
|
||||
offset += rt;
|
||||
|
||||
|
||||
if (packet.command == IIPPacketCommand.Event)
|
||||
{
|
||||
switch (packet.event)
|
||||
@@ -2158,15 +2162,23 @@ class DistributedConnection extends NetworkConnection with IStore
|
||||
var reply = new AsyncReply<DistributedResource>();
|
||||
_resourceRequests.add(id, reply);
|
||||
|
||||
//print("fetch ${id}");
|
||||
|
||||
sendRequest(IIPPacketAction.AttachResource)
|
||||
.addUint32(id)
|
||||
.done()
|
||||
.then((rt)
|
||||
{
|
||||
|
||||
//print("fetched ${id}");
|
||||
|
||||
var dr = new DistributedResource(this, id, rt[1], rt[2]);
|
||||
|
||||
|
||||
getTemplate(rt[0] as Guid).then((tmp)
|
||||
{
|
||||
//print("New template ");
|
||||
|
||||
// ClassId, ResourceAge, ResourceLink, Content
|
||||
Warehouse.put(dr, id.toString(), this, null, tmp);
|
||||
|
||||
@@ -2174,6 +2186,7 @@ class DistributedConnection extends NetworkConnection with IStore
|
||||
|
||||
Codec.parsePropertyValueArray(d, 0, d.length, this).then((ar)
|
||||
{
|
||||
//print("attached");
|
||||
dr.attached(ar);
|
||||
_resourceRequests.remove(id);
|
||||
reply.trigger(dr);
|
||||
|
||||
@@ -80,7 +80,7 @@ class DistributedResource extends IResource
|
||||
/// <summary>
|
||||
/// Resource is attached when all its properties are received.
|
||||
/// </summary>
|
||||
bool get IsAttached => _isAttached;
|
||||
bool get isAttached => _isAttached;
|
||||
|
||||
|
||||
// public DistributedResourceStack Stack
|
||||
@@ -185,6 +185,19 @@ class DistributedResource extends IResource
|
||||
return connection.sendInvokeByArrayArguments(_instanceId, index, args);
|
||||
}
|
||||
|
||||
operator [](String index)
|
||||
{
|
||||
var pt = instance.template.getPropertyTemplateByName(index);
|
||||
if (pt != null)
|
||||
return get(pt.index);
|
||||
}
|
||||
|
||||
operator []=(String index, value)
|
||||
{
|
||||
var pt = instance.template.getPropertyTemplateByName(index);
|
||||
if (pt != null)
|
||||
set(pt.index, value);
|
||||
}
|
||||
|
||||
String _getMemberName(Symbol symbol)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user