示例#1
0
 private AMFValue ReadStringObject(AMFValueType type)
 {
   var len = ReadUI29();
   if (len==1) return new AMFValue("");
   if ((len&0x01)==0) return GetRegisteredObject(len>>1);
   len = len>>1;
   var buf = new byte[len];
   BaseStream.Read(buf, 0, len);
   return RegisterObject(new AMFValue(type, System.Text.Encoding.UTF8.GetString(buf)));
 }
示例#2
0
        private AMFValue ReadStringObject(AMFValueType type)
        {
            var len = ReadUI29();

            if (len == 1)
            {
                return(new AMFValue(""));
            }
            if ((len & 0x01) == 0)
            {
                return(GetRegisteredObject(len >> 1));
            }
            len = len >> 1;
            var buf = new byte[len];

            BaseStream.Read(buf, 0, len);
            return(RegisterObject(new AMFValue(type, System.Text.Encoding.UTF8.GetString(buf))));
        }
示例#3
0
 public AMFValue(AMFValueType type, object value)
 {
   Type = type;
   Value = value;
 }
示例#4
0
 public AMFValue(AMFValueType type, object value)
 {
     Type  = type;
     Value = value;
 }