Esempio n. 1
0
 public Amf0(SerializationContext context, Base b, Amf3 amf3)
 {
     this.b       = b;
     this.amf3    = amf3;
     this.context = context;
     refs         = new ReferenceList <object>();
 }
Esempio n. 2
0
        AmfWriter(ByteWriter writer, SerializationContext context, byte _)
        {
            this.context = Check.NotNull(context);
            this.writer  = writer;

            this.core = new Base(writer);
            this.amf3 = new Amf3(context, this, core);
            this.amf0 = new Amf0(context, core, amf3);
        }
Esempio n. 3
0
        public AmfReader(byte[] data, SerializationContext context)
        {
            Check.NotNull(data, context);

            this.context = context;
            reader       = new ByteReader(data);

            core = new Base(reader);
            amf3 = new Amf3(context, this, core);
            amf0 = new Amf0(context, core, amf3);
        }
 public void WriteAmf3(Amf3 amf3)
 {
     WriteByte(amf3.DataType);
     if (amf3.Amf3Metadatas != null && amf3.Amf3Metadatas.Count > 0)
     {
         WriteInt32(amf3.Amf3Metadatas.Count);
         foreach (var item in amf3.Amf3Metadatas)
         {
             //根据数据类型
             WriteArray(item.ToBuffer());
         }
         //always 9
         WriteByte(0);
         WriteByte(0);
         WriteByte(9);
     }
     else
     {
         WriteInt32(0);
     }
 }