Ejemplo n.º 1
0
 public void WriteAmfItem(ObjectEncoding objectEncoding, object data)
 {
     if (data == null)
     {
         this.WriteMarker(Amf0TypeMarkers.Null);
     }
     else
     {
         if (this.WriteAmf0ReferenceOnExistence(data))
         {
             return;
         }
         Type type = data.GetType();
         if (objectEncoding != ObjectEncoding.Amf0)
         {
             if (objectEncoding != ObjectEncoding.Amf3)
             {
                 throw new ArgumentOutOfRangeException("objectEncoding");
             }
             this.WriteMarker(Amf0TypeMarkers.Amf3Object);
             this.WriteAmf3Item(data);
         }
         else
         {
             AmfWriter.GetAmfWriter(AmfWriter.Amf0Writers, type).WriteData(this, data);
         }
     }
 }
Ejemplo n.º 2
0
            public Amf3(SerializationContext context, AmfWriter writer, Base b)
            {
                this.b       = b;
                this.writer  = writer;
                this.context = context;

                this.refObjects = new ReferenceList <object>();
                this.refStrings = new ReferenceList <string>();
                this.refClasses = new ReferenceList <ClassInfo>();
            }
Ejemplo n.º 3
0
 public void WriteAmf3Item(object data)
 {
     if (data == null)
     {
         this.WriteAmf3Null();
     }
     else
     {
         Type type = data.GetType();
         AmfWriter.GetAmfWriter(AmfWriter.Amf3Writers, type).WriteData(this, data);
     }
 }
Ejemplo n.º 4
0
 public void WriteAmf0Item(object data)
 {
     if (data == null)
     {
         this.WriteMarker(Amf0TypeMarkers.Null);
     }
     else
     {
         if (this.WriteAmf0ReferenceOnExistence(data))
         {
             return;
         }
         Type type = data.GetType();
         AmfWriter.GetAmfWriter(AmfWriter.Amf0Writers, type).WriteData(this, data);
     }
 }