Пример #1
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;
        }
Пример #2
0
 void WriteXML(AmfXmlType xml)
 {
     if (TryWriteRef(xml)) return;
     WritePlainString(xml.Content);
 }