diff options
Diffstat (limited to 'mcs')
24 files changed, 97 insertions, 56 deletions
diff --git a/mcs/class/Makefile b/mcs/class/Makefile index 5bbdc71b6c5..441bae50e78 100644 --- a/mcs/class/Makefile +++ b/mcs/class/Makefile @@ -77,7 +77,6 @@ common_dirs := \ RabbitMQ.Client \ Mono.Messaging \ System.Messaging \ - Mono.Messaging.RabbitMQ \ System.ServiceProcess \ System.Drawing.Design \ System.Design \ @@ -120,7 +119,8 @@ net_2_0_dirs := \ Mono.Management \ Mono.Options \ Mono.Simd \ - Mono.Tasklets + Mono.Tasklets \ + Mono.Messaging.RabbitMQ net_2_0_only_dirs := \ System.Web.Extensions_1.0 \ diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Assembly/AssemblyInfo.cs b/mcs/class/Mono.Messaging.RabbitMQ/Assembly/AssemblyInfo.cs index 0cdccf6c4ed..ed35d9aa8d1 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Assembly/AssemblyInfo.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Assembly/AssemblyInfo.cs @@ -53,7 +53,7 @@ using System.Runtime.InteropServices; [assembly: ComVisible (false)] -[assembly: CLSCompliant (true)] +[assembly: CLSCompliant (false)] [assembly: AssemblyDelaySign (true)] [assembly: AssemblyKeyFile("../msfinal.pub")] diff --git a/mcs/class/Mono.Messaging.RabbitMQ/ChangeLog b/mcs/class/Mono.Messaging.RabbitMQ/ChangeLog index 7812d3ee03d..76528499b65 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/ChangeLog +++ b/mcs/class/Mono.Messaging.RabbitMQ/ChangeLog @@ -1,3 +1,8 @@ +2009-07-11 Michael Barker <mike@middlesoft.co.uk> + + * Mono.Messaging.RabbitMQ_test.dll.sources: Moved MessageEnumeratorTest.cs + and MessageBaseTest.cs from Mono.Messaging.Test. + 2009-01-05 Michael Barker <mike@middlesoft.co.uk> * Makefile: Added nunit.mocks to test build diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/ChangeLog b/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/ChangeLog index c2caba20d62..e9c111dd57c 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/ChangeLog +++ b/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/ChangeLog @@ -1,3 +1,10 @@ +2009-07-11 Michael Barker <mike@middlesoft.co.uk> + + * MessageFactory.cs: Switched to DateTime.UtcNow. + * RabbitMQMessageQueue.cs: Removed some unecessary references to realm. + * RabbitMQMessagingProvider.cs: Removed some unecessary references to realm. + Changed volatile field to use Interlocked.Increment (++i is not thread safe). + 2009-05-23 Michael Barker <mike@middlesoft.co.uk> * MessageFactory.cs: Moved TimeSpanToInt32 method to here. diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/MessageFactory.cs b/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/MessageFactory.cs index cdf57dd7d6a..fa9d44d5f4c 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/MessageFactory.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/MessageFactory.cs @@ -85,7 +85,7 @@ namespace Mono.Messaging.RabbitMQ { if (msg.CorrelationId != null) mb.Properties.CorrelationId = msg.CorrelationId; // TODO: Change to DateTime.UtcNow?? - mb.Properties.Timestamp = MessageFactory.DateTimeToAmqpTimestamp (DateTime.Now); + mb.Properties.Timestamp = MessageFactory.DateTimeToAmqpTimestamp (DateTime.UtcNow); Hashtable headers = new Hashtable (); headers[SENDER_VERSION_KEY] = msg.SenderVersion; diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/RabbitMQMessageQueue.cs b/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/RabbitMQMessageQueue.cs index ef2f6461df1..03069f252ad 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/RabbitMQMessageQueue.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/RabbitMQMessageQueue.cs @@ -62,7 +62,6 @@ namespace Mono.Messaging.RabbitMQ { private QueueReference qRef = QueueReference.DEFAULT; private readonly RabbitMQMessagingProvider provider; private readonly MessageFactory helper; - private readonly string realm; private readonly bool transactional; public RabbitMQMessageQueue (RabbitMQMessagingProvider provider, @@ -74,17 +73,9 @@ namespace Mono.Messaging.RabbitMQ { public RabbitMQMessageQueue (RabbitMQMessagingProvider provider, QueueReference qRef, bool transactional) - : this (provider, "/data", qRef, transactional) - { - } - - public RabbitMQMessageQueue (RabbitMQMessagingProvider provider, - string realm, QueueReference qRef, - bool transactional) { this.provider = provider; this.helper = new MessageFactory (provider); - this.realm = realm; this.qRef = qRef; this.transactional = transactional; } @@ -203,7 +194,7 @@ namespace Mono.Messaging.RabbitMQ { // No-op (Queue are currently stateless) } - public static void Delete (string realm, QueueReference qRef) + public static void Delete (QueueReference qRef) { ConnectionFactory cf = new ConnectionFactory (); diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/RabbitMQMessagingProvider.cs b/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/RabbitMQMessagingProvider.cs index 45445659d0e..90aaf7101a5 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/RabbitMQMessagingProvider.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ/RabbitMQMessagingProvider.cs @@ -40,9 +40,8 @@ namespace Mono.Messaging.RabbitMQ { public class RabbitMQMessagingProvider : IMessagingProvider { - private volatile uint txCounter = 0; + private int txCounter = 0; private readonly uint localIp; - private static readonly string DEFAULT_REALM = "/data"; public RabbitMQMessagingProvider() { @@ -74,13 +73,14 @@ namespace Mono.Messaging.RabbitMQ { public IMessageQueueTransaction CreateMessageQueueTransaction () { - string txId = localIp.ToString () + (++txCounter).ToString (); + Interlocked.Increment (ref txCounter); + string txId = localIp.ToString () + txCounter.ToString (); return new RabbitMQMessageQueueTransaction (txId); } public void DeleteQueue (QueueReference qRef) { - RabbitMQMessageQueue.Delete (DEFAULT_REALM, qRef); + RabbitMQMessageQueue.Delete (qRef); } private readonly IDictionary queues = new Hashtable (); diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ_test.dll.sources b/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ_test.dll.sources index 13e7409ef08..3ba70c17b48 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ_test.dll.sources +++ b/mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ_test.dll.sources @@ -12,4 +12,6 @@ Mono.Messaging.RabbitMQ/AsyncPeekTest.cs Mono.Messaging.RabbitMQ/BinaryMessageFormatterTest.cs Mono.Messaging.RabbitMQ/XmlMessageFormatterTest.cs Mono.Messaging.RabbitMQ/TestUtils.cs -Mono.Messaging.RabbitMQ/MessageTest.cs
\ No newline at end of file +Mono.Messaging.RabbitMQ/MessageTest.cs +Mono.Messaging.RabbitMQ/MessageBaseTest.cs +Mono.Messaging.RabbitMQ/MessageEnumeratorExceptionTest.cs diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AdminTest.cs b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AdminTest.cs index 612f401988d..954cdf4bb86 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AdminTest.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AdminTest.cs @@ -109,7 +109,7 @@ namespace MonoTests.Mono.Messaging.RabbitMQ q.Send (m3); q.Send (m4); - Message received = q.Receive (); + q.Receive (); q.Purge (); q.Receive (new TimeSpan (0, 0, 2)); } @@ -122,7 +122,7 @@ namespace MonoTests.Mono.Messaging.RabbitMQ q.Send (m1); - Message received = q.Receive (); + q.Receive (); MessageQueue.Delete(@".\private$\delete-queue"); } diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AsyncPeekTest.cs b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AsyncPeekTest.cs index 9663aa63ef7..ae4b2d86851 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AsyncPeekTest.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AsyncPeekTest.cs @@ -134,7 +134,7 @@ namespace MonoTests.Mono.Messaging.RabbitMQ MessageQueue q = MQUtil.GetQueue (@".\private$\async-peek-5"); IAsyncResult result = q.BeginPeek (new TimeSpan (0, 0, 2)); result.AsyncWaitHandle.WaitOne (); - Message rMsg = q.EndPeek (result); + q.EndPeek (result); } } } diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AsyncReceiveTest.cs b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AsyncReceiveTest.cs index e7febea3c2a..1027a7e47f2 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AsyncReceiveTest.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/AsyncReceiveTest.cs @@ -134,7 +134,7 @@ namespace MonoTests.Mono.Messaging.RabbitMQ MessageQueue q = MQUtil.GetQueue (@".\private$\async-peek-5"); IAsyncResult result = q.BeginReceive (new TimeSpan (0, 0, 2)); result.AsyncWaitHandle.WaitOne (); - Message rMsg = q.EndReceive (result); + q.EndReceive (result); } } } diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/BasicMessagingTest.cs b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/BasicMessagingTest.cs index 57e02307c41..3d2e3805baa 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/BasicMessagingTest.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/BasicMessagingTest.cs @@ -118,7 +118,7 @@ namespace MonoTests.Mono.Messaging.RabbitMQ Assert.IsNotNull (pi, "Property not defined: " + property); object o = pi.GetValue (m, null); Assert.Fail (property + ": " + o); - } catch (InvalidOperationException e) { + } catch (InvalidOperationException) { } catch (TargetInvocationException e) { Assert.AreEqual (typeof (InvalidOperationException), e.InnerException.GetType ()); @@ -153,7 +153,7 @@ namespace MonoTests.Mono.Messaging.RabbitMQ Assert.IsNotNull(pi, "Property not defined: " + property); pi.SetValue(m, null, null); Assert.Fail(property); - } catch (InvalidOperationException e) { + } catch (InvalidOperationException) { } catch (TargetInvocationException e) { Assert.AreEqual(exceptionType, e.InnerException.GetType(), diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/ChangeLog b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/ChangeLog index 8de774bbb81..90a48b0e0e8 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/ChangeLog +++ b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/ChangeLog @@ -1,3 +1,12 @@ +2009-07-11 Michael Barker <mike@middlesoft.co.uk> + + * MessageBaseTest.cs: Moved from Mono.Messaging.Test + * MessageEnumeratorTest.cs: Moved from Mono.Messaging.Test + * MessageTest.cs: Used using aliases to prevent namespace clashes. + * AdminTest.cs: Remove unused variables. + * AsyncPeekTest.cs: Remove unused variables. + * AsyncReceiveTest.cs: Remove unused variables. + 2009-05-23 Michael Barker <mike@middlesoft.co.uk> * MessageEnumeratorTest.cs: Added tests for timeout methods. diff --git a/mcs/class/Mono.Messaging/Test/Mono.Messaging/MessageBaseTest.cs b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/MessageBaseTest.cs index 52a47047236..868448d88f1 100644 --- a/mcs/class/Mono.Messaging/Test/Mono.Messaging/MessageBaseTest.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/MessageBaseTest.cs @@ -33,6 +33,12 @@ using System.Messaging; using System.Reflection; using Mono.Messaging; +using SystemAcknowledgeTypes = System.Messaging.AcknowledgeTypes; +using SystemCryptographicProviderType = System.Messaging.CryptographicProviderType; +using SystemEncryptionAlgorithm = System.Messaging.EncryptionAlgorithm; +using SystemHashAlgorithm = System.Messaging.HashAlgorithm; +using SystemMessagePriority = System.Messaging.MessagePriority; + using NUnit.Framework; namespace MonoTests.Mono.Messaging { @@ -59,7 +65,7 @@ namespace MonoTests.Mono.Messaging { Assert.IsNull (m.Body, "Body default should be Null"); Assert.IsNull (m.Formatter, "Formatter default should null"); - Assert.AreEqual (System.Messaging.AcknowledgeTypes.None, + Assert.AreEqual (SystemAcknowledgeTypes.None, m.AcknowledgeType, "AcknowledgeType default should be None"); Assert.AreEqual (null, m.AdministrationQueue, @@ -68,7 +74,7 @@ namespace MonoTests.Mono.Messaging { Assert.AreEqual (true, m.AttachSenderId, "AttachSenderId default should be true"); Assert.AreEqual ("Microsoft Base Cryptographic Provider, Ver. 1.0", m.AuthenticationProviderName, "AuthenticationProviderName should default to \"Microsoft Base Cryptographic Provider, Ver. 1.0\""); - Assert.AreEqual (System.Messaging.CryptographicProviderType.RsaFull, + Assert.AreEqual (SystemCryptographicProviderType.RsaFull, m.AuthenticationProviderType, "AuthenticationProviderType should default to RsaFull"); Assert.AreEqual (null, m.BodyStream, "BodyStream should default to null"); @@ -78,18 +84,18 @@ namespace MonoTests.Mono.Messaging { "DestinationSymmetricKey should default to an empty array"); Assert.AreEqual (new byte[0], m.DigitalSignature, "DigitalSignature default to an empty array"); - Assert.AreEqual (System.Messaging.EncryptionAlgorithm.Rc2, + Assert.AreEqual (SystemEncryptionAlgorithm.Rc2, m.EncryptionAlgorithm, "EncryptionAlgorithm should default to Rc2"); Assert.AreEqual (new byte[0], m.Extension, "Extension should default to an empty array"); - Assert.AreEqual (System.Messaging.HashAlgorithm.Sha, m.HashAlgorithm, + Assert.AreEqual (SystemHashAlgorithm.Sha, m.HashAlgorithm, "HashAlgorithm should default to Sha"); Assert.AreEqual (Guid.Empty.ToString () + "\\0", m.Id, "Id should default to Guid.Empty"); Assert.AreEqual ("", m.Label, "Label should default to \"\""); Assert.AreEqual (false, m.IsFirstInTransaction, "IsFirstInTransaction should default to false"); Assert.AreEqual (false, m.IsLastInTransaction, "IsLastInTransaction should default to false"); - Assert.AreEqual (System.Messaging.MessagePriority.Normal, m.Priority, + Assert.AreEqual (SystemMessagePriority.Normal, m.Priority, "Priority should default to Normal"); Assert.AreEqual (false, m.Recoverable, "Recoverable should default to false"); Assert.AreEqual (null, m.ResponseQueue, "ResponseQueue should default to null"); diff --git a/mcs/class/Mono.Messaging/Test/Mono.Messaging/MessageEnumeratorExceptionTest.cs b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/MessageEnumeratorExceptionTest.cs index 36edde5d52e..c3507ed1865 100644 --- a/mcs/class/Mono.Messaging/Test/Mono.Messaging/MessageEnumeratorExceptionTest.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/MessageEnumeratorExceptionTest.cs @@ -33,6 +33,10 @@ using System.Reflection; using Mono.Messaging; +using SystemMessageEnumerator = System.Messaging.MessageEnumerator; +using SystemMessageQueueException = System.Messaging.MessageQueueException; +using SystemIMessageFormatter = System.Messaging.IMessageFormatter; + using NUnit.Framework; using NUnit.Mocks;
@@ -51,55 +55,55 @@ namespace MonoTests.Mono.Messaging { } [Test] - [ExpectedException("System.Messaging.MessageQueueException")] + [ExpectedException(typeof(SystemMessageQueueException))] public void RemoveCurrentThrowsConnectionException () { mockME.ExpectAndThrow ("RemoveCurrent", new ConnectionException (QueueReference.DEFAULT), null); - System.Messaging.MessageEnumerator me = CreateEnumerator ((IMessageEnumerator) mockME.MockInstance); + SystemMessageEnumerator me = CreateEnumerator ((IMessageEnumerator) mockME.MockInstance); me.RemoveCurrent (); } [Test] - [ExpectedException("System.InvalidOperationException")] + [ExpectedException(typeof(InvalidOperationException))] public void RemoveCurrentThrowsMessageUnavailableException () { mockME.ExpectAndThrow ("RemoveCurrent", new MessageUnavailableException (), null); - System.Messaging.MessageEnumerator me = CreateEnumerator ((IMessageEnumerator) mockME.MockInstance); + SystemMessageEnumerator me = CreateEnumerator ((IMessageEnumerator) mockME.MockInstance); me.RemoveCurrent (); } [Test] - [ExpectedException("System.Messaging.MessageQueueException")] + [ExpectedException(typeof(SystemMessageQueueException))] public void RemoveCurrentThrowsMonoMessagingException () { mockME.ExpectAndThrow ("RemoveCurrent", new MonoMessagingException (), null); - System.Messaging.MessageEnumerator me = CreateEnumerator ((IMessageEnumerator) mockME.MockInstance); + SystemMessageEnumerator me = CreateEnumerator ((IMessageEnumerator) mockME.MockInstance); me.RemoveCurrent (); } [Test] - [ExpectedException("System.NotImplementedException")] + [ExpectedException(typeof(NotImplementedException))] public void RemoveCurrentThrowsMessageNotImplemented () { mockME.ExpectAndThrow ("RemoveCurrent", new NotImplementedException (), null); - System.Messaging.MessageEnumerator me = CreateEnumerator ((IMessageEnumerator) mockME.MockInstance); + SystemMessageEnumerator me = CreateEnumerator ((IMessageEnumerator) mockME.MockInstance); me.RemoveCurrent (); } - public System.Messaging.MessageEnumerator CreateEnumerator (IMessageEnumerator ime) + public SystemMessageEnumerator CreateEnumerator (IMessageEnumerator ime) { Type[] types = { - typeof (IMessageEnumerator), typeof (System.Messaging.IMessageFormatter) + typeof (IMessageEnumerator), typeof (SystemIMessageFormatter) }; - ConstructorInfo ci = typeof (System.Messaging.MessageEnumerator).GetConstructor ( + ConstructorInfo ci = typeof (SystemMessageEnumerator).GetConstructor ( BindingFlags.NonPublic | BindingFlags.Instance, Type.DefaultBinder, types, new ParameterModifier[0]); if (ci == null) throw new Exception ("ConstructorInfo is null"); - return (System.Messaging.MessageEnumerator) ci.Invoke (new object[] { ime, null }); + return (SystemMessageEnumerator) ci.Invoke (new object[] { ime, null }); } } } diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/MessageTest.cs b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/MessageTest.cs index f0407173f96..40d847a0ee1 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/MessageTest.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/MessageTest.cs @@ -30,10 +30,11 @@ using NUnit.Framework; using NUnit.Mocks; using System; -//using System.Messaging; using System.Security; using System.Security.Permissions; using System.Reflection; +using SystemMessage = System.Messaging.Message; +using SystemAcknowledgeTypes = System.Messaging.AcknowledgeTypes; using Mono.Messaging; @@ -58,8 +59,8 @@ namespace MonoTests.Mono.Messaging.RabbitMQ { messageMock.Expect ("set_AcknowledgeType", AcknowledgeTypes.FullReachQueue); - System.Messaging.Message m = TestUtils.CreateMessage (iMessage); - m.AcknowledgeType = System.Messaging.AcknowledgeTypes.FullReachQueue; + SystemMessage m = TestUtils.CreateMessage (iMessage); + m.AcknowledgeType = SystemAcknowledgeTypes.FullReachQueue; messageMock.Verify (); } diff --git a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/XmlMessageFormatterTest.cs b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/XmlMessageFormatterTest.cs index 7d65e557120..8b6b49a9617 100644 --- a/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/XmlMessageFormatterTest.cs +++ b/mcs/class/Mono.Messaging.RabbitMQ/Test/Mono.Messaging.RabbitMQ/XmlMessageFormatterTest.cs @@ -119,7 +119,7 @@ namespace MonoTests.Mono.Messaging.RabbitMQ Assert.AreEqual (t0.Iii, t1.Iii, "The int did not serialise/deserialise properly"); Assert.AreEqual (t0.Sss, t1.Sss, "The string did not serialise/deserialise properly"); - Assert.AreEqual (t0.Ttt, t1.Ttt, "The date did not serialise/deserialise properly"); + Assert.AreEqual (t0.Ttt.ToString (), t1.Ttt.ToString (), "The date did not serialise/deserialise properly"); mock1.Verify (); mock2.Verify (); diff --git a/mcs/class/Mono.Messaging/ChangeLog b/mcs/class/Mono.Messaging/ChangeLog index 9cfd069df5f..3e0f8ab586f 100644 --- a/mcs/class/Mono.Messaging/ChangeLog +++ b/mcs/class/Mono.Messaging/ChangeLog @@ -1,3 +1,8 @@ +2009-06-11 Michael Barker <mike@middlesoft.co.uk> + + * Mono.Messaging_test.dll.sources: Moved MessageBaseTest.cs and + MessageEnumeratorTest.cs to Mono.Messaging.RabbitMQ.Test. + 2009-05-23 Michael Barker <mike@middlesoft.co.uk> * Mono.Messaging_test.dll.sources: Added MessageEnumeratorExceptionTest.cs diff --git a/mcs/class/Mono.Messaging/Mono.Messaging/ChangeLog b/mcs/class/Mono.Messaging/Mono.Messaging/ChangeLog index 38bd62f9ae2..d10ef8bab69 100644 --- a/mcs/class/Mono.Messaging/Mono.Messaging/ChangeLog +++ b/mcs/class/Mono.Messaging/Mono.Messaging/ChangeLog @@ -1,3 +1,8 @@ +2009-07-11 Michael Barker <mike@middlesoft.co.uk> + + * MessagingProviderLocator.cs: Removed unessecary fields, made fields + readonly and some formatting changes. + 2009-05-23 Michael Barker <mike@middlesoft.co.uk> * IMessageEnumerator.cs: Added additional methods to support operations diff --git a/mcs/class/Mono.Messaging/Mono.Messaging/MessagingProviderLocator.cs b/mcs/class/Mono.Messaging/Mono.Messaging/MessagingProviderLocator.cs index f1ced06174f..e6f65da5388 100644 --- a/mcs/class/Mono.Messaging/Mono.Messaging/MessagingProviderLocator.cs +++ b/mcs/class/Mono.Messaging/Mono.Messaging/MessagingProviderLocator.cs @@ -43,10 +43,9 @@ namespace Mono.Messaging public class MessagingProviderLocator { public static readonly TimeSpan InfiniteTimeout = TimeSpan.MaxValue; + private static readonly MessagingProviderLocator instance = new MessagingProviderLocator(); + private readonly IMessagingProvider provider; - private static MessagingProviderLocator instance = new MessagingProviderLocator(); - private readonly object syncObj = new object(); - private IMessagingProvider provider = null; private MessagingProviderLocator () { string providerName = System.Environment.GetEnvironmentVariable("MONO_MESSAGING_PROVIDER"); @@ -55,7 +54,9 @@ namespace Mono.Messaging provider = CreateProvider (providerName); } - public static MessagingProviderLocator Instance { get { return instance; } } + public static MessagingProviderLocator Instance { + get { return instance; } + } public static IMessagingProvider GetProvider () { @@ -68,8 +69,7 @@ namespace Mono.Messaging if (t == null) throw new Exception ("Can't find class: " + className); - ConstructorInfo ci = t.GetConstructor (BindingFlags.Public | - BindingFlags.Instance, + ConstructorInfo ci = t.GetConstructor (BindingFlags.Public | BindingFlags.Instance, Type.DefaultBinder, new Type[0], new ParameterModifier[0]); diff --git a/mcs/class/Mono.Messaging/Mono.Messaging_test.dll.sources b/mcs/class/Mono.Messaging/Mono.Messaging_test.dll.sources index d5bfcb3a87e..8c82b8604c4 100644 --- a/mcs/class/Mono.Messaging/Mono.Messaging_test.dll.sources +++ b/mcs/class/Mono.Messaging/Mono.Messaging_test.dll.sources @@ -1,3 +1 @@ -Mono.Messaging/MessageBaseTest.cs -Mono.Messaging/MessageEnumeratorExceptionTest.cs -Mono.Messaging/QueueReferenceTest.cs
\ No newline at end of file +Mono.Messaging/QueueReferenceTest.cs diff --git a/mcs/class/Mono.Messaging/Test/Mono.Messaging/ChangeLog b/mcs/class/Mono.Messaging/Test/Mono.Messaging/ChangeLog index 76e40f0761b..888dec2e4f3 100644 --- a/mcs/class/Mono.Messaging/Test/Mono.Messaging/ChangeLog +++ b/mcs/class/Mono.Messaging/Test/Mono.Messaging/ChangeLog @@ -1,3 +1,8 @@ +2009-06-11 Michael Barker <mike@middlesoft.co.uk> + + * MessageBaseTest.cs: Moved to Mono.Messaging.RabbitMQ.Test + * MessageEnumeratorTest.cs: Moved to Mono.Messaging.RabbitMQ.Test + 2009-05-23 Michael Barker <mike@middlesoft.co.uk> * MessageEnumeratorExceptionTest.cs: New diff --git a/mcs/class/System.Messaging/System.Messaging/ChangeLog b/mcs/class/System.Messaging/System.Messaging/ChangeLog index 4b2c8833b08..e5fcc897f0c 100644 --- a/mcs/class/System.Messaging/System.Messaging/ChangeLog +++ b/mcs/class/System.Messaging/System.Messaging/ChangeLog @@ -1,3 +1,7 @@ +2009-07-11 Michael Barker <mike@middlesoft.co.uk> + + * MessageQueueException.cs: Removed MonoTODO. + 2009-05-23 Michael Barker <mike@middlesoft.co.uk> * MessageEnumerator.cs: Added calls to the delegate IMessageEnumerator diff --git a/mcs/class/System.Messaging/System.Messaging/MessageQueueException.cs b/mcs/class/System.Messaging/System.Messaging/MessageQueueException.cs index 4621760d09a..b9a6452ed92 100644 --- a/mcs/class/System.Messaging/System.Messaging/MessageQueueException.cs +++ b/mcs/class/System.Messaging/System.Messaging/MessageQueueException.cs @@ -63,7 +63,6 @@ namespace System.Messaging return "UnknownError"; } - [MonoTODO] public override string Message { get { return base.Message; } |