You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jg...@apache.org on 2008/10/18 01:26:04 UTC
svn commit: r705777 - in
/activemq/activemq-dotnet/Apache.NMS.MSMQ/tags/1.0.0/src/main/csharp:
MessageConsumer.cs PrimitiveMap.cs
Author: jgomes
Date: Fri Oct 17 16:26:04 2008
New Revision: 705777
URL: http://svn.apache.org/viewvc?rev=705777&view=rev
Log:
Fix .NET 1.1 compiler errors.
Modified:
activemq/activemq-dotnet/Apache.NMS.MSMQ/tags/1.0.0/src/main/csharp/MessageConsumer.cs
activemq/activemq-dotnet/Apache.NMS.MSMQ/tags/1.0.0/src/main/csharp/PrimitiveMap.cs
Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/tags/1.0.0/src/main/csharp/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/tags/1.0.0/src/main/csharp/MessageConsumer.cs?rev=705777&r1=705776&r2=705777&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.MSMQ/tags/1.0.0/src/main/csharp/MessageConsumer.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.MSMQ/tags/1.0.0/src/main/csharp/MessageConsumer.cs Fri Oct 17 16:26:04 2008
@@ -90,7 +90,7 @@
protected virtual void StartAsyncDelivery()
{
if (asyncDelivery.CompareAndSet(false, true)) {
- Thread thread = new Thread(DispatchLoop);
+ Thread thread = new Thread(new ThreadStart(DispatchLoop));
thread.IsBackground = true;
thread.Start();
}
Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/tags/1.0.0/src/main/csharp/PrimitiveMap.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/tags/1.0.0/src/main/csharp/PrimitiveMap.cs?rev=705777&r1=705776&r2=705777&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.MSMQ/tags/1.0.0/src/main/csharp/PrimitiveMap.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.MSMQ/tags/1.0.0/src/main/csharp/PrimitiveMap.cs Fri Oct 17 16:26:04 2008
@@ -17,9 +17,6 @@
using Apache.NMS;
using System;
using System.Collections;
-#if !NET_1_1
-using System.Collections.Generic;
-#endif
namespace Apache.NMS.MSMQ
{
@@ -44,11 +41,7 @@
public const byte LIST_TYPE = 12;
public const byte BIG_STRING_TYPE = 13;
-#if NET_1_1
- private IDictionary dictionary = new Hashtable();
-#else
- private Dictionary<String, object> dictionary = new Dictionary<String, object>();
-#endif
+ private IDictionary dictionary = Hashtable.Synchronized(new Hashtable());
public void Clear()
{
@@ -247,7 +240,6 @@
dictionary[key] = value;
}
-
protected virtual Object GetValue(String key)
{
return dictionary[key];
@@ -279,25 +271,24 @@
/// <returns>A string</returns>
public override String ToString()
{
- String s = "{";
- bool first = true;
-#if NET_1_1
- foreach (DictionaryEntry entry in dictionary)
-#else
- foreach (KeyValuePair<String, object> entry in dictionary)
-#endif
- {
- if (!first)
- {
- s += ", ";
- }
- first = false;
- String name = (String)entry.Key;
- Object value = entry.Value;
- s += name + "=" + value;
- }
- s += "}";
- return s;
+ String s="{";
+ bool first=true;
+ lock(dictionary.SyncRoot)
+ {
+ foreach(DictionaryEntry entry in dictionary)
+ {
+ if(!first)
+ {
+ s+=", ";
+ }
+ first=false;
+ String name = (String) entry.Key;
+ Object value = entry.Value;
+ s += name + "=" + value;
+ }
+ }
+ s += "}";
+ return s;
}
}
}