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))); }
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)))); }
public AMFValue(AMFValueType type, object value) { Type = type; Value = value; }