예제 #1
0
파일: JsValue.cs 프로젝트: JimmyJune/DotWeb
 public void Read(NetworkReader reader)
 {
     Tag = (JsValueType)reader.ReadByte();
     switch (Tag) {
         case JsValueType.Null:
         case JsValueType.Void:
             Object = null;
             break;
         case JsValueType.Bool:
             Object = reader.ReadBoolean();
             break;
         case JsValueType.Int:
             Object = reader.ReadInt32();
             break;
         case JsValueType.Double:
             Object = reader.ReadDouble();
             break;
         case JsValueType.String:
             Object = reader.ReadString();
             break;
         case JsValueType.Object:
         case JsValueType.JsObject:
         case JsValueType.Delegate:
             Object = reader.ReadInt32();
             break;
         default:
             throw new InvalidDataException();
     }
 }
예제 #2
0
 public override void Read(NetworkReader reader)
 {
     Value = new JsValue();
     IsException = reader.ReadBoolean();
     Value.Read(reader);
 }
예제 #3
0
 public void Read(NetworkReader reader)
 {
     Name = reader.ReadString();
     DispatchType = (DispatchType)reader.ReadByte();
 }
예제 #4
0
 public abstract void Read(NetworkReader reader);
예제 #5
0
 public override void Read(NetworkReader reader)
 {
 }
예제 #6
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;
     }
 }
예제 #7
0
 public override void Read(NetworkReader reader)
 {
     TypeName = reader.ReadString();
 }
예제 #8
0
 public override void Read(NetworkReader reader)
 {
     Name = reader.ReadString();
     ScopeId = reader.ReadInt32();
     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;
     }
 }
예제 #9
0
 public override void Read(NetworkReader reader)
 {
     IndexerLength = reader.ReadInt32();
     int count = reader.ReadInt32();
     Members = new List<TypeMemberInfo>();
     for (int i = 0; i < count; i++) {
         TypeMemberInfo info = new TypeMemberInfo();
         info.Read(reader);
         Members.Add(info);
     }
 }
예제 #10
0
 public override void Read(NetworkReader reader)
 {
     TargetId = reader.ReadInt32();
 }
예제 #11
0
 public void Read(NetworkReader reader)
 {
     Tag = (DispatchIdentifierType)reader.ReadByte();
     switch (Tag) {
         case DispatchIdentifierType.String:
             Value = reader.ReadString();
             break;
         case DispatchIdentifierType.Int:
             Value = reader.ReadUInt32();
             break;
         default:
             throw new InvalidDataException();
     }
 }
예제 #12
0
 public override void Read(NetworkReader reader)
 {
     Name = reader.ReadString();
     Parameters = reader.ReadString();
     Body = reader.ReadString();
 }