コード例 #1
0
        /// <summary>
        /// Serializes the message properties into XML.
        /// </summary>
        /// <param name="properties"></param>
        /// <returns></returns>
        static XDocument SerializeMessageProperties(OracleAQMessageProperties properties)
        {
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            return(new XDocument(
                       new XElement("MESSAGE",
                                    new XElement("PRIORITY", properties.Priority),
                                    new XElement("DELAY", properties.Delay),
                                    new XElement("EXPIRATION", properties.Expiration),
                                    new XElement("CORRELATION", properties.Correlation),
                                    new XElement("ATTEMPTS", properties.Attempts),
                                    new XElement("EXCEPTION_QUEUE", properties.ExceptionQueue),
                                    new XElement("ENQUEUE_TIME", properties.EnqueueTime),
                                    new XElement("STATE", (int)properties.State),
                                    new XElement("DELIVERY_MODE", (int)properties.DeliveryMode))));
        }
コード例 #2
0
 /// <summary>
 /// This constructor instantiates the <see cref="OracleAQMessage"/> class using the <see cref="object"/> provided as the payload.
 /// </summary>
 /// <param name="messageId"></param>
 /// <param name="payload">
 /// An Object specifying payload. It can be one of the following types:
 /// <list>
 /// <item><see cref="byte[]"/></item>
 /// <item><see cref="OracleBinary"/></item>
 /// <item><see cref="OracleXmlType"/></item>
 /// <item><see cref="String"/></item>
 /// <item><see cref="XmlReader"/></item>
 /// </list>
 /// </param>
 /// <param name="properties"></param>
 internal OracleAQMessage(byte[] messageId, object payload, OracleAQMessageProperties properties) :
     this(payload)
 {
     MessageId       = messageId;
     this.properties = properties;
 }
コード例 #3
0
 /// <summary>
 /// This constructor instantiates the <see cref="OracleAQMessage"/> class.
 /// </summary>
 public OracleAQMessage()
 {
     this.properties = new OracleAQMessageProperties();
 }