Esempio n. 1
0
 public void WriteExternal(IPofWriter writer)
 {
     if (m_isUniformValue)
     {
         writer.WriteDictionary(0, m_dict, typeof(K), typeof(V));
     }
     else
     {
         writer.WriteDictionary(0, m_dict, typeof(K));
     }
 }
 public void WriteExternal(IPofWriter writer)
 {
     writer.WriteCollection(0, getList1());
     writer.WriteCollection(1, getList2());
     writer.WriteCollection(2, getList3());
     writer.WriteDictionary(3, getMap1());
     writer.WriteDictionary(4, getMap2());
     writer.WriteDictionary(5, getMap3());
     writer.WriteInt32(6, getNumber());
     writer.WriteString(7, getText());
     writer.WriteArray(8, getChildren(), typeof(PofChild));
 }
        /// <summary>
        /// Save the contents of a POF user type instance by writing its
        /// state using the specified <see cref="IPofWriter"/> object.
        /// </summary>
        /// <param name="writer">
        /// The <b>IPofWriter</b> to which to write the object's state.
        /// </param>
        /// <exception cref="IOException">
        /// If an I/O error occurs.
        /// </exception>
        public override void WriteExternal(IPofWriter writer)
        {
            base.WriteExternal(writer);

            writer.WriteInt64(0, RequestId);
            writer.WriteBoolean(1, IsFailure);

            ResultFormatType format = ResultFormat;

            writer.WriteInt32(2, (int)format);

            switch (format)
            {
            default:
            case ResultFormatType.Generic:
                writer.WriteObject(3, Result);
                break;

            case ResultFormatType.Collection:
                writer.WriteCollection(4, (ICollection)Result);
                break;

            case ResultFormatType.Map:
                writer.WriteDictionary(5, (IDictionary)Result);
                break;
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Save the contents of a POF user type instance by writing its
 /// state using the specified <see cref="IPofWriter"/> object.
 /// </summary>
 /// <param name="writer">
 /// The <b>IPofWriter</b> to which to write the object's state.
 /// </param>
 /// <exception cref="IOException">
 /// If an I/O error occurs.
 /// </exception>
 public override void WriteExternal(IPofWriter writer)
 {
     writer.WriteBoolean(0, m_fetchExtractor);
     writer.WriteString(1, m_query);
     writer.WriteArray(2, m_env);
     writer.WriteDictionary(3, m_bindings);
 }
Esempio n. 5
0
        /// <summary>
        /// Save the contents of a POF user type instance by writing its
        /// state using the specified <see cref="IPofWriter"/> object.
        /// </summary>
        /// <param name="writer">
        /// The <b>IPofWriter</b> to which to write the object's state.
        /// </param>
        /// <exception cref="IOException">
        /// If an I/O error occurs.
        /// </exception>
        /// <seealso cref="Request.WriteExternal"/>
        public override void WriteExternal(IPofWriter writer)
        {
            base.WriteExternal(writer);

            writer.WriteDictionary(1, Map);

            // release state
            Map = null;
        }
Esempio n. 6
0
 /// <see cref="IPortableObject"/>
 void IPortableObject.WriteExternal(IPofWriter writer)
 {
     writer.WriteString(FIRST_NAME, m_firstName);
     writer.WriteString(LAST_NAME, m_lastName);
     writer.WriteObject(HOME_ADDRESS, m_addrHome);
     writer.WriteObject(WORK_ADDRESS, m_addrWork);
     writer.WriteDictionary(PHONE_NUMBERS, m_dictPhoneNumber,
                            typeof(string), typeof(PhoneNumber));
     writer.WriteDate(BIRTH_DATE, m_dtBirth);
 }
 /// <summary>
 /// Serializes this processor into a POF stream.
 /// </summary>
 /// <param name="writer">
 /// The POF writer.
 /// </param>
 public override void WriteExternal(IPofWriter writer)
 {
     writer.WriteInt64(0, m_lockId);
     writer.WriteBoolean(1, m_newSession);
     writer.WriteBoolean(2, m_initialized);
     writer.WriteInt64(3, m_timeout);
     writer.WriteBinary(4, m_binModel);
     writer.WriteDictionary(5, m_externalAttributes, typeof(String), typeof(Binary));
     writer.WriteCollection(6, m_obsoleteExternalAttributes, typeof(String));
 }
        /// <summary>
        /// Save the contents of a POF user type instance by writing
        /// its state using the specified <see cref="IPofWriter"/>
        /// object.
        /// </summary>
        /// <param name="writer">
        /// The <b>IPofWriter</b> to which to write the object's
        /// state.
        /// </param>
        /// <exception cref="IOException">
        /// If an I/O error occurs.
        /// </exception>
        public override void WriteExternal(IPofWriter writer)
        {
            base.WriteExternal(writer);

            writer.WriteObject(1, ClientId);
            writer.WriteInt32(2, Edition);
            writer.WriteDictionary(3, ProtocolVersionMap, typeof(string), typeof(Int32[]));
            writer.WriteByteArray(4, IdentityToken);
            writer.WriteObject(5, Member);
            writer.WriteString(6, ClusterName);
            writer.WriteString(7, ServiceName);
        }
Esempio n. 9
0
 public void WriteExternal(IPofWriter writer)
 {
     writer.WriteCollection(0, set);
     writer.WriteDictionary(1, map);
 }
Esempio n. 10
0
 /// <summary>
 /// Save the contents of a POF user type instance by writing its
 /// state using the specified <see cref="IPofWriter"/> object.
 /// </summary>
 /// <param name="writer">
 /// The <b>IPofWriter</b> to which to write the object's state.
 /// </param>
 /// <exception cref="IOException">
 /// If an I/O error occurs.
 /// </exception>
 public virtual void WriteExternal(IPofWriter writer)
 {
     writer.WriteDictionary(0, m_map);
     writer.WriteBoolean(1, m_insert);
     writer.WriteBoolean(2, m_return);
 }
Esempio n. 11
0
 /// <summary>
 /// Save the contents of a POF user type instance by writing its
 /// state using the specified <see cref="IPofWriter"/> object.
 /// </summary>
 /// <param name="writer">
 /// The <b>IPofWriter</b> to which to write the object's state.
 /// </param>
 /// <exception cref="IOException">
 /// If an I/O error occurs.
 /// </exception>
 public override void WriteExternal(IPofWriter writer)
 {
     writer.WriteDictionary(0, m_map);
 }
        /// <summary>
        /// Save the contents of a POF user type instance by writing
        /// its state using the specified <see cref="IPofWriter"/>
        /// object.
        /// </summary>
        /// <param name="writer">
        /// The <b>IPofWriter</b> to which to write the object's
        /// state.
        /// </param>
        /// <exception cref="IOException">
        /// If an I/O error occurs.
        /// </exception>
        public override void WriteExternal(IPofWriter writer)
        {
            base.WriteExternal(writer);

            writer.WriteDictionary(6, ProtocolVersionMap, typeof(string), typeof(Int32));
        }