/// <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 void WriteExternal(IPofWriter writer) { writer.WriteInt64(VERSION, m_version); writer.WriteInt64(LOCK_ID, m_lockId); writer.WriteDateTime(LOCK_TIME, m_lockTime); writer.WriteBoolean(INITIALIZED, m_initialized); writer.WriteInt64(TIMEOUT, (long)m_timeout.TotalMilliseconds); writer.WriteBinary(ITEMS, m_binModel); }
/// <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 void WriteExternal(IPofWriter writer) { writer.WriteInt64(OID, m_oid); writer.WriteString(ORIGAIRPORT, m_origAirport); writer.WriteString(DESTAIRPORT, m_destAirport); writer.WriteDouble(DEALAPPEAL, m_dealAppeal); }
/// <see cref="IPortableObject"/> void IPortableObject.WriteExternal(IPofWriter writer) { writer.WriteInt16(0, m_accessCode); writer.WriteInt16(1, m_countryCode); writer.WriteInt16(2, m_areaCode); writer.WriteInt64(3, m_localNumber); }
/// <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; } }
/// <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) { // note: this object is not responsible for writing out its parent object o = m_value; if (o == null) { writer.WriteByte(0, 0); } else if (o is string) { writer.WriteByte(0, (byte)XmlValueType.String); writer.WriteString(1, (string)o); } else if (o is bool) { writer.WriteByte(0, (byte)XmlValueType.Boolean); writer.WriteBoolean(1, (bool)o); } else if (o is int) { writer.WriteByte(0, (byte)XmlValueType.Integer); writer.WriteInt32(1, (int)o); } else if (o is long) { writer.WriteByte(0, (byte)XmlValueType.Long); writer.WriteInt64(1, (long)o); } else if (o is double) { writer.WriteByte(0, (byte)XmlValueType.Double); writer.WriteDouble(1, (Double)o); } else if (o is decimal) { writer.WriteByte(0, (byte )XmlValueType.Decimal); writer.WriteDecimal(1, (decimal)o); } else if (o is Binary) { writer.WriteByte(0, (byte)XmlValueType.Binary); writer.WriteBinary(1, (Binary)o); } else if (o is DateTime) { writer.WriteByte(0, (byte)XmlValueType.DateTime); writer.WriteDateTime(1, (DateTime)o); } else { throw new IOException("unsupported type to write: " + o.GetType().FullName); } writer.WriteBoolean(2, m_isAttribute); writer.WriteBoolean(3, m_isMutable); }
/// <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.WriteObject(0, m_sFilter); writer.WriteInt32(1, m_nEfficiency); writer.WriteInt32(2, m_nSizeIn); writer.WriteInt32(3, m_nSizeOut); writer.WriteInt64(4, m_cMillis); writer.WriteCollection(5, m_setIndexLookupRecords); writer.WriteCollection(6, m_listSubSteps); }
/// <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.WriteObject(2, Value); writer.WriteInt64(3, ExpiryDelay); writer.WriteBoolean(4, IsReturnRequired); // release state Value = null; }
/// <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.WriteInt64(2, FilterId); writer.WriteBoolean(3, Add); writer.WriteBoolean(4, IsLite); writer.WriteObject(5, Trigger); if (ImplVersion > 5) { writer.WriteBoolean(6, IsPriming); } }
/// <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 void WriteExternal(IPofWriter writer) { EnsureConstructed(); // COH-8647 - Java expects epoch based timestamps writer.WriteInt64(0, DateTimeUtils.GetTimeMillisSinceTheEpoch(m_dateTime)); writer.WriteInt32(1, m_addr1); writer.WriteInt32(2, m_addr2); writer.WriteInt32(3, m_addr3); writer.WriteInt32(4, m_addr4); writer.WriteInt32(5, m_port); writer.WriteInt32(6, m_count); }
/// <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 void WriteExternal(IPofWriter writer) { IPofNavigator navigator = m_navigator; if (navigator == null) { throw new SerializationException( "PofExtractor was constructed without a navigator"); } writer.WriteInt32(0, m_target); writer.WriteObject(1, navigator); // see note in readExternal regarding T_UNKNOWN offset writer.WriteInt64(2, (long)GetPofTypeId(writer.PofContext) - (long)PofConstants.T_UNKNOWN); }
/// <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.WriteInt32(0, (int)EventType); int implVersion = ImplVersion; if (implVersion > 3) { writer.WriteInt64Array(1, FilterIds); } else { writer.WriteInt64(1, FilterId); } writer.WriteObject(2, Key); writer.WriteObject(3, ValueNew); writer.WriteObject(4, ValueOld); writer.WriteBoolean(5, IsSynthetic); // COH-9355 if (implVersion > 4) { writer.WriteInt32(6, (int)TransformState); } // COH-13916 if (implVersion > 5) { writer.WriteBoolean(7, IsTruncate); } // COH-18376 if (implVersion > 6) { writer.WriteBoolean(8, IsPriming); } }
/// <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.WriteObject(0, m_value); writer.WriteInt64(1, m_cMillis); }
/// <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, Id); }
/// <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.WriteInt64(2, TimeoutMillis); }
/// <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); }
/// <summary> /// Save the contents of a POF user type instance by writing its /// state using the specified <see cref="IPofWriter"/> object. /// </summary> /// <remarks> /// The AbstractPriorityTask implementation reserves property indexes /// 0 - 9. /// </remarks> /// <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.WriteInt32(0, (int)m_schedulingPriority); writer.WriteInt64(1, m_executionTimeoutMillis); writer.WriteInt64(2, m_requestTimeoutMillis); }