Exemplo n.º 1
0
 void WriteXML(AmfXmlType xml)
 {
     if (TryWriteRef(xml))
     {
         return;
     }
     WritePlainString(xml.Content);
 }
Exemplo n.º 2
0
        AmfXmlType ReadXML(bool isDocument)
        {
            // Stored by ref?
            bool isInstance;
            int  lengthOrIndex = ReadU29(out isInstance);

            if (!isInstance)
            {
                return((AmfXmlType)_objectLookup[lengthOrIndex]);
            }

            // Stored by value
            var result = new AmfXmlType {
                IsDocument = isDocument
            };

            result.Content = ReadPlainString(lengthOrIndex);
            _objectLookup.Add(result);
            return(result);
        }