예제 #1
0
파일: JsAgent.cs 프로젝트: JimmyJune/DotWeb
 public object InvokeRemoteMember(int targetId, DispatchIdentifier dispId, DispatchType dispType, object[] args)
 {
     InvokeMemberMessage msg = new InvokeMemberMessage {
         TargetId = targetId,
         DispatchId = dispId,
         DispatchType = dispType,
         Parameters = WrapParameters(args)
     };
     this.session.SendMessage(msg);
     JsValue value = DispatchAndReturn();
     return WrapRemoteValue(value);
 }
예제 #2
0
 public override void Read(NetworkReader reader)
 {
     TargetId = reader.ReadInt32();
     DispatchId = new DispatchIdentifier();
     DispatchId.Read(reader);
     DispatchType = (DispatchType)reader.ReadByte();
     int len = reader.ReadInt32();
     Parameters = new JsValue[len];
     for (int i = 0; i < len; i++) {
         JsValue value = new JsValue();
         value.Read(reader);
         Parameters[i] = value;
     }
 }