activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r454506 [8/11] - in /incubator/activemq/activemq-dotnet/trunk/src: main/csharp/ActiveMQ/ main/csharp/ActiveMQ/Commands/ main/csharp/ActiveMQ/OpenWire/ main/csharp/ActiveMQ/OpenWire/V2/ main/csharp/ActiveMQ/Transport/ main/csharp/ActiveMQ/Ut...
Date Mon, 09 Oct 2006 20:59:17 GMT
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=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ConnectionFactory.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ConnectionFactory.cs Mon Oct  9 13:59:14 2006
@@ -1,44 +1,44 @@
-/*
- * 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 NMS;
-using System;
-
-namespace MSMQ
-{
-    /// <summary>
-    /// 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();
-        }
-                
-    }
-}
+/*
+ * 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 NMS;
+using System;
+
+namespace MSMQ
+{
+    /// <summary>
+    /// 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();
+        }
+                
+    }
+}

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ConnectionFactory.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 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=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/DefaultMessageConverter.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/DefaultMessageConverter.cs Mon Oct  9 13:59:14 2006
@@ -1,54 +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;
-        }
-	}
-}
+/*
+ * 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;
+        }
+	}
+}

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/DefaultMessageConverter.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Destination.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Destination.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Destination.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Destination.cs Mon Oct  9 13:59:14 2006
@@ -1,147 +1,147 @@
-/*
- * 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 NMS;
-using System;
-namespace MSMQ
-{
-    
-    /// <summary>
-    /// Summary description for Destination.
-    /// </summary>
-    public abstract class Destination : IDestination
-    {
-        
-        private String path = "";
-        
-        /**
-         * The Default Constructor
-         */
-        protected Destination()
-        {
-        }
-        
-        /**
-         * Construct the Destination with a defined physical name;
-         *
-         * @param name
-         */
-        protected Destination(String name)
-        {
-            this.path = name;
-        }
-                
-        public String Path
-        {
-            get { return this.path; }
-            set { this.path = value; }
-        }
-        
-        /**
-         * Returns true if a temporary Destination
-         *
-         * @return true/false
-         */
-        
-        public bool IsTemporary()
-        {
-            return DestinationType == DestinationType.TemporaryQueue
-                || DestinationType == DestinationType.TemporaryTopic;
-        }
-        
-        /**
-         * Returns true if a Topic Destination
-         *
-         * @return true/false
-         */
-        
-        public bool IsTopic()
-        {
-            return DestinationType == DestinationType.Topic
-                   || DestinationType == DestinationType.TemporaryTopic;
-        }
-        
-        /**
-         * Returns true if a Queue Destination
-         *
-         * @return true/false
-         */
-        public bool IsQueue()
-        {
-            return !IsTopic();
-        }
-        
-        
-        /**
-         * @return string representation of this instance
-         */        
-        public override String ToString()
-        {
-            return this.path;
-        }
-        
-        /**
-         * @return hashCode for this instance
-         */
-        public override int GetHashCode()
-        {
-            int answer = 37;
-            
-            if (this.path != null)
-            {
-                answer = path.GetHashCode();
-            }
-            if (IsTopic())
-            {
-                answer ^= 0xfabfab;
-            }
-            return answer;
-        }
-        
-        /**
-         * if the object passed in is equivalent, return true
-         *
-         * @param obj the object to compare
-         * @return true if this instance and obj are equivalent
-         */
-        public override bool Equals(Object obj)
-        {
-            bool result = this == obj;
-            if (!result && obj != null && obj is Destination)
-            {
-                Destination other = (Destination) obj;
-                result = this.DestinationType == other.DestinationType
-                    && this.path.Equals(other.path);
-            }
-            return result;
-        }
-                
-        /**
-         * Factory method to create a child destination if this destination is a composite
-         * @param name
-         * @return the created Destination
-         */
-        public abstract Destination CreateDestination(String name);
-
-
-		public abstract DestinationType DestinationType
-		{
-			get;
-		}
-
-    }
-}
-
+/*
+ * 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 NMS;
+using System;
+namespace MSMQ
+{
+    
+    /// <summary>
+    /// Summary description for Destination.
+    /// </summary>
+    public abstract class Destination : IDestination
+    {
+        
+        private String path = "";
+        
+        /**
+         * The Default Constructor
+         */
+        protected Destination()
+        {
+        }
+        
+        /**
+         * Construct the Destination with a defined physical name;
+         *
+         * @param name
+         */
+        protected Destination(String name)
+        {
+            this.path = name;
+        }
+                
+        public String Path
+        {
+            get { return this.path; }
+            set { this.path = value; }
+        }
+        
+        /**
+         * Returns true if a temporary Destination
+         *
+         * @return true/false
+         */
+        
+        public bool IsTemporary()
+        {
+            return DestinationType == DestinationType.TemporaryQueue
+                || DestinationType == DestinationType.TemporaryTopic;
+        }
+        
+        /**
+         * Returns true if a Topic Destination
+         *
+         * @return true/false
+         */
+        
+        public bool IsTopic()
+        {
+            return DestinationType == DestinationType.Topic
+                   || DestinationType == DestinationType.TemporaryTopic;
+        }
+        
+        /**
+         * Returns true if a Queue Destination
+         *
+         * @return true/false
+         */
+        public bool IsQueue()
+        {
+            return !IsTopic();
+        }
+        
+        
+        /**
+         * @return string representation of this instance
+         */        
+        public override String ToString()
+        {
+            return this.path;
+        }
+        
+        /**
+         * @return hashCode for this instance
+         */
+        public override int GetHashCode()
+        {
+            int answer = 37;
+            
+            if (this.path != null)
+            {
+                answer = path.GetHashCode();
+            }
+            if (IsTopic())
+            {
+                answer ^= 0xfabfab;
+            }
+            return answer;
+        }
+        
+        /**
+         * if the object passed in is equivalent, return true
+         *
+         * @param obj the object to compare
+         * @return true if this instance and obj are equivalent
+         */
+        public override bool Equals(Object obj)
+        {
+            bool result = this == obj;
+            if (!result && obj != null && obj is Destination)
+            {
+                Destination other = (Destination) obj;
+                result = this.DestinationType == other.DestinationType
+                    && this.path.Equals(other.path);
+            }
+            return result;
+        }
+                
+        /**
+         * Factory method to create a child destination if this destination is a composite
+         * @param name
+         * @return the created Destination
+         */
+        public abstract Destination CreateDestination(String name);
+
+
+		public abstract DestinationType DestinationType
+		{
+			get;
+		}
+
+    }
+}
+

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Destination.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 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=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/IMessageConverter.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/IMessageConverter.cs Mon Oct  9 13:59:14 2006
@@ -1,27 +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);
-    }
-}
+/*
+ * 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);
+    }
+}

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/IMessageConverter.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MapMessage.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MapMessage.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MapMessage.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MapMessage.cs Mon Oct  9 13:59:14 2006
@@ -1,56 +1,56 @@
-/*
- * 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 NMS;
-using System;
-
-
-namespace MSMQ
-{
-	public class MapMessage : BaseMessage, IMapMessage
-    {
-        private PrimitiveMap body;
-                
-        public IPrimitiveMap Body
-        {
-            get {
-                if (body == null)
-                {
-                    // body = PrimitiveMap.Unmarshal(Content);
-                }
-                return body;
-            }
-        }
-        
-//        public override void BeforeMarshall(OpenWireFormat wireFormat)
-//        {
-//            if (body == null)
-//            {
-//                Content = null;
-//            }
-//            else
-//            {
-//                Content = body.Marshal();
-//            }
-//            
-//            Console.WriteLine("BeforeMarshalling, content is: " + Content);
-//			
-//            base.BeforeMarshall(wireFormat);
-//        }
-        
-    }
-}
-
+/*
+ * 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 NMS;
+using System;
+
+
+namespace MSMQ
+{
+	public class MapMessage : BaseMessage, IMapMessage
+    {
+        private PrimitiveMap body;
+                
+        public IPrimitiveMap Body
+        {
+            get {
+                if (body == null)
+                {
+                    // body = PrimitiveMap.Unmarshal(Content);
+                }
+                return body;
+            }
+        }
+        
+//        public override void BeforeMarshall(OpenWireFormat wireFormat)
+//        {
+//            if (body == null)
+//            {
+//                Content = null;
+//            }
+//            else
+//            {
+//                Content = body.Marshal();
+//            }
+//            
+//            Console.WriteLine("BeforeMarshalling, content is: " + Content);
+//			
+//            base.BeforeMarshall(wireFormat);
+//        }
+        
+    }
+}
+

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MapMessage.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageConsumer.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageConsumer.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageConsumer.cs Mon Oct  9 13:59:14 2006
@@ -1,59 +1,59 @@
-/*
- * 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 NMS;
-using System.Threading;
-
-namespace MSMQ
-{
-    /// <summary>
-    /// An object capable of receiving messages from some destination
-    /// </summary>
-    public class MessageConsumer : IMessageConsumer
-    {
-        private readonly Session session;
-        private readonly AcknowledgementMode acknowledgementMode;
-
-        public MessageConsumer(Session session, AcknowledgementMode acknowledgementMode)
-        {
-            this.session = session;
-            this.acknowledgementMode = acknowledgementMode;            
-        }
-
-        public IMessage Receive()
-        {
-            throw new NotImplementedException();
-        }
-
-        public IMessage Receive(TimeSpan timeout)
-        {
-            throw new NotImplementedException();
-        }
-
-        public IMessage ReceiveNoWait()
-        {
-            throw new NotImplementedException();
-        }
-
-        public event MessageListener Listener;
-
-        public void Dispose()
-        {
-            throw new NotImplementedException();
-        }
-    }
-}
+/*
+ * 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 NMS;
+using System.Threading;
+
+namespace MSMQ
+{
+    /// <summary>
+    /// An object capable of receiving messages from some destination
+    /// </summary>
+    public class MessageConsumer : IMessageConsumer
+    {
+        private readonly Session session;
+        private readonly AcknowledgementMode acknowledgementMode;
+
+        public MessageConsumer(Session session, AcknowledgementMode acknowledgementMode)
+        {
+            this.session = session;
+            this.acknowledgementMode = acknowledgementMode;            
+        }
+
+        public IMessage Receive()
+        {
+            throw new NotImplementedException();
+        }
+
+        public IMessage Receive(TimeSpan timeout)
+        {
+            throw new NotImplementedException();
+        }
+
+        public IMessage ReceiveNoWait()
+        {
+            throw new NotImplementedException();
+        }
+
+        public event MessageListener Listener;
+
+        public void Dispose()
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageConsumer.cs
------------------------------------------------------------------------------
    svn:eol-style = native

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=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageProducer.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageProducer.cs Mon Oct  9 13:59:14 2006
@@ -1,211 +1,211 @@
-/*
- * 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.Messaging;
-using NMS;
-
-namespace MSMQ
-{
-    /// <summary>
-    /// An object capable of sending messages to some destination
-    /// </summary>
-    public class MessageProducer : IMessageProducer
-    {
-        private readonly Session session;
-        private Destination destination;
-
-        private long messageCounter;
-        private bool persistent;
-        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);
-            }
-        }
-
-        private MessageQueue openMessageQueue(Destination dest)
-        {
-            MessageQueue rc=null;
-            try
-            {
-                if (!MessageQueue.Exists(dest.Path))
-                {
-                    // create the new message queue and make it transactional
-                    rc = MessageQueue.Create(dest.Path, session.Transacted);
-                    this.destination.Path = rc.Path;
-                } else
-                {
-                    rc = new MessageQueue(dest.Path);
-                    this.destination.Path = rc.Path;
-                    if( !rc.CanWrite )
-                    {
-                        throw new NMSSecurityException("Do not have write access to: " + dest);
-                    }
-                }                
-            } 
-            catch( Exception e ) 
-            {
-                if( rc!=null )
-                {
-                    rc.Dispose();
-                }
-                throw new NMSException(e.Message+": "+dest, e);
-            }            
-            return rc;
-        }
-
-        public void Send(IMessage message)
-        {
-            Send(destination, message);
-        }
-
-        public void Send(IDestination dest, IMessage imessage)
-        {
-            BaseMessage message = (BaseMessage) imessage;
-            MessageQueue mq=null;
-            MessageQueue responseQueue = null;
-            MessageQueueTransaction transaction = null;
-            try
-            {
-                // Locate the MSMQ Queue we will be sending to
-                if (messageQueue != null)
-                {
-                    if( dest.Equals(destination) )
-                    {
-                        mq = messageQueue;
-                    } 
-                    else
-                    {
-                        throw new NMSException("This producer can only be used to send to: "+destination);
-                    }
-                }
-                else
-                {
-                    mq = openMessageQueue((Destination)dest);
-                }
-
-                // Convert the Mesasge into a MSMQ message
-                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 )
-                {
-                    if (session.Transacted)
-                    {
-                        mq.Send(msg, session.MessageQueueTransaction);
-                        
-                    } else
-                    {
-                        // Start our own mini transaction here to send the message.
-                        transaction = new MessageQueueTransaction();
-                        transaction.Begin();
-                        mq.Send(msg, transaction);
-                        transaction.Commit();
-                    }
-                } else
-                {
-                    if( session.Transacted )
-                    {
-                        // We may want to raise an exception here since app requested
-                        // a transeced NMS session, but is using a non transacted message queue
-                        // For now silently ignore it.
-                    }
-                    mq.Send(msg);
-                }
-                
-            } finally
-            {
-                // Cleanup
-                if(transaction!=null)
-                {
-                    transaction.Dispose();
-                }
-                if (responseQueue != null)
-                {
-                    responseQueue.Dispose();
-                }
-                if( mq!=null && mq!=messageQueue )
-                {
-                    mq.Dispose();
-                }
-            }
-        }
-
-        public void Dispose()
-        {
-            if( messageQueue!=null )
-            {
-                messageQueue.Dispose();
-                messageQueue = null;                    
-            }
-        }
-
-        public bool Persistent
-        {
-            get { return persistent; }
-            set { persistent = value; }
-        }
-
-        public TimeSpan TimeToLive
-        {
-            get { return timeToLive; }
-            set { timeToLive = value; }
-        }
-
-        public int Priority
-        {
-            get { return priority; }
-            set { priority = value; }
-        }
-
-        public bool DisableMessageID
-        {
-            get { return disableMessageID; }
-            set { disableMessageID = value; }
-        }
-
-        public bool DisableMessageTimestamp
-        {
-            get { return disableMessageTimestamp; }
-            set { disableMessageTimestamp = value; }
-        }
-
-        public IMessageConverter MessageConverter
-        {
-            get { return messageConverter; }
-            set { messageConverter = value; }
-        }
-
-    }
+/*
+ * 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.Messaging;
+using NMS;
+
+namespace MSMQ
+{
+    /// <summary>
+    /// An object capable of sending messages to some destination
+    /// </summary>
+    public class MessageProducer : IMessageProducer
+    {
+        private readonly Session session;
+        private Destination destination;
+
+        private long messageCounter;
+        private bool persistent;
+        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);
+            }
+        }
+
+        private MessageQueue openMessageQueue(Destination dest)
+        {
+            MessageQueue rc=null;
+            try
+            {
+                if (!MessageQueue.Exists(dest.Path))
+                {
+                    // create the new message queue and make it transactional
+                    rc = MessageQueue.Create(dest.Path, session.Transacted);
+                    this.destination.Path = rc.Path;
+                } else
+                {
+                    rc = new MessageQueue(dest.Path);
+                    this.destination.Path = rc.Path;
+                    if( !rc.CanWrite )
+                    {
+                        throw new NMSSecurityException("Do not have write access to: " + dest);
+                    }
+                }                
+            } 
+            catch( Exception e ) 
+            {
+                if( rc!=null )
+                {
+                    rc.Dispose();
+                }
+                throw new NMSException(e.Message+": "+dest, e);
+            }            
+            return rc;
+        }
+
+        public void Send(IMessage message)
+        {
+            Send(destination, message);
+        }
+
+        public void Send(IDestination dest, IMessage imessage)
+        {
+            BaseMessage message = (BaseMessage) imessage;
+            MessageQueue mq=null;
+            MessageQueue responseQueue = null;
+            MessageQueueTransaction transaction = null;
+            try
+            {
+                // Locate the MSMQ Queue we will be sending to
+                if (messageQueue != null)
+                {
+                    if( dest.Equals(destination) )
+                    {
+                        mq = messageQueue;
+                    } 
+                    else
+                    {
+                        throw new NMSException("This producer can only be used to send to: "+destination);
+                    }
+                }
+                else
+                {
+                    mq = openMessageQueue((Destination)dest);
+                }
+
+                // Convert the Mesasge into a MSMQ message
+                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 )
+                {
+                    if (session.Transacted)
+                    {
+                        mq.Send(msg, session.MessageQueueTransaction);
+                        
+                    } else
+                    {
+                        // Start our own mini transaction here to send the message.
+                        transaction = new MessageQueueTransaction();
+                        transaction.Begin();
+                        mq.Send(msg, transaction);
+                        transaction.Commit();
+                    }
+                } else
+                {
+                    if( session.Transacted )
+                    {
+                        // We may want to raise an exception here since app requested
+                        // a transeced NMS session, but is using a non transacted message queue
+                        // For now silently ignore it.
+                    }
+                    mq.Send(msg);
+                }
+                
+            } finally
+            {
+                // Cleanup
+                if(transaction!=null)
+                {
+                    transaction.Dispose();
+                }
+                if (responseQueue != null)
+                {
+                    responseQueue.Dispose();
+                }
+                if( mq!=null && mq!=messageQueue )
+                {
+                    mq.Dispose();
+                }
+            }
+        }
+
+        public void Dispose()
+        {
+            if( messageQueue!=null )
+            {
+                messageQueue.Dispose();
+                messageQueue = null;                    
+            }
+        }
+
+        public bool Persistent
+        {
+            get { return persistent; }
+            set { persistent = value; }
+        }
+
+        public TimeSpan TimeToLive
+        {
+            get { return timeToLive; }
+            set { timeToLive = value; }
+        }
+
+        public int Priority
+        {
+            get { return priority; }
+            set { priority = value; }
+        }
+
+        public bool DisableMessageID
+        {
+            get { return disableMessageID; }
+            set { disableMessageID = value; }
+        }
+
+        public bool DisableMessageTimestamp
+        {
+            get { return disableMessageTimestamp; }
+            set { disableMessageTimestamp = value; }
+        }
+
+        public IMessageConverter MessageConverter
+        {
+            get { return messageConverter; }
+            set { messageConverter = value; }
+        }
+
+    }
 }

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/MessageProducer.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ObjectMessage.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ObjectMessage.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ObjectMessage.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ObjectMessage.cs Mon Oct  9 13:59:14 2006
@@ -1,27 +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;
-using System.Collections;
-
-namespace MSMQ
-{
-    public class ObjectMessage : BaseMessage
-    {
-
-    }
-}
+/*
+* 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;
+
+namespace MSMQ
+{
+    public class ObjectMessage : BaseMessage
+    {
+
+    }
+}

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/ObjectMessage.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/PrimitiveMap.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/PrimitiveMap.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/PrimitiveMap.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/PrimitiveMap.cs Mon Oct  9 13:59:14 2006
@@ -1,293 +1,293 @@
-/*
- * 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 NMS;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace MSMQ
-{
-    /// <summary>
-    /// A default implementation of IPrimitiveMap
-    /// </summary>
-    [Serializable()]
-    public class PrimitiveMap : IPrimitiveMap
-    {
-        public const byte NULL = 0;
-        public const byte BOOLEAN_TYPE = 1;
-        public const byte BYTE_TYPE = 2;
-        public const byte CHAR_TYPE = 3;
-        public const byte SHORT_TYPE = 4;
-        public const byte INTEGER_TYPE = 5;
-        public const byte LONG_TYPE = 6;
-        public const byte DOUBLE_TYPE = 7;
-        public const byte FLOAT_TYPE = 8;
-        public const byte STRING_TYPE = 9;
-        public const byte BYTE_ARRAY_TYPE = 10;
-        public const byte MAP_TYPE = 11;
-        public const byte LIST_TYPE = 12;
-        public const byte BIG_STRING_TYPE = 13;
-
-        private Dictionary<String, object> dictionary = new Dictionary<String, object>();
-
-        public void Clear()
-        {
-            dictionary.Clear();
-        }
-
-        public bool Contains(Object key)
-        {
-            return dictionary.ContainsKey((string) key);
-        }
-
-        public void Remove(Object key)
-        {
-            dictionary.Remove((string) key);
-        }
-
-
-        public int Count
-        {
-            get
-            {
-                return dictionary.Count;
-            }
-        }
-
-        public ICollection Keys
-        {
-            get
-            {
-                return dictionary.Keys;
-            }
-        }
-
-        public ICollection Values
-        {
-            get
-            {
-                return dictionary.Values;
-            }
-        }
-
-        public object this[string key]
-        {
-            get
-            {
-                return GetValue(key);
-            }
-            set
-            {
-                CheckValidType(value);
-                SetValue(key, value);
-            }
-        }
-
-        public string GetString(string key)
-        {
-            Object value = GetValue(key);
-            CheckValueType(value, typeof(string));
-            return (string)value;
-        }
-
-        public void SetString(string key, string value)
-        {
-            SetValue(key, value);
-        }
-
-        public bool GetBool(String key)
-        {
-            Object value = GetValue(key);
-            CheckValueType(value, typeof(bool));
-            return (bool)value;
-        }
-
-        public void SetBool(String key, bool value)
-        {
-            SetValue(key, value);
-        }
-
-        public byte GetByte(String key)
-        {
-            Object value = GetValue(key);
-            CheckValueType(value, typeof(byte));
-            return (byte)value;
-        }
-
-        public void SetByte(String key, byte value)
-        {
-            SetValue(key, value);
-        }
-
-        public char GetChar(String key)
-        {
-            Object value = GetValue(key);
-            CheckValueType(value, typeof(char));
-            return (char)value;
-        }
-
-        public void SetChar(String key, char value)
-        {
-            SetValue(key, value);
-        }
-
-        public short GetShort(String key)
-        {
-            Object value = GetValue(key);
-            CheckValueType(value, typeof(short));
-            return (short)value;
-        }
-
-        public void SetShort(String key, short value)
-        {
-            SetValue(key, value);
-        }
-
-        public int GetInt(String key)
-        {
-            Object value = GetValue(key);
-            CheckValueType(value, typeof(int));
-            return (int)value;
-        }
-
-        public void SetInt(String key, int value)
-        {
-            SetValue(key, value);
-        }
-
-        public long GetLong(String key)
-        {
-            Object value = GetValue(key);
-            CheckValueType(value, typeof(long));
-            return (long)value;
-        }
-
-        public void SetLong(String key, long value)
-        {
-            SetValue(key, value);
-        }
-
-        public float GetFloat(String key)
-        {
-            Object value = GetValue(key);
-            CheckValueType(value, typeof(float));
-            return (float)value;
-        }
-
-        public void SetFloat(String key, float value)
-        {
-            SetValue(key, value);
-        }
-
-        public double GetDouble(String key)
-        {
-            Object value = GetValue(key);
-            CheckValueType(value, typeof(double));
-            return (double)value;
-        }
-
-        public void SetDouble(String key, double value)
-        {
-            SetValue(key, value);
-        }
-
-        public IList GetList(String key)
-        {
-            Object value = GetValue(key);
-            if (value != null && !(value is IList))
-            {
-                throw new NMSException("Property: " + key + " is not an IList but is: " + value);
-            }
-            return (IList)value;
-        }
-
-        public void SetList(String key, IList value)
-        {
-            SetValue(key, value);
-        }
-
-        public IDictionary GetDictionary(String key)
-        {
-            Object value = GetValue(key);
-            if (value != null && !(value is IDictionary))
-            {
-                throw new NMSException("Property: " + key + " is not an IDictionary but is: " + value);
-            }
-            return (IDictionary)value;
-        }
-
-        public void SetDictionary(String key, IDictionary value)
-        {
-            SetValue(key, value);
-        }
-
-
-        protected virtual void SetValue(String key, Object value)
-        {
-            dictionary[key] = value;
-        }
-
-
-        protected virtual Object GetValue(String key)
-        {
-            return dictionary[key];
-        }
-
-        protected virtual void CheckValueType(Object value, Type type)
-        {
-            if (!type.IsInstanceOfType(value))
-            {
-                throw new NMSException("Expected type: " + type.Name + " but was: " + value);
-            }
-        }
-
-        protected virtual void CheckValidType(Object value)
-        {
-            if (value != null && !(value is IList) && !(value is IDictionary))
-            {
-                Type type = value.GetType();
-                if (!type.IsPrimitive && !type.IsValueType && !type.IsAssignableFrom(typeof(string)))
-                {
-                    throw new NMSException("Invalid type: " + type.Name + " for value: " + value);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Method ToString
-        /// </summary>
-        /// <returns>A string</returns>
-        public override String ToString()
-        {
-            String s = "{";
-            bool first = true;
-            foreach (KeyValuePair<String, object> entry in dictionary)
-            {
-                if (!first)
-                {
-                    s += ", ";
-                }
-                first = false;
-                String name = (String)entry.Key;
-                Object value = entry.Value;
-                s += name + "=" + value;
-            }
-            s += "}";
-            return s;
-        }
-    }
-}
+/*
+ * 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 NMS;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace MSMQ
+{
+    /// <summary>
+    /// A default implementation of IPrimitiveMap
+    /// </summary>
+    [Serializable()]
+    public class PrimitiveMap : IPrimitiveMap
+    {
+        public const byte NULL = 0;
+        public const byte BOOLEAN_TYPE = 1;
+        public const byte BYTE_TYPE = 2;
+        public const byte CHAR_TYPE = 3;
+        public const byte SHORT_TYPE = 4;
+        public const byte INTEGER_TYPE = 5;
+        public const byte LONG_TYPE = 6;
+        public const byte DOUBLE_TYPE = 7;
+        public const byte FLOAT_TYPE = 8;
+        public const byte STRING_TYPE = 9;
+        public const byte BYTE_ARRAY_TYPE = 10;
+        public const byte MAP_TYPE = 11;
+        public const byte LIST_TYPE = 12;
+        public const byte BIG_STRING_TYPE = 13;
+
+        private Dictionary<String, object> dictionary = new Dictionary<String, object>();
+
+        public void Clear()
+        {
+            dictionary.Clear();
+        }
+
+        public bool Contains(Object key)
+        {
+            return dictionary.ContainsKey((string) key);
+        }
+
+        public void Remove(Object key)
+        {
+            dictionary.Remove((string) key);
+        }
+
+
+        public int Count
+        {
+            get
+            {
+                return dictionary.Count;
+            }
+        }
+
+        public ICollection Keys
+        {
+            get
+            {
+                return dictionary.Keys;
+            }
+        }
+
+        public ICollection Values
+        {
+            get
+            {
+                return dictionary.Values;
+            }
+        }
+
+        public object this[string key]
+        {
+            get
+            {
+                return GetValue(key);
+            }
+            set
+            {
+                CheckValidType(value);
+                SetValue(key, value);
+            }
+        }
+
+        public string GetString(string key)
+        {
+            Object value = GetValue(key);
+            CheckValueType(value, typeof(string));
+            return (string)value;
+        }
+
+        public void SetString(string key, string value)
+        {
+            SetValue(key, value);
+        }
+
+        public bool GetBool(String key)
+        {
+            Object value = GetValue(key);
+            CheckValueType(value, typeof(bool));
+            return (bool)value;
+        }
+
+        public void SetBool(String key, bool value)
+        {
+            SetValue(key, value);
+        }
+
+        public byte GetByte(String key)
+        {
+            Object value = GetValue(key);
+            CheckValueType(value, typeof(byte));
+            return (byte)value;
+        }
+
+        public void SetByte(String key, byte value)
+        {
+            SetValue(key, value);
+        }
+
+        public char GetChar(String key)
+        {
+            Object value = GetValue(key);
+            CheckValueType(value, typeof(char));
+            return (char)value;
+        }
+
+        public void SetChar(String key, char value)
+        {
+            SetValue(key, value);
+        }
+
+        public short GetShort(String key)
+        {
+            Object value = GetValue(key);
+            CheckValueType(value, typeof(short));
+            return (short)value;
+        }
+
+        public void SetShort(String key, short value)
+        {
+            SetValue(key, value);
+        }
+
+        public int GetInt(String key)
+        {
+            Object value = GetValue(key);
+            CheckValueType(value, typeof(int));
+            return (int)value;
+        }
+
+        public void SetInt(String key, int value)
+        {
+            SetValue(key, value);
+        }
+
+        public long GetLong(String key)
+        {
+            Object value = GetValue(key);
+            CheckValueType(value, typeof(long));
+            return (long)value;
+        }
+
+        public void SetLong(String key, long value)
+        {
+            SetValue(key, value);
+        }
+
+        public float GetFloat(String key)
+        {
+            Object value = GetValue(key);
+            CheckValueType(value, typeof(float));
+            return (float)value;
+        }
+
+        public void SetFloat(String key, float value)
+        {
+            SetValue(key, value);
+        }
+
+        public double GetDouble(String key)
+        {
+            Object value = GetValue(key);
+            CheckValueType(value, typeof(double));
+            return (double)value;
+        }
+
+        public void SetDouble(String key, double value)
+        {
+            SetValue(key, value);
+        }
+
+        public IList GetList(String key)
+        {
+            Object value = GetValue(key);
+            if (value != null && !(value is IList))
+            {
+                throw new NMSException("Property: " + key + " is not an IList but is: " + value);
+            }
+            return (IList)value;
+        }
+
+        public void SetList(String key, IList value)
+        {
+            SetValue(key, value);
+        }
+
+        public IDictionary GetDictionary(String key)
+        {
+            Object value = GetValue(key);
+            if (value != null && !(value is IDictionary))
+            {
+                throw new NMSException("Property: " + key + " is not an IDictionary but is: " + value);
+            }
+            return (IDictionary)value;
+        }
+
+        public void SetDictionary(String key, IDictionary value)
+        {
+            SetValue(key, value);
+        }
+
+
+        protected virtual void SetValue(String key, Object value)
+        {
+            dictionary[key] = value;
+        }
+
+
+        protected virtual Object GetValue(String key)
+        {
+            return dictionary[key];
+        }
+
+        protected virtual void CheckValueType(Object value, Type type)
+        {
+            if (!type.IsInstanceOfType(value))
+            {
+                throw new NMSException("Expected type: " + type.Name + " but was: " + value);
+            }
+        }
+
+        protected virtual void CheckValidType(Object value)
+        {
+            if (value != null && !(value is IList) && !(value is IDictionary))
+            {
+                Type type = value.GetType();
+                if (!type.IsPrimitive && !type.IsValueType && !type.IsAssignableFrom(typeof(string)))
+                {
+                    throw new NMSException("Invalid type: " + type.Name + " for value: " + value);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Method ToString
+        /// </summary>
+        /// <returns>A string</returns>
+        public override String ToString()
+        {
+            String s = "{";
+            bool first = true;
+            foreach (KeyValuePair<String, object> entry in dictionary)
+            {
+                if (!first)
+                {
+                    s += ", ";
+                }
+                first = false;
+                String name = (String)entry.Key;
+                Object value = entry.Value;
+                s += name + "=" + value;
+            }
+            s += "}";
+            return s;
+        }
+    }
+}

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/PrimitiveMap.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Queue.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Queue.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Queue.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Queue.cs Mon Oct  9 13:59:14 2006
@@ -1,54 +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 NMS;
-using System;
-
-namespace MSMQ
-{
-	
-	/// <summary>
-	/// Summary description for Queue.
-	/// </summary>
-	public class Queue : Destination, IQueue
-    {        
-        public Queue() : base()
-        {
-        }
-        public Queue(String name) : base(name)
-        {
-        }
-		
-		override public DestinationType DestinationType
-		{
-			get {
-				return DestinationType.Queue;
-			}
-		}
-		
-        public String QueueName
-        {
-            get { return Path; }
-        }
-        
-        
-        public override Destination CreateDestination(String name)
-        {
-            return new Queue(name);
-        }
-    }
-}
-
+/*
+ * 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 NMS;
+using System;
+
+namespace MSMQ
+{
+	
+	/// <summary>
+	/// Summary description for Queue.
+	/// </summary>
+	public class Queue : Destination, IQueue
+    {        
+        public Queue() : base()
+        {
+        }
+        public Queue(String name) : base(name)
+        {
+        }
+		
+		override public DestinationType DestinationType
+		{
+			get {
+				return DestinationType.Queue;
+			}
+		}
+		
+        public String QueueName
+        {
+            get { return Path; }
+        }
+        
+        
+        public override Destination CreateDestination(String name)
+        {
+            return new Queue(name);
+        }
+    }
+}
+

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Queue.cs
------------------------------------------------------------------------------
    svn:eol-style = native

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=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Session.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Session.cs Mon Oct  9 13:59:14 2006
@@ -1,180 +1,180 @@
-/*
- * 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;
-using System;
-
-namespace MSMQ
-{
-    /// <summary>
-    /// MSQM provider of ISession
-    /// </summary>
-    public class Session : ISession
-    {
-        private Connection connection;
-        private AcknowledgementMode acknowledgementMode;
-        private MessageQueueTransaction messageQueueTransaction;
-        private IMessageConverter messageConverter;
-
-        public Session(Connection connection, AcknowledgementMode acknowledgementMode)
-        {
-            this.connection = connection;
-            this.acknowledgementMode = acknowledgementMode;
-            MessageConverter = connection.MessageConverter;
-            if (this.acknowledgementMode == AcknowledgementMode.Transactional)
-            {
-                MessageQueueTransaction = new MessageQueueTransaction();
-            }
-        }
-
-        public void Dispose()
-        {
-            if(MessageQueueTransaction!=null)
-            {
-                MessageQueueTransaction.Dispose();
-            }
-        }
-        
-        public IMessageProducer CreateProducer()
-        {
-            return CreateProducer(null);
-        }
-        
-        public IMessageProducer CreateProducer(IDestination destination)
-        {
-            return new MessageProducer(this, (Destination) destination);
-        }
-        
-        public IMessageConsumer CreateConsumer(IDestination destination)
-        {
-            return CreateConsumer(destination, null);
-        }
-        
-        public IMessageConsumer CreateConsumer(IDestination destination, string selector)
-        {
-            return new MessageConsumer(this, acknowledgementMode);
-        }
-        
-        public IMessageConsumer CreateDurableConsumer(ITopic destination, string name, string selector, bool noLocal)
-        {
-            return null;
-        }
-        
-        public IQueue GetQueue(string name)
-        {
-            return new Queue(name);
-        }
-        
-        public ITopic GetTopic(string name)
-        {
-            throw new NotImplementedException("Topics are not supported by MSQM");
-        }
-        
-        public ITemporaryQueue CreateTemporaryQueue()
-        {
-            throw new NotImplementedException("Tempoary Queues are not supported by MSQM");
-        }
-        
-        public ITemporaryTopic CreateTemporaryTopic()
-        {
-            throw new NotImplementedException("Tempoary Topics are not supported by MSQM");
-        }
-        
-        public IMessage CreateMessage()
-        {
-            BaseMessage answer = new BaseMessage();
-            return answer;
-        }
-        
-        
-        public ITextMessage CreateTextMessage()
-        {
-            TextMessage answer = new TextMessage();
-            return answer;
-        }
-        
-        public ITextMessage CreateTextMessage(string text)
-        {
-            TextMessage answer = new TextMessage(text);
-            return answer;
-        }
-        
-        public IMapMessage CreateMapMessage()
-        {
-            return new MapMessage();
-        }
-        
-        public IBytesMessage CreateBytesMessage()
-        {
-            return new BytesMessage();
-        }
-        
-        public IBytesMessage CreateBytesMessage(byte[] body)
-        {
-            BytesMessage answer = new BytesMessage();
-            answer.Content = body;
-            return answer;
-        }
-        
-        public void Commit()
-        {
-            if (! Transacted )
-            {
-                throw new InvalidOperationException("You cannot perform a Commit() on a non-transacted session. Acknowlegement mode is: " + acknowledgementMode);
-            }
-            messageQueueTransaction.Commit();
-        }
-        
-        public void Rollback()
-        {
-            if (! Transacted)
-            {
-                throw new InvalidOperationException("You cannot perform a Commit() on a non-transacted session. Acknowlegement mode is: " + acknowledgementMode);
-            }
-            messageQueueTransaction.Abort();            
-        }
-        
-        // Properties        
-        public Connection Connection
-        {
-            get { return connection; }
-        }
-        
-        public bool Transacted
-        {
-            get { return acknowledgementMode == AcknowledgementMode.Transactional; }
-        }
-        
-        public MessageQueueTransaction MessageQueueTransaction
-        {
-            get
-            {
-                if( messageQueueTransaction.Status != MessageQueueTransactionStatus.Pending ) 
-                    messageQueueTransaction.Begin();
-                return messageQueueTransaction;
-            }
-            set { messageQueueTransaction = value; }
-        }
-
-        public IMessageConverter MessageConverter
-        {
-            get { return messageConverter; }
-            set { messageConverter = value; }
-        }
-
-    }
-}
+/*
+ * 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;
+using System;
+
+namespace MSMQ
+{
+    /// <summary>
+    /// MSQM provider of ISession
+    /// </summary>
+    public class Session : ISession
+    {
+        private Connection connection;
+        private AcknowledgementMode acknowledgementMode;
+        private MessageQueueTransaction messageQueueTransaction;
+        private IMessageConverter messageConverter;
+
+        public Session(Connection connection, AcknowledgementMode acknowledgementMode)
+        {
+            this.connection = connection;
+            this.acknowledgementMode = acknowledgementMode;
+            MessageConverter = connection.MessageConverter;
+            if (this.acknowledgementMode == AcknowledgementMode.Transactional)
+            {
+                MessageQueueTransaction = new MessageQueueTransaction();
+            }
+        }
+
+        public void Dispose()
+        {
+            if(MessageQueueTransaction!=null)
+            {
+                MessageQueueTransaction.Dispose();
+            }
+        }
+        
+        public IMessageProducer CreateProducer()
+        {
+            return CreateProducer(null);
+        }
+        
+        public IMessageProducer CreateProducer(IDestination destination)
+        {
+            return new MessageProducer(this, (Destination) destination);
+        }
+        
+        public IMessageConsumer CreateConsumer(IDestination destination)
+        {
+            return CreateConsumer(destination, null);
+        }
+        
+        public IMessageConsumer CreateConsumer(IDestination destination, string selector)
+        {
+            return new MessageConsumer(this, acknowledgementMode);
+        }
+        
+        public IMessageConsumer CreateDurableConsumer(ITopic destination, string name, string selector, bool noLocal)
+        {
+            return null;
+        }
+        
+        public IQueue GetQueue(string name)
+        {
+            return new Queue(name);
+        }
+        
+        public ITopic GetTopic(string name)
+        {
+            throw new NotImplementedException("Topics are not supported by MSQM");
+        }
+        
+        public ITemporaryQueue CreateTemporaryQueue()
+        {
+            throw new NotImplementedException("Tempoary Queues are not supported by MSQM");
+        }
+        
+        public ITemporaryTopic CreateTemporaryTopic()
+        {
+            throw new NotImplementedException("Tempoary Topics are not supported by MSQM");
+        }
+        
+        public IMessage CreateMessage()
+        {
+            BaseMessage answer = new BaseMessage();
+            return answer;
+        }
+        
+        
+        public ITextMessage CreateTextMessage()
+        {
+            TextMessage answer = new TextMessage();
+            return answer;
+        }
+        
+        public ITextMessage CreateTextMessage(string text)
+        {
+            TextMessage answer = new TextMessage(text);
+            return answer;
+        }
+        
+        public IMapMessage CreateMapMessage()
+        {
+            return new MapMessage();
+        }
+        
+        public IBytesMessage CreateBytesMessage()
+        {
+            return new BytesMessage();
+        }
+        
+        public IBytesMessage CreateBytesMessage(byte[] body)
+        {
+            BytesMessage answer = new BytesMessage();
+            answer.Content = body;
+            return answer;
+        }
+        
+        public void Commit()
+        {
+            if (! Transacted )
+            {
+                throw new InvalidOperationException("You cannot perform a Commit() on a non-transacted session. Acknowlegement mode is: " + acknowledgementMode);
+            }
+            messageQueueTransaction.Commit();
+        }
+        
+        public void Rollback()
+        {
+            if (! Transacted)
+            {
+                throw new InvalidOperationException("You cannot perform a Commit() on a non-transacted session. Acknowlegement mode is: " + acknowledgementMode);
+            }
+            messageQueueTransaction.Abort();            
+        }
+        
+        // Properties        
+        public Connection Connection
+        {
+            get { return connection; }
+        }
+        
+        public bool Transacted
+        {
+            get { return acknowledgementMode == AcknowledgementMode.Transactional; }
+        }
+        
+        public MessageQueueTransaction MessageQueueTransaction
+        {
+            get
+            {
+                if( messageQueueTransaction.Status != MessageQueueTransactionStatus.Pending ) 
+                    messageQueueTransaction.Begin();
+                return messageQueueTransaction;
+            }
+            set { messageQueueTransaction = value; }
+        }
+
+        public IMessageConverter MessageConverter
+        {
+            get { return messageConverter; }
+            set { messageConverter = value; }
+        }
+
+    }
+}

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/Session.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/StreamMessage.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/StreamMessage.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/StreamMessage.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/StreamMessage.cs Mon Oct  9 13:59:14 2006
@@ -1,25 +1,25 @@
-/*
- * 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.
- */
-
-namespace MSMQ
-{
-	public class StreamMessage : BaseMessage
-    {
-		
-    }
-}
-
+/*
+ * 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.
+ */
+
+namespace MSMQ
+{
+	public class StreamMessage : BaseMessage
+    {
+		
+    }
+}
+

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/StreamMessage.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/TextMessage.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/TextMessage.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/TextMessage.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/TextMessage.cs Mon Oct  9 13:59:14 2006
@@ -1,95 +1,95 @@
-/*
- * 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 NMS;
-using System;
-
-
-namespace MSMQ
-{
-	public class TextMessage : BaseMessage, ITextMessage
-    {
-        private String text;
-        
-        public TextMessage()
-        {
-        }
-        
-        public TextMessage(String text)
-        {
-            this.Text = text;
-        }
-        
-        
-        // Properties
-        
-        public string Text
-        {
-            get {
-                if (text == null)
-                {
-                    // now lets read the content
-                    byte[] data = this.Content;
-                    if (data != null)
-                    {
-                        // TODO assume that the text is ASCII
-                        char[] chars = new char[data.Length-sizeof(int)];
-                        for (int i = 0; i < chars.Length; i++)
-                        {
-                            chars[i] = (char) data[i+sizeof(int)];
-                        }
-                        text = new String(chars);
-                    }
-                }
-                return text;
-            }
-            
-            set {
-                this.text = value;
-                byte[] data = null;
-                if (text != null)
-                {
-					// TODO assume that the text is ASCII
-					
-                    byte[] sizePrefix = System.BitConverter.GetBytes(text.Length);
-					data = new byte[text.Length + sizePrefix.Length];  //int at the front of it
-															
-					// add the size prefix
-					for (int j = 0; j < sizePrefix.Length; j++)
-                    {
-						// The bytes need to be encoded in big endian
-						if ( BitConverter.IsLittleEndian ) {
-							data[j] = sizePrefix[sizePrefix.Length - j - 1];
-						} else {
-							data[j] = sizePrefix[j];
-						}
-                    }
-					
-					// Add the data.
-                    char[] chars = text.ToCharArray();
-					for (int i = 0; i < chars.Length; i++)
-                    {
-                        data[i + sizePrefix.Length] = (byte)chars[i];
-                    }
-				}
-				this.Content = data;
-					
-            }
-        }
-
-    }
-}
-
+/*
+ * 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 NMS;
+using System;
+
+
+namespace MSMQ
+{
+	public class TextMessage : BaseMessage, ITextMessage
+    {
+        private String text;
+        
+        public TextMessage()
+        {
+        }
+        
+        public TextMessage(String text)
+        {
+            this.Text = text;
+        }
+        
+        
+        // Properties
+        
+        public string Text
+        {
+            get {
+                if (text == null)
+                {
+                    // now lets read the content
+                    byte[] data = this.Content;
+                    if (data != null)
+                    {
+                        // TODO assume that the text is ASCII
+                        char[] chars = new char[data.Length-sizeof(int)];
+                        for (int i = 0; i < chars.Length; i++)
+                        {
+                            chars[i] = (char) data[i+sizeof(int)];
+                        }
+                        text = new String(chars);
+                    }
+                }
+                return text;
+            }
+            
+            set {
+                this.text = value;
+                byte[] data = null;
+                if (text != null)
+                {
+					// TODO assume that the text is ASCII
+					
+                    byte[] sizePrefix = System.BitConverter.GetBytes(text.Length);
+					data = new byte[text.Length + sizePrefix.Length];  //int at the front of it
+															
+					// add the size prefix
+					for (int j = 0; j < sizePrefix.Length; j++)
+                    {
+						// The bytes need to be encoded in big endian
+						if ( BitConverter.IsLittleEndian ) {
+							data[j] = sizePrefix[sizePrefix.Length - j - 1];
+						} else {
+							data[j] = sizePrefix[j];
+						}
+                    }
+					
+					// Add the data.
+                    char[] chars = text.ToCharArray();
+					for (int i = 0; i < chars.Length; i++)
+                    {
+                        data[i + sizePrefix.Length] = (byte)chars[i];
+                    }
+				}
+				this.Content = data;
+					
+            }
+        }
+
+    }
+}
+

Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/TextMessage.cs
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message