Exemplo n.º 1
0
		public static string readString( FlashorbBinaryReader reader, ParseContext parseContext )
		{
			int len = reader.ReadVarInteger();

			if( (len & 0x1) == 0 )
				return (string) parseContext.getStringReference( len >> 1 );

			string str = reader.ReadUTF( len >> 1 );

			if( str.Length == 0 )
				return str;

			parseContext.addStringReference( str );
			return str;
		}
		public IAdaptingType read( FlashorbBinaryReader reader, ParseContext parseContext )
		{
			//int capacity = reader.ReadInt32();
            int capacity = reader.ReadInteger();
            Dictionary<String, Object> properties = new Dictionary<String, Object>( capacity );
			AnonymousObject anonymousObject = new AnonymousObject( properties );
			parseContext.addReference( anonymousObject );

			while( true )
			{
				String propName = reader.ReadUTF();
				object obj =  RequestParser.readData( reader, parseContext );

				if( obj == null )
					break;

				properties[ propName ] = obj;
			}

			return anonymousObject;
		}
Exemplo n.º 3
0
		public IAdaptingType read( FlashorbBinaryReader reader, ParseContext parseContext )
		{
			string objectName = reader.ReadUTF();
			return new NamedObject( objectName, objectReader.read( reader, parseContext ) );
		}
Exemplo n.º 4
0
		public IAdaptingType read( FlashorbBinaryReader reader, ParseContext parseContext )
		{
			return new StringType( reader.ReadUTF() );
		}