activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r454139 - in /incubator/activemq/activemq-dotnet/trunk: ./ src/main/csharp/ActiveMQ/ src/main/csharp/ActiveMQ/Commands/ src/main/csharp/MSMQ/ src/main/csharp/NMS/ src/test/csharp/ActiveMQ/ src/test/csharp/NMS/Test/
Date Sun, 08 Oct 2006 13:01:39 GMT
Author: chirino
Date: Sun Oct  8 06:01:38 2006
New Revision: 454139

URL: http://svn.apache.org/viewvc?view=rev&rev=454139
Log:
.NET does not work so good with longs as the data type of dates and time periods.  Switch
the API interfaces to use DateTime and TimeSpans instead.  This should make it have better
.NET feel.

Also added a IMessageConverter interface for the MSMQ so that we can have plugable conversion
policies for how NMS messages are mapped to MSMQ messages.


Added:
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/DefaultMessageConverter.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/IMessageConverter.cs
Modified:
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Commands/ActiveMQMessage.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/CommonAssemblyInfo.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/MessageProducer.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/BaseMessage.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/BytesMessage.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Connection.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ConnectionFactory.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageProducer.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Session.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/CommonAssemblyInfo.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/IMessage.cs
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/IMessageProducer.cs
    incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/CommonAssemblyInfo.cs
    incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/CommonAssemblyInfo.cs
    incubator/activemq/activemq-dotnet/trunk/vs2005-msmq.csproj

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Commands/ActiveMQMessage.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Commands/ActiveMQMessage.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Commands/ActiveMQMessage.cs
(original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Commands/ActiveMQMessage.cs
Sun Oct  8 06:01:38 2006
@@ -16,7 +16,7 @@
  */
 using ActiveMQ.OpenWire;
 using NMS;
-
+using System;
 
 namespace ActiveMQ.Commands
 {
@@ -27,6 +27,8 @@
 {
 	public class ActiveMQMessage : Message, IMessage, MarshallAware
     {
+        private DateTime UNIX_TIME_BASE = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
+
         public const byte ID_ActiveMQMessage = 23;
         
         protected static MessagePropertyHelper propertyHelper = new MessagePropertyHelper();
@@ -107,13 +109,13 @@
         /// <summary>
         /// The time in milliseconds that this message should expire in
         /// </summary>
-        public long NMSExpiration
+        public TimeSpan NMSExpiration
         {
             get {
-                return Expiration;
+                return TimeSpan.FromMilliseconds(Expiration);
             }
             set {
-                Expiration = value;
+                Expiration = value.Milliseconds;
             }
         }
         
@@ -181,10 +183,11 @@
         /// <summary>
         /// The timestamp the broker added to the message
         /// </summary>
-        public long NMSTimestamp
+        public DateTime NMSTimestamp
         {
             get {
-                return Timestamp;
+                DateTime rc = UNIX_TIME_BASE.AddMilliseconds(Timestamp);
+                return rc.ToLocalTime();
             }
         }
         

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/CommonAssemblyInfo.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/CommonAssemblyInfo.cs
(original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/CommonAssemblyInfo.cs
Sun Oct  8 06:01:38 2006
@@ -1,27 +1,27 @@
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// ------------------------------------------------------------------------------
-//  <autogenerated>
-//      This code was generated by a tool.
-//      Mono Runtime Version: 2.0.50727.42
-// 
-//      Changes to this file may cause incorrect behavior and will be lost if 
-//      the code is regenerated.
-//  </autogenerated>
-// ------------------------------------------------------------------------------
-
-[assembly: ComVisibleAttribute(false)]
-[assembly: CLSCompliantAttribute(true)]
-[assembly: AssemblyTitleAttribute("Apache NMS for ActiveMQ")]
-[assembly: AssemblyDescriptionAttribute("An NMS (.Net Messaging Library) interface to Apache
ActiveMQ")]
-[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
-[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
-[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
-[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
-[assembly: AssemblyTrademarkAttribute("")]
-[assembly: AssemblyCultureAttribute("")]
-[assembly: AssemblyVersionAttribute("4.0")]
-[assembly: AssemblyInformationalVersionAttribute("4.0")]
-
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.42
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: ComVisibleAttribute(false)]
+[assembly: CLSCompliantAttribute(true)]
+[assembly: AssemblyTitleAttribute("Apache NMS for ActiveMQ")]
+[assembly: AssemblyDescriptionAttribute("An NMS (.Net Messaging Library) interface to Apache
ActiveMQ")]
+[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
+[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
+[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
+[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
+[assembly: AssemblyTrademarkAttribute("")]
+[assembly: AssemblyCultureAttribute("")]
+[assembly: AssemblyVersionAttribute("4.0")]
+[assembly: AssemblyInformationalVersionAttribute("4.0")]
+

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/MessageProducer.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/MessageProducer.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/MessageProducer.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/MessageProducer.cs Sun
Oct  8 06:01:38 2006
@@ -16,6 +16,7 @@
  */
 using ActiveMQ.Commands;
 using NMS;
+using System;
 
 namespace ActiveMQ
 {
@@ -30,7 +31,7 @@
         private long messageCounter;
         
         bool persistent;
-        long timeToLive;
+        TimeSpan timeToLive;
         int priority;
         bool disableMessageID;
         bool disableMessageTimestamp;
@@ -78,8 +79,8 @@
             get { return persistent; }
             set { this.persistent = value; }
         }
-        
-        public long TimeToLive
+
+        public TimeSpan TimeToLive
         {
             get { return timeToLive; }
             set { this.timeToLive = value; }

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/BaseMessage.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/BaseMessage.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/BaseMessage.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/BaseMessage.cs Sun Oct 
8 06:01:38 2006
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 using NMS;
-
+using System;
 
 namespace MSMQ
 {
@@ -26,7 +26,7 @@
         private PrimitiveMap properties;
         private Destination destination;
         private string correlationId;
-        private long expiration;
+        private TimeSpan expiration;
         private string messageId;
         private bool persistent;
         private byte priority;
@@ -34,7 +34,7 @@
         private string type;
         private event AcknowledgeHandler Acknowledger;
         private byte[] content;
-        private long timestamp;
+        private DateTime timestamp;
 
         public byte[] Content
         {
@@ -95,7 +95,7 @@
         /// <summary>
         /// The time in milliseconds that this message should expire in
         /// </summary>
-        public long NMSExpiration
+        public TimeSpan NMSExpiration
         {
             get {
                 return expiration;
@@ -169,7 +169,7 @@
         /// <summary>
         /// The timestamp the broker added to the message
         /// </summary>
-        public long NMSTimestamp
+        public DateTime NMSTimestamp
         {
             get {
                 return timestamp;

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/BytesMessage.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/BytesMessage.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/BytesMessage.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/BytesMessage.cs Sun Oct
 8 06:01:38 2006
@@ -22,11 +22,6 @@
 {
 	public class BytesMessage : BaseMessage, IBytesMessage
     {
-	    public byte[] Content
-	    {
-	        get { throw new NotImplementedException(); }
-	        set { throw new NotImplementedException(); }
-	    }
     }
 }
 

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Connection.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Connection.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Connection.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Connection.cs Sun Oct  8
06:01:38 2006
@@ -19,32 +19,34 @@
 namespace MSMQ
 {
     /// <summary>
-    /// Represents a connection with a message broker
+    /// Represents a NMS connection MSMQ.  Since the underlying MSMQ APIs are actually 
+    /// connectionless, NMS connection in the MSMQ case are not expensive operations.
     /// </summary>
+    /// 
     public class Connection : IConnection
     {
         
         private AcknowledgementMode acknowledgementMode = AcknowledgementMode.AutoAcknowledge;
-        
+        private IMessageConverter messageConverter = new DefaultMessageConverter();
+
         private bool connected;
         private bool closed;
         private string clientId;
 
-
-
         /// <summary>
         /// Starts message delivery for this connection.
         /// </summary>
         public void Start()
         {
+            CheckConnected();
         }
-        
-        
+                
         /// <summary>
         /// Stop message delivery for this connection.
         /// </summary>
         public void Stop()
         {
+            CheckConnected();
         }
         
         /// <summary>
@@ -60,6 +62,7 @@
         /// </summary>
         public ISession CreateSession(AcknowledgementMode mode)
         {
+            CheckConnected();
             return new Session(this, mode);
         }
         
@@ -73,7 +76,13 @@
             get { return acknowledgementMode; }
             set { acknowledgementMode = value; }
         }
-        
+
+        public IMessageConverter MessageConverter
+        {
+            get { return messageConverter; }
+            set { messageConverter = value; }
+        }
+
         public string ClientId
         {
             get { return clientId; }

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ConnectionFactory.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ConnectionFactory.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ConnectionFactory.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ConnectionFactory.cs Sun
Oct  8 06:01:38 2006
@@ -20,16 +20,21 @@
 namespace MSMQ
 {
     /// <summary>
-    /// Represents a connection with a message broker
+    /// A Factory that can estbalish NMS connections to MSMQ
     /// </summary>
     public class ConnectionFactory : IConnectionFactory
-    {        
-                
+    {   
+        //
+        // Creates a connection to MSMQ
+        //
         public IConnection CreateConnection()
         {
             return new Connection();
         }
         
+        //
+        // Creates a connection to MSQM
+        //
         public IConnection CreateConnection(string userName, string password)
         {
             return new Connection();

Added: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/DefaultMessageConverter.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/DefaultMessageConverter.cs?view=auto&rev=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/DefaultMessageConverter.cs
(added)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/DefaultMessageConverter.cs
Sun Oct  8 06:01:38 2006
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Messaging;
+using NMS;
+
+namespace MSMQ
+{
+    public class DefaultMessageConverter : IMessageConverter
+	{
+        public Message convertToMSMQMessage(IMessage message)
+        {
+            Message msg = new Message();
+            MessageQueue responseQueue=null;
+            if (message.NMSReplyTo != null)
+            {
+                responseQueue = new MessageQueue(((Destination)message.NMSReplyTo).Path);
+            }
+            if (message.NMSExpiration != null)
+            {
+                msg.TimeToBeReceived = message.NMSExpiration;
+            }
+            if (message.NMSCorrelationID != null)
+            {
+                msg.CorrelationId = message.NMSCorrelationID;
+            }
+            msg.Recoverable = message.NMSPersistent;
+            msg.Priority = MessagePriority.Normal;
+            msg.ResponseQueue = responseQueue;
+
+            return msg;
+        }
+        public IMessage convertFromMSMQMessage(Message message) 
+        {
+            return null;
+        }
+	}
+}

Added: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/IMessageConverter.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/IMessageConverter.cs?view=auto&rev=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/IMessageConverter.cs (added)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/IMessageConverter.cs Sun
Oct  8 06:01:38 2006
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System.Messaging;
+using NMS;
+
+namespace MSMQ
+{
+    public interface IMessageConverter
+    {
+        Message convertToMSMQMessage(IMessage message);
+        IMessage convertFromMSMQMessage(Message message);
+    }
+}

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageProducer.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageProducer.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageProducer.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageProducer.cs Sun Oct
 8 06:01:38 2006
@@ -30,17 +30,19 @@
 
         private long messageCounter;
         private bool persistent;
-        private long timeToLive;
+        private TimeSpan timeToLive;
         private int priority;
         private bool disableMessageID;
         private bool disableMessageTimestamp;
         
         private MessageQueue messageQueue;
+        private IMessageConverter messageConverter;
 
         public MessageProducer(Session session, Destination destination)
         {
             this.session = session;
             this.destination = destination;
+            MessageConverter = session.MessageConverter;
             if (destination != null)
             {
                 messageQueue = openMessageQueue(destination);
@@ -109,23 +111,13 @@
                 }
 
                 // Convert the Mesasge into a MSMQ message
-                Message msg = new Message();                
-                if ( message.NMSReplyTo!=null )
-                {
-                    responseQueue = new MessageQueue(((Destination)message.NMSReplyTo).Path);
-                }
-                if ( timeToLive!=null )
-                {
-                    msg.TimeToBeReceived = TimeSpan.FromMilliseconds(timeToLive);
-                }
-                if ( message.NMSCorrelationID!=null )
-                {
-                    msg.CorrelationId = message.NMSCorrelationID;
-                }
-                msg.Recoverable = persistent;
-                msg.Priority = MessagePriority.Normal;
-                msg.ResponseQueue = responseQueue;
-
+                message.NMSPersistent = persistent;
+                message.NMSExpiration = TimeToLive;
+                message.NMSPriority = (byte)priority;
+                
+                // message.NMSTimestamp = new DateTime().Date.;
+                Message msg = messageConverter.convertToMSMQMessage(message);
+                // TODO: message.NMSMessageId = 
                 // Now Send the message
                 if( mq.Transactional )
                 {
@@ -185,7 +177,7 @@
             set { persistent = value; }
         }
 
-        public long TimeToLive
+        public TimeSpan TimeToLive
         {
             get { return timeToLive; }
             set { timeToLive = value; }
@@ -208,5 +200,12 @@
             get { return disableMessageTimestamp; }
             set { disableMessageTimestamp = value; }
         }
+
+        public IMessageConverter MessageConverter
+        {
+            get { return messageConverter; }
+            set { messageConverter = value; }
+        }
+
     }
 }

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Session.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Session.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Session.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Session.cs Sun Oct  8 06:01:38
2006
@@ -28,12 +28,14 @@
         private Connection connection;
         private AcknowledgementMode acknowledgementMode;
         private MessageQueueTransaction messageQueueTransaction;
+        private IMessageConverter messageConverter;
 
         public Session(Connection connection, AcknowledgementMode acknowledgementMode)
         {
             this.connection = connection;
-            this.acknowledgementMode = acknowledgementMode;            
-            if( this.acknowledgementMode == AcknowledgementMode.Transactional )
+            this.acknowledgementMode = acknowledgementMode;
+            MessageConverter = connection.MessageConverter;
+            if (this.acknowledgementMode == AcknowledgementMode.Transactional)
             {
                 MessageQueueTransaction = new MessageQueueTransaction();
             }
@@ -166,6 +168,12 @@
                 return messageQueueTransaction;
             }
             set { messageQueueTransaction = value; }
+        }
+
+        public IMessageConverter MessageConverter
+        {
+            get { return messageConverter; }
+            set { messageConverter = value; }
         }
 
     }

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/CommonAssemblyInfo.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/CommonAssemblyInfo.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/CommonAssemblyInfo.cs Sun
Oct  8 06:01:38 2006
@@ -1,27 +1,28 @@
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// ------------------------------------------------------------------------------
-//  <autogenerated>
-//      This code was generated by a tool.
-//      Mono Runtime Version: 1.1.4322.2032
-// 
-//      Changes to this file may cause incorrect behavior and will be lost if 
-//      the code is regenerated.
-//  </autogenerated>
-// ------------------------------------------------------------------------------
-
-[assembly: ComVisibleAttribute(false)]
-[assembly: CLSCompliantAttribute(true)]
-[assembly: AssemblyTitleAttribute("Apache NMS Class Library")]
-[assembly: AssemblyDescriptionAttribute("NMS (.Net Messaging Library): An abstract interface
to Message Oriented Middleware (MOM) providers")]
-[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
-[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
-[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
-[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
-[assembly: AssemblyTrademarkAttribute("")]
-[assembly: AssemblyCultureAttribute("")]
-[assembly: AssemblyVersionAttribute("4.0")]
-[assembly: AssemblyInformationalVersionAttribute("4.0")]
-
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.42
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: ComVisibleAttribute(false)]
+[assembly: CLSCompliantAttribute(true)]
+[assembly: AssemblyTitleAttribute("Apache NMS Class Library")]
+[assembly: AssemblyDescriptionAttribute("NMS (.Net Messaging Library): An abstract interface
to Message Oriented Middlewar" +
+    "e (MOM) providers")]
+[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
+[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
+[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
+[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
+[assembly: AssemblyTrademarkAttribute("")]
+[assembly: AssemblyCultureAttribute("")]
+[assembly: AssemblyVersionAttribute("4.0")]
+[assembly: AssemblyInformationalVersionAttribute("4.0")]
+

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/IMessage.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/IMessage.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/IMessage.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/IMessage.cs Sun Oct  8 06:01:38
2006
@@ -14,6 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+using System;
+
 namespace NMS
 {
     /// <summary>
@@ -54,9 +56,10 @@
         }
         
         /// <summary>
-        /// The time in milliseconds that this message should expire in
+        /// The amount of time that this message is valid for.  null If this
+        /// message does not expire.
         /// </summary>
-        long NMSExpiration
+        TimeSpan NMSExpiration
         {
             get;
             set;
@@ -108,9 +111,9 @@
         
         
         /// <summary>
-        /// The timestamp the broker added to the message
+        /// The timestamp of when the message was pubished.
         /// </summary>
-        long NMSTimestamp
+        DateTime NMSTimestamp
         {
             get;
         }

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/IMessageProducer.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/IMessageProducer.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/IMessageProducer.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/IMessageProducer.cs Sun Oct
 8 06:01:38 2006
@@ -14,6 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+using System;
+
 namespace NMS
 {
 	
@@ -39,7 +41,7 @@
 			set;
 		}
 		
-		long TimeToLive
+		TimeSpan TimeToLive
 		{
 			get;
 			set;

Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/CommonAssemblyInfo.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/CommonAssemblyInfo.cs
(original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/CommonAssemblyInfo.cs
Sun Oct  8 06:01:38 2006
@@ -1,27 +1,27 @@
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// ------------------------------------------------------------------------------
-//  <autogenerated>
-//      This code was generated by a tool.
-//      Mono Runtime Version: 2.0.50727.42
-// 
-//      Changes to this file may cause incorrect behavior and will be lost if 
-//      the code is regenerated.
-//  </autogenerated>
-// ------------------------------------------------------------------------------
-
-[assembly: ComVisibleAttribute(false)]
-[assembly: CLSCompliantAttribute(true)]
-[assembly: AssemblyTitleAttribute("Apache ActiveMQ .NET Tests")]
-[assembly: AssemblyDescriptionAttribute("Unit Tests for the NMS (.Net Messaging Library)
to Apache ActiveMQ")]
-[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
-[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
-[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
-[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
-[assembly: AssemblyTrademarkAttribute("")]
-[assembly: AssemblyCultureAttribute("")]
-[assembly: AssemblyVersionAttribute("4.0")]
-[assembly: AssemblyInformationalVersionAttribute("4.0")]
-
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.42
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: ComVisibleAttribute(false)]
+[assembly: CLSCompliantAttribute(true)]
+[assembly: AssemblyTitleAttribute("Apache ActiveMQ .NET Tests")]
+[assembly: AssemblyDescriptionAttribute("Unit Tests for the NMS (.Net Messaging Library)
to Apache ActiveMQ")]
+[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
+[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
+[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
+[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
+[assembly: AssemblyTrademarkAttribute("")]
+[assembly: AssemblyCultureAttribute("")]
+[assembly: AssemblyVersionAttribute("4.0")]
+[assembly: AssemblyInformationalVersionAttribute("4.0")]
+

Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/CommonAssemblyInfo.cs?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/CommonAssemblyInfo.cs
(original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/CommonAssemblyInfo.cs
Sun Oct  8 06:01:38 2006
@@ -1,27 +1,27 @@
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// ------------------------------------------------------------------------------
-//  <autogenerated>
-//      This code was generated by a tool.
-//      Mono Runtime Version: 1.1.4322.2032
-// 
-//      Changes to this file may cause incorrect behavior and will be lost if 
-//      the code is regenerated.
-//  </autogenerated>
-// ------------------------------------------------------------------------------
-
-[assembly: ComVisibleAttribute(false)]
-[assembly: CLSCompliantAttribute(true)]
-[assembly: AssemblyTitleAttribute("Apache NMS Class Library Tests")]
-[assembly: AssemblyDescriptionAttribute("NMS (.Net Messaging Library) Unit Tests")]
-[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
-[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
-[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
-[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
-[assembly: AssemblyTrademarkAttribute("")]
-[assembly: AssemblyCultureAttribute("")]
-[assembly: AssemblyVersionAttribute("4.0")]
-[assembly: AssemblyInformationalVersionAttribute("4.0")]
-
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.42
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: ComVisibleAttribute(false)]
+[assembly: CLSCompliantAttribute(true)]
+[assembly: AssemblyTitleAttribute("Apache NMS Class Library Tests")]
+[assembly: AssemblyDescriptionAttribute("NMS (.Net Messaging Library) Unit Tests")]
+[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
+[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
+[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
+[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
+[assembly: AssemblyTrademarkAttribute("")]
+[assembly: AssemblyCultureAttribute("")]
+[assembly: AssemblyVersionAttribute("4.0")]
+[assembly: AssemblyInformationalVersionAttribute("4.0")]
+

Modified: incubator/activemq/activemq-dotnet/trunk/vs2005-msmq.csproj
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/vs2005-msmq.csproj?view=diff&rev=454139&r1=454138&r2=454139
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/vs2005-msmq.csproj (original)
+++ incubator/activemq/activemq-dotnet/trunk/vs2005-msmq.csproj Sun Oct  8 06:01:38 2006
@@ -41,7 +41,9 @@
     <Compile Include="src\main\csharp\MSMQ\CommonAssemblyInfo.cs" />
     <Compile Include="src\main\csharp\MSMQ\Connection.cs" />
     <Compile Include="src\main\csharp\MSMQ\ConnectionFactory.cs" />
+    <Compile Include="src\main\csharp\MSMQ\DefaultMessageConverter.cs" />
     <Compile Include="src\main\csharp\MSMQ\Destination.cs" />
+    <Compile Include="src\main\csharp\MSMQ\IMessageConverter.cs" />
     <Compile Include="src\main\csharp\MSMQ\MapMessage.cs" />
     <Compile Include="src\main\csharp\MSMQ\MessageConsumer.cs" />
     <Compile Include="src\main\csharp\MSMQ\MessageProducer.cs" />



Mime
View raw message