diff options
author | Robert Greig <rgreig@apache.org> | 2007-01-10 12:50:37 +0000 |
---|---|---|
committer | Robert Greig <rgreig@apache.org> | 2007-01-10 12:50:37 +0000 |
commit | dc368b6d0483b85b9a056e2e6373a05e3c94f1da (patch) | |
tree | d81e96819a17fa73b97daa78af9bbadc6cb2ab49 | |
parent | c83392f59635af07757f15440c7ded9d78a2edbe (diff) | |
download | qpid-python-dc368b6d0483b85b9a056e2e6373a05e3c94f1da.tar.gz |
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@494801 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | dotnet/Qpid.Client/Client/AMQConnection.cs | 12 | ||||
-rw-r--r-- | dotnet/Qpid.Client/Client/AmqChannel.cs | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/dotnet/Qpid.Client/Client/AMQConnection.cs b/dotnet/Qpid.Client/Client/AMQConnection.cs index c620412cab..1da46f19fd 100644 --- a/dotnet/Qpid.Client/Client/AMQConnection.cs +++ b/dotnet/Qpid.Client/Client/AMQConnection.cs @@ -386,6 +386,7 @@ namespace Qpid.Client public void Start() { CheckNotClosed(); + if (!_started) { foreach (DictionaryEntry lde in _sessions) @@ -400,7 +401,16 @@ namespace Qpid.Client public void Stop() { CheckNotClosed(); - throw new NotImplementedException(); + + if (_started) + { + foreach (DictionaryEntry lde in _sessions) + { + AmqChannel s = (AmqChannel) lde.Value; + s.Stop(); + } + _started = false; + } } public IConnectionListener ConnectionListener diff --git a/dotnet/Qpid.Client/Client/AmqChannel.cs b/dotnet/Qpid.Client/Client/AmqChannel.cs index ab598b4b27..528fa96924 100644 --- a/dotnet/Qpid.Client/Client/AmqChannel.cs +++ b/dotnet/Qpid.Client/Client/AmqChannel.cs @@ -608,6 +608,14 @@ namespace Qpid.Client dispatcherThread.Start(); } + internal void Stop() + { + if (_dispatcher != null) + { + _dispatcher.StopDispatcher(); + } + } + internal void RegisterConsumer(string consumerTag, IMessageConsumer consumer) { _consumers[consumerTag] = consumer; |