qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r886962 [1/5] - in /qpid/trunk/qpid/dotnet/client-010: ./ addins/ExcelAddIn/ addins/ExcelAddInMessageProcessor/ addins/ExcelAddInProducer/ client/ client/client/ client/transport/ client/transport/codec/ client/transport/exception/ client/t...
Date Thu, 03 Dec 2009 22:31:17 GMT
Author: aidan
Date: Thu Dec  3 22:31:12 2009
New Revision: 886962

URL: http://svn.apache.org/viewvc?rev=886962&view=rev
Log:
QPID-500: Fix public API to match .Net conventions

QPID-1987: misc test fixes,

- Fixes ToString() methods that don't override base classes
- Fixes blocking TearingDown in unit tests
- Use a .config file for tests/samples
- Adds interface to Invoker, Session and ClientSession to allow easy mocking of the API
- Make the console solution compiling under Visual Studio 2008

patch from julien.lavigne

Added:
    qpid/trunk/qpid/dotnet/client-010/client/client/IClient.cs
    qpid/trunk/qpid/dotnet/client-010/client/client/IClientSession.cs
    qpid/trunk/qpid/dotnet/client-010/client/client/IClosedListener.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs
    qpid/trunk/qpid/dotnet/client-010/client/client/IMessageListener.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/IBinding.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/IFuture.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/IProtocolDelegate.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/IProtocolEvent.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/IReceiver.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/ISender.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/ISession.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IDecoder.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IEncodable.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IEncoder.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/INetworkDelegate.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/INetworkEvent.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IIoSender.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs
    qpid/trunk/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/RequestResponseClient.cs
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/Client.cs
    qpid/trunk/qpid/dotnet/client-010/gentool/IInvoker.tpl
      - copied, changed from r886946, qpid/trunk/qpid/dotnet/client-010/management/console/SchemaStatistic.cs
Removed:
    qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs
    qpid/trunk/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/Client.cs
Modified:
    qpid/trunk/qpid/dotnet/client-010/README.txt
    qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.cs
    qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.csproj
    qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/ExcelAddInMessageProcessor.csproj
    qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj
    qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs
    qpid/trunk/qpid/dotnet/client-010/client/Client.csproj
    qpid/trunk/qpid/dotnet/client-010/client/client.sln
    qpid/trunk/qpid/dotnet/client-010/client/client/Client.cs
    qpid/trunk/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs
    qpid/trunk/qpid/dotnet/client-010/client/client/ClientSession.cs
    qpid/trunk/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs
    qpid/trunk/qpid/dotnet/client-010/client/client/ErrorCode.cs
    qpid/trunk/qpid/dotnet/client-010/client/client/IMessage.cs
    qpid/trunk/qpid/dotnet/client-010/client/client/Message.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/Binary.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/Channel.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/Connection.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/Field.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/Header.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/Method.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolError.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolHeader.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/Range.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/RangeSet.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/Session.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/SessionDelegate.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/Struct.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractDecoder.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSDecoder.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSEncoder.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ProtocolVersionException.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/Assembler.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/Disassembler.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/Frame.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/InputHandler.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IIoTransport.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoReceiver.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoSSLTransport.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoSender.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoTransport.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/util/ByteEncoder.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/util/CircularBuffer.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/util/Logger.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs
    qpid/trunk/qpid/dotnet/client-010/client/transport/util/Serial.cs
    qpid/trunk/qpid/dotnet/client-010/demo/Demo.csproj
    qpid/trunk/qpid/dotnet/client-010/demo/Program.cs
    qpid/trunk/qpid/dotnet/client-010/demo/default.build
    qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/Listener.cs
    qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/default.build
    qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/example-direct-Listener.csproj
    qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-producer/Producer.cs
    qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-producer/default.build
    qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-producer/example-direct-producer.csproj
    qpid/trunk/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Listener.cs
    qpid/trunk/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/default.build
    qpid/trunk/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/example-fanout-Listener.csproj
    qpid/trunk/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Producer.cs
    qpid/trunk/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/default.build
    qpid/trunk/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/example-fanout-Producer.csproj
    qpid/trunk/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/Listener.cs
    qpid/trunk/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/default.build
    qpid/trunk/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/example-pub-sub-Listener.csproj
    qpid/trunk/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/Publisher.cs
    qpid/trunk/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/default.build
    qpid/trunk/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/example-pub-sub-Publisher.csproj
    qpid/trunk/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/default.build
    qpid/trunk/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/example-request-response-Client.csproj
    qpid/trunk/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/Server.cs
    qpid/trunk/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/default.build
    qpid/trunk/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/example-request-response-Server.csproj
    qpid/trunk/qpid/dotnet/client-010/management/console/Agent.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/Broker.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/BrokerURL.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/ClassKey.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/ObjectID.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/QMFEvent.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/QMFObject.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/SchemaArgument.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/SchemaClass.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/SchemaMethod.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/SchemaProperty.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/SchemaStatistic.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/Session.cs
    qpid/trunk/qpid/dotnet/client-010/management/console/console.csproj
    qpid/trunk/qpid/dotnet/client-010/management/console/console.sln
    qpid/trunk/qpid/dotnet/client-010/perftest/PerfTest.cs
    qpid/trunk/qpid/dotnet/client-010/perftest/perftest.csproj
    qpid/trunk/qpid/dotnet/client-010/test/Test.csproj
    qpid/trunk/qpid/dotnet/client-010/test/interop/Admin.cs
    qpid/trunk/qpid/dotnet/client-010/test/interop/ApplicationHeaders.cs
    qpid/trunk/qpid/dotnet/client-010/test/interop/Message.cs
    qpid/trunk/qpid/dotnet/client-010/test/interop/TestCase.cs
    qpid/trunk/qpid/dotnet/client-010/test/transport/util/ByteEncoderTest.cs
    qpid/trunk/qpid/dotnet/client-010/test/transport/util/CircularBufferTest.cs
    qpid/trunk/qpid/dotnet/client-010/test/transport/util/ResultFutureTest.cs
    qpid/trunk/qpid/dotnet/client-010/test/transport/util/SerialTest.cs

Modified: qpid/trunk/qpid/dotnet/client-010/README.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/README.txt?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/README.txt (original)
+++ qpid/trunk/qpid/dotnet/client-010/README.txt Thu Dec  3 22:31:12 2009
@@ -3,17 +3,19 @@
 
 AMQP 0.10 Native .NET client supporting WCF and xcel
 
-This client is self contained, all dependancies are in this
-directory.
+In order to build this client from the sources you'll need the following folders :
+- <project home>/java/lib
+- <project home>/python
+- <project home>/specs
 
 
 Setup
 =====
 
 Install:
-  Microsoft Visual Studio 2005 (VS2005)
-  NAnt 0.85 - only required for builds outside VS2005 (.net 1.1, .net 2.0, mono 2.0)
-  Ant 1.6.5
+  Microsoft Visual Studio 2008 (VS2008). It's also possible to build with vs2005 by creating a new solution and adding Client.csproj
+  NAnt 0.85 - only required for builds outside VS2008 (.net 1.1, .net 2.0, mono 2.0)
+  Ant 1.6.5 (requires Java)
   Cygwin (or alternatively build via cmd but alter instructions below accordingly)
 
 Set up PATH to include Nant.exe:
@@ -33,7 +35,7 @@
   $ cd <project home>/dotnet/client-010/gentool
   $ ant
 
-You can build from Visual Studio 2005 normally. Alternatively, you
+You can build from Visual Studio 2008 normally. Alternatively, you
 can build debug releases for any supported framework from the 
 command line using Nant:
 

Modified: qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.cs Thu Dec  3 22:31:12 2009
@@ -49,8 +49,8 @@
         private readonly Dictionary<int, IMessage> _topicMessages = new Dictionary<int, IMessage>();
         private readonly Dictionary<string, QpidListener> _queueListener = new Dictionary<string, QpidListener>();
         private readonly Dictionary<int, string> _topicQueueName = new Dictionary<int, string>();
-        private Client _client;
-        private ClientSession _session;
+        private IClient _client;
+        private IClientSession _session;
         private ProcessMessage _messageProcessor;
 
         #region properties
@@ -65,7 +65,7 @@
             get { return _topicMessages; }
         }
 
-        public ClientSession Session
+        public IClientSession Session
         {
             get { return _session; }
         }
@@ -103,7 +103,7 @@
             {
                 virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
             }
-            if (ConfigurationManager.AppSettings["UserName"] != null)
+            if (ConfigurationManager.AppSettings["Username"] != null)
             {
                 username = ConfigurationManager.AppSettings["UserName"];
             }
@@ -132,9 +132,9 @@
             try
             {
                 _client = new Client();            
-                _client.connect(host, Convert.ToInt16(port), virtualhost, username, password);
+                _client.Connect(host, Convert.ToInt16(port), virtualhost, username, password);
                 // create a session 
-                _session = _client.createSession(0);          
+                _session = _client.CreateSession(0);          
             }
             catch (Exception e)
             {
@@ -164,8 +164,8 @@
                     queuename = (string) Strings.GetValue(0);
                 }
                 // Error message if the queue does not exist
-                QueueQueryResult result = (QueueQueryResult)_session.queueQuery(queuename).Result;
-                if( result.getQueue() == null )
+                QueueQueryResult result = (QueueQueryResult)_session.QueueQuery(queuename).Result;
+                if( result.GetQueue() == null )
                 {
                     System.Windows.Forms.MessageBox.Show("Error: \n queue " + queuename + " does not exist");
                     return "error";  
@@ -184,14 +184,14 @@
                     listener = new QpidListener(this);
                     listener.addTopic(TopicID);
                     _queueListener.Add(queuename, listener);
-                    _session.attachMessageListener(listener, destinationName);
-                    _session.messageSubscribe(queuename, destinationName, MessageAcceptMode.EXPLICIT,
+                    _session.AttachMessageListener(listener, destinationName);
+                    _session.MessageSubscribe(queuename, destinationName, MessageAcceptMode.EXPLICIT,
                                               MessageAcquireMode.PRE_ACQUIRED, null, 0, null);
                     // issue credits     
-                    _session.messageSetFlowMode(destinationName, MessageFlowMode.WINDOW);
-                    _session.messageFlow(destinationName, MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
-                    _session.messageFlow(destinationName, MessageCreditUnit.MESSAGE, 1000);
-                    _session.sync();
+                    _session.MessageSetFlowMode(destinationName, MessageFlowMode.WINDOW);
+                    _session.MessageFlow(destinationName, MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
+                    _session.MessageFlow(destinationName, MessageCreditUnit.MESSAGE, 1000);
+                    _session.Sync();
                 }                
             }
             catch (Exception e)
@@ -212,7 +212,7 @@
             string queueName = _topicQueueName[TopicID];
             if (_topicQueueName.Remove(TopicID) && !_topicQueueName.ContainsValue(queueName))
             {
-                _session.messageStop("ExcelAddIn-" + queueName);
+                _session.MessageStop("ExcelAddIn-" + queueName);
                 _session.MessageListeners.Remove("ExcelAddIn-" + queueName);
             }
         }
@@ -271,7 +271,7 @@
             _topics.Add(topic);
         }
 
-        public void messageTransfer(IMessage m)
+        public void MessageTransfer(IMessage m)
         {            
             foreach (int i in _topics)
             {
@@ -282,9 +282,9 @@
             }
             // ack this message 
             RangeSet rs = new RangeSet();
-            rs.add(m.Id);
-            _excel.Session.messageAccept(rs);        
+            rs.Add(m.Id);
+            _excel.Session.MessageAccept(rs);        
             _excel.OnMessage.UpdateNotify();
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.csproj
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.csproj?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.csproj (original)
+++ qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.csproj Thu Dec  3 22:31:12 2009
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{85EFD719-39F6-4471-90FF-9E621430344B}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -45,7 +45,7 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="**\*.cs" />    
+    <Compile Include="**\*.cs" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\client\Client.csproj">
@@ -54,7 +54,9 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <None Include="Excel.exe.config" />
+    <None Include="..\..\App.config">
+      <Link>App.config</Link>
+    </None>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

Modified: qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/ExcelAddInMessageProcessor.csproj
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/ExcelAddInMessageProcessor.csproj?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/ExcelAddInMessageProcessor.csproj (original)
+++ qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/ExcelAddInMessageProcessor.csproj Thu Dec  3 22:31:12 2009
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{C2AE83A3-D5D1-469D-8611-A4738B9997CF}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -38,7 +38,7 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="**\*.cs" />    
+    <Compile Include="**\*.cs" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\client\Client.csproj">
@@ -50,6 +50,11 @@
       <Name>ExcelAddIn</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\App.config">
+      <Link>App.config</Link>
+    </None>
+  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
@@ -58,4 +63,4 @@
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

Modified: qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj (original)
+++ qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj Thu Dec  3 22:31:12 2009
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{80F00C3B-EB38-4B3B-9F77-68977A30B155}</ProjectGuid>
     <OutputType>Exe</OutputType>
@@ -34,11 +34,12 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
+    <Reference Include="System.configuration" />
     <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="**\*.cs" />        
+    <Compile Include="**\*.cs" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\client\Client.csproj">
@@ -46,6 +47,11 @@
       <Name>Client</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\App.config">
+      <Link>App.config</Link>
+    </None>
+  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
@@ -54,4 +60,4 @@
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

Modified: qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs Thu Dec  3 22:31:12 2009
@@ -19,6 +19,7 @@
 *
 */
 using System;
+using System.Configuration;
 using System.Text;
 using System.Threading;
 using org.apache.qpid.client;
@@ -29,27 +30,33 @@
     {
         static void Main(string[] args)
         {
+            string host = ConfigurationManager.AppSettings["Host"];
+            int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
+            string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
+            string username = ConfigurationManager.AppSettings["Username"];
+            string password = ConfigurationManager.AppSettings["Password"];
+
             Client client = new Client();
             Console.WriteLine("Client created");
-            client.connect("192.168.1.14", 5672, "test", "guest", "guest");
+            client.Connect(host, port, virtualhost, username, password);
             Console.WriteLine("Connection established");
 
-            ClientSession ssn = client.createSession(50000);
+            IClientSession ssn = client.CreateSession(50000);
             Console.WriteLine("Session created");
-            ssn.queueDeclare("queue1", null, null);
-            ssn.exchangeBind("queue1", "amq.direct", "queue1", null);
+            ssn.QueueDeclare("queue1", null, null);
+            ssn.ExchangeBind("queue1", "amq.direct", "queue1", null);
             IMessage message = new Message();
             message.ApplicationHeaders.Add("price", 0);
             for (int i = 0; i < 100; i++)
             {
-                message.clearData();
-                message.appendData( Encoding.UTF8.GetBytes("test: " + i));
+                message.ClearData();
+                message.AppendData( Encoding.UTF8.GetBytes("test: " + i));
                 message.ApplicationHeaders["price"] =  i;
-                ssn.messageTransfer("amq.direct", "queue1", message);               
+                ssn.MessageTransfer("amq.direct", "queue1", message);               
                 Thread.Sleep(1000);
             }
 
-            client.close();
+            client.Close();
         }
     }
 }

Modified: qpid/trunk/qpid/dotnet/client-010/client/Client.csproj
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/Client.csproj?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/Client.csproj (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/Client.csproj Thu Dec  3 22:31:12 2009
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{B911FFD7-754F-4735-A188-218D5065BE79}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -42,7 +42,174 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="**\*.cs" />    
+    <Compile Include="client\Client.cs" />
+    <Compile Include="client\ClientConnectionDelegate.cs" />
+    <Compile Include="client\ClientSession.cs" />
+    <Compile Include="client\ClientSessionDelegate.cs" />
+    <Compile Include="client\ErrorCode.cs" />
+    <Compile Include="client\IClient.cs" />
+    <Compile Include="client\IClientSession.cs" />
+    <Compile Include="client\IClosedListener.cs" />
+    <Compile Include="client\IMessage.cs" />
+    <Compile Include="client\Message.cs" />
+    <Compile Include="client\IMessageListener.cs" />
+    <Compile Include="generated\Acquired.cs" />
+    <Compile Include="generated\ConnectionClose.cs" />
+    <Compile Include="generated\ConnectionCloseCode.cs" />
+    <Compile Include="generated\ConnectionCloseOk.cs" />
+    <Compile Include="generated\ConnectionHeartbeat.cs" />
+    <Compile Include="generated\ConnectionOpen.cs" />
+    <Compile Include="generated\ConnectionOpenOk.cs" />
+    <Compile Include="generated\ConnectionRedirect.cs" />
+    <Compile Include="generated\ConnectionSecure.cs" />
+    <Compile Include="generated\ConnectionSecureOk.cs" />
+    <Compile Include="generated\ConnectionStart.cs" />
+    <Compile Include="generated\ConnectionStartOk.cs" />
+    <Compile Include="generated\ConnectionTune.cs" />
+    <Compile Include="generated\ConnectionTuneOk.cs" />
+    <Compile Include="generated\Constant.cs" />
+    <Compile Include="generated\DeliveryProperties.cs" />
+    <Compile Include="generated\DtxCommit.cs" />
+    <Compile Include="generated\DtxEnd.cs" />
+    <Compile Include="generated\DtxForget.cs" />
+    <Compile Include="generated\DtxGetTimeout.cs" />
+    <Compile Include="generated\DtxPrepare.cs" />
+    <Compile Include="generated\DtxRecover.cs" />
+    <Compile Include="generated\DtxRollback.cs" />
+    <Compile Include="generated\DtxSelect.cs" />
+    <Compile Include="generated\DtxSetTimeout.cs" />
+    <Compile Include="generated\DtxStart.cs" />
+    <Compile Include="generated\DtxXaStatus.cs" />
+    <Compile Include="generated\ExchangeBind.cs" />
+    <Compile Include="generated\ExchangeBound.cs" />
+    <Compile Include="generated\ExchangeBoundResult.cs" />
+    <Compile Include="generated\ExchangeDeclare.cs" />
+    <Compile Include="generated\ExchangeDelete.cs" />
+    <Compile Include="generated\ExchangeQuery.cs" />
+    <Compile Include="generated\ExchangeQueryResult.cs" />
+    <Compile Include="generated\ExchangeUnbind.cs" />
+    <Compile Include="generated\ExecutionErrorCode.cs" />
+    <Compile Include="generated\ExecutionException.cs" />
+    <Compile Include="generated\ExecutionResult.cs" />
+    <Compile Include="generated\ExecutionSync.cs" />
+    <Compile Include="generated\FileReturnCode.cs" />
+    <Compile Include="generated\FragmentProperties.cs" />
+    <Compile Include="generated\GetTimeoutResult.cs" />
+    <Compile Include="generated\IInvoker.cs" />
+    <Compile Include="generated\Invoker.cs" />
+    <Compile Include="generated\MessageAccept.cs" />
+    <Compile Include="generated\MessageAcceptMode.cs" />
+    <Compile Include="generated\MessageAcquire.cs" />
+    <Compile Include="generated\MessageAcquireMode.cs" />
+    <Compile Include="generated\MessageCancel.cs" />
+    <Compile Include="generated\MessageCreditUnit.cs" />
+    <Compile Include="generated\MessageDeliveryMode.cs" />
+    <Compile Include="generated\MessageDeliveryPriority.cs" />
+    <Compile Include="generated\MessageFlow.cs" />
+    <Compile Include="generated\MessageFlowMode.cs" />
+    <Compile Include="generated\MessageFlush.cs" />
+    <Compile Include="generated\MessageProperties.cs" />
+    <Compile Include="generated\MessageReject.cs" />
+    <Compile Include="generated\MessageRejectCode.cs" />
+    <Compile Include="generated\MessageRelease.cs" />
+    <Compile Include="generated\MessageResume.cs" />
+    <Compile Include="generated\MessageResumeResult.cs" />
+    <Compile Include="generated\MessageSetFlowMode.cs" />
+    <Compile Include="generated\MessageStop.cs" />
+    <Compile Include="generated\MessageSubscribe.cs" />
+    <Compile Include="generated\MessageTransfer.cs" />
+    <Compile Include="generated\MethodDelegate.cs" />
+    <Compile Include="generated\Option.cs" />
+    <Compile Include="generated\QueueDeclare.cs" />
+    <Compile Include="generated\QueueDelete.cs" />
+    <Compile Include="generated\QueuePurge.cs" />
+    <Compile Include="generated\QueueQuery.cs" />
+    <Compile Include="generated\QueueQueryResult.cs" />
+    <Compile Include="generated\RecoverResult.cs" />
+    <Compile Include="generated\ReplyTo.cs" />
+    <Compile Include="generated\SegmentType.cs" />
+    <Compile Include="generated\SessionAttach.cs" />
+    <Compile Include="generated\SessionAttached.cs" />
+    <Compile Include="generated\SessionCommandFragment.cs" />
+    <Compile Include="generated\SessionCommandPoint.cs" />
+    <Compile Include="generated\SessionCompleted.cs" />
+    <Compile Include="generated\SessionConfirmed.cs" />
+    <Compile Include="generated\SessionDetach.cs" />
+    <Compile Include="generated\SessionDetachCode.cs" />
+    <Compile Include="generated\SessionDetached.cs" />
+    <Compile Include="generated\SessionExpected.cs" />
+    <Compile Include="generated\SessionFlush.cs" />
+    <Compile Include="generated\SessionGap.cs" />
+    <Compile Include="generated\SessionHeader.cs" />
+    <Compile Include="generated\SessionKnownCompleted.cs" />
+    <Compile Include="generated\SessionRequestTimeout.cs" />
+    <Compile Include="generated\SessionTimeout.cs" />
+    <Compile Include="generated\StreamReturnCode.cs" />
+    <Compile Include="generated\StructFactory.cs" />
+    <Compile Include="generated\Track.cs" />
+    <Compile Include="generated\TxCommit.cs" />
+    <Compile Include="generated\TxRollback.cs" />
+    <Compile Include="generated\TxSelect.cs" />
+    <Compile Include="generated\Type.cs" />
+    <Compile Include="generated\XaResult.cs" />
+    <Compile Include="generated\Xid.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="transport\Binary.cs" />
+    <Compile Include="transport\IBinding.cs" />
+    <Compile Include="transport\Channel.cs" />
+    <Compile Include="transport\ChannelDelegate.cs" />
+    <Compile Include="transport\ClientDelegate.cs" />
+    <Compile Include="transport\codec\AbstractDecoder.cs" />
+    <Compile Include="transport\codec\AbstractEncoder.cs" />
+    <Compile Include="transport\codec\IDecoder.cs" />
+    <Compile Include="transport\codec\IEncodable.cs" />
+    <Compile Include="transport\codec\IEncoder.cs" />
+    <Compile Include="transport\codec\MSDecoder.cs" />
+    <Compile Include="transport\codec\MSEncoder.cs" />
+    <Compile Include="transport\Connection.cs" />
+    <Compile Include="transport\ConnectionDelegate.cs" />
+    <Compile Include="transport\exception\ConnectionException.cs" />
+    <Compile Include="transport\exception\ExceptionArgs.cs" />
+    <Compile Include="transport\exception\ProtocolVersionException.cs" />
+    <Compile Include="transport\exception\SessionClosedException.cs" />
+    <Compile Include="transport\exception\SessionException.cs" />
+    <Compile Include="transport\exception\TransportException.cs" />
+    <Compile Include="transport\Field.cs" />
+    <Compile Include="transport\IFuture.cs" />
+    <Compile Include="transport\Header.cs" />
+    <Compile Include="transport\ISession.cs" />
+    <Compile Include="transport\Method.cs" />
+    <Compile Include="transport\network\Assembler.cs" />
+    <Compile Include="transport\network\Disassembler.cs" />
+    <Compile Include="transport\network\Frame.cs" />
+    <Compile Include="transport\network\io\IIoSender.cs" />
+    <Compile Include="transport\network\InputHandler.cs" />
+    <Compile Include="transport\network\io\IIoTransport.cs" />
+    <Compile Include="transport\network\io\IoReceiver.cs" />
+    <Compile Include="transport\network\io\IoSender.cs" />
+    <Compile Include="transport\network\io\IoSSLTransport.cs" />
+    <Compile Include="transport\network\io\IoTransport.cs" />
+    <Compile Include="transport\network\INetworkDelegate.cs" />
+    <Compile Include="transport\network\INetworkEvent.cs" />
+    <Compile Include="transport\IProtocolDelegate.cs" />
+    <Compile Include="transport\ProtocolError.cs" />
+    <Compile Include="transport\IProtocolEvent.cs" />
+    <Compile Include="transport\ProtocolHeader.cs" />
+    <Compile Include="transport\Range.cs" />
+    <Compile Include="transport\RangeSet.cs" />
+    <Compile Include="transport\ReceivedPayload.cs" />
+    <Compile Include="transport\IReceiver.cs" />
+    <Compile Include="transport\ISender.cs" />
+    <Compile Include="transport\Session.cs" />
+    <Compile Include="transport\SessionDelegate.cs" />
+    <Compile Include="transport\Struct.cs" />
+    <Compile Include="transport\util\ByteEncoder.cs" />
+    <Compile Include="transport\util\CircularBuffer.cs" />
+    <Compile Include="transport\util\Functions.cs" />
+    <Compile Include="transport\util\Logger.cs" />
+    <Compile Include="transport\util\ResultFuture.cs" />
+    <Compile Include="transport\util\Serial.cs" />
+    <Compile Include="transport\util\UUID.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
@@ -52,4 +219,4 @@
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

Modified: qpid/trunk/qpid/dotnet/client-010/client/client.sln
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client.sln?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client.sln (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/client.sln Thu Dec  3 22:31:12 2009
@@ -31,6 +31,11 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExcelAddInMessageProcessor", "..\addins\ExcelAddInMessageProcessor\ExcelAddInMessageProcessor.csproj", "{C2AE83A3-D5D1-469D-8611-A4738B9997CF}"
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3CE4FA2A-393F-4DED-ABDF-1BC2F253ACA8}"
+	ProjectSection(SolutionItems) = preProject
+		..\App.config = ..\App.config
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU

Modified: qpid/trunk/qpid/dotnet/client-010/client/client/Client.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client/Client.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client/Client.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/client/Client.cs Thu Dec  3 22:31:12 2009
@@ -25,19 +25,20 @@
 
 namespace org.apache.qpid.client
 {
-    public class Client : ClientInterface
+    public class Client : IClient
     {
         private Connection _conn;
-        private static readonly Logger _log = Logger.get(typeof (Client));
+        private static readonly Logger _log = Logger.Get(typeof (Client));
         private const long timeout = 60000;
-        private bool _closed;
+        private bool _isClosed;
         private readonly Object _closeOK;
-        private ClosedListener _closedListner;
+        private IClosedListener _closedListner;
 
-        public bool Closed
+
+        public bool IsClosed
         {
-            get { return _closed; }
-            set { _closed = value; }
+            get { return _isClosed; }
+            set { _isClosed = value; }
         }
 
         public Object CloseOk
@@ -47,11 +48,11 @@
 
         public Client()
         {
-            _closed = false;
+            _isClosed = false;
             _closeOK = new object();
         }
 
-        #region Interface ClientInterface
+        #region Interface IClient
         
         /// <summary>
         /// Establishes a connection with a broker using the provided user auths 
@@ -62,17 +63,17 @@
         /// <param name="virtualHost">virtual host name</param>
         /// <param name="username">User Name</param>
         /// <param name="password">Password</param>
-        public void connect(String host, int port, String virtualHost, String username, String password)
+        public void Connect(String host, int port, String virtualHost, String username, String password)
         {
-            _log.debug(String.Format("Client Connecting to host {0}; port {1}; virtualHost {2}; username {3}", host,
+            _log.Debug(String.Format("Client Connecting to host {0}; port {1}; virtualHost {2}; username {3}", host,
                                      port, virtualHost, username));
             ConnectionDelegate connectionDelegate = new ClientConnectionDelegate(this, username, password);
             ManualResetEvent negotiationComplete = new ManualResetEvent(false);
             connectionDelegate.setCondition(negotiationComplete);
             connectionDelegate.VirtualHost = virtualHost;
-            _conn = IoTransport.connect(host, port, connectionDelegate);
+            _conn = IoTransport.Connect(host, port, connectionDelegate);
             
-            _conn.send(new ProtocolHeader(1, 0, 10));
+            _conn.Send(new ProtocolHeader(1, 0, 10));
             negotiationComplete.WaitOne();
         }
 
@@ -88,53 +89,53 @@
         /// <param name="serverName">Name of the SSL server</param>
         /// <param name="certPath">Path to the X509 certificate to be used for client authentication</param>
         /// <param name="rejectUntrusted">If true connection will not be established if the broker is not trusted</param>
-        public void connectSSL(String host, int port, String virtualHost, String username, String password, string serverName, string certPath, bool rejectUntrusted)
+        public void ConnectSSL(String host, int port, String virtualHost, String username, String password, string serverName, string certPath, bool rejectUntrusted)
         {
-            _log.debug(String.Format("Client Connecting to host {0}; port {1}; virtualHost {2}; username {3}", host,
+            _log.Debug(String.Format("Client Connecting to host {0}; port {1}; virtualHost {2}; username {3}", host,
                                      port, virtualHost, username));
-            _log.debug(String.Format("SSL paramters: serverName: {0}; certPath: {1}; rejectUntrusted: {2}", serverName, certPath, rejectUntrusted));          
+            _log.Debug(String.Format("SSL paramters: serverName: {0}; certPath: {1}; rejectUntrusted: {2}", serverName, certPath, rejectUntrusted));          
             ConnectionDelegate connectionDelegate = new ClientConnectionDelegate(this, username, password);
             ManualResetEvent negotiationComplete = new ManualResetEvent(false);
             connectionDelegate.setCondition(negotiationComplete);
             connectionDelegate.VirtualHost = virtualHost;
-            _conn = IoSSLTransport.connect(host, port, serverName, certPath, rejectUntrusted, connectionDelegate);
+            _conn = IoSSLTransport.Connect(host, port, serverName, certPath, rejectUntrusted, connectionDelegate);
 
-            _conn.send(new ProtocolHeader(1, 0, 10));
+            _conn.Send(new ProtocolHeader(1, 0, 10));
             negotiationComplete.WaitOne();
         }
 
-        public void close()
+        public void Close()
         {
-            Channel ch = _conn.getChannel(0);
-            ch.connectionClose(ConnectionCloseCode.NORMAL, "client is closing");
+            Channel ch = _conn.GetChannel(0);
+            ch.ConnectionClose(ConnectionCloseCode.NORMAL, "client is closing");
             lock (CloseOk)
             {
                 DateTime start = DateTime.Now;
                 long elapsed = 0;
-                while (!Closed && elapsed < timeout)
+                while (!IsClosed && elapsed < timeout)
                 {
                     Monitor.Wait(CloseOk, (int) (timeout - elapsed));
                     elapsed = DateTime.Now.Subtract(start).Milliseconds;
                 }
-                if (!Closed)
+                if (!IsClosed)
                 {
                     throw new Exception("Timed out when closing connection");
                 }
-                _conn.close();
+                _conn.Close();
             }
         }
 
-        public ClientSession createSession(long expiryInSeconds)
+        public IClientSession CreateSession(long expiryInSeconds)
         {
-            Channel ch = _conn.getChannel();
-            ClientSession ssn = new ClientSession(Encoding.UTF8.GetBytes(UUID.randomUUID().ToString()));
-            ssn.attach(ch);
-            ssn.sessionAttach(ssn.getName());
-            ssn.sessionRequestTimeout(expiryInSeconds);
+            Channel ch = _conn.GetChannel();
+            ClientSession ssn = new ClientSession(Encoding.UTF8.GetBytes(UUID.RandomUuid().ToString()));
+            ssn.Attach(ch);
+            ssn.SessionAttach(ssn.GetName());
+            ssn.SessionRequestTimeout(expiryInSeconds);
             return ssn;
         }
 
-        public ClosedListener ClosedListener
+        public IClosedListener ClosedListener
         {
             set { _closedListner = value; }
             get { return _closedListner; }

Modified: qpid/trunk/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs Thu Dec  3 22:31:12 2009
@@ -29,7 +29,7 @@
 {
     internal class ClientConnectionDelegate : ClientDelegate
     {
-        private static readonly Logger log = Logger.get(typeof (ClientConnectionDelegate));
+        private static readonly Logger log = Logger.Get(typeof (ClientConnectionDelegate));
         private readonly Client _client;
         private string _username;
         private string _password;
@@ -41,17 +41,17 @@
             _password = pasword;
         }
 
-        public override SessionDelegate getSessionDelegate()
+        public override SessionDelegate GetSessionDelegate()
         {
             return new ClientSessionDelegate();
         }
 
-        public override void exception(Exception t)
+        public override void Exception(Exception t)
         {
             throw t;
         }
 
-        public override void connectionStart(Channel context, ConnectionStart mystruct)
+        public override void ConnectionStart(Channel context, ConnectionStart mystruct)
         {
             const string mechanism = "PLAIN";          
             MemoryStream stResponse = new MemoryStream();
@@ -62,17 +62,17 @@
             part = Encoding.UTF8.GetBytes(_password);
             stResponse.Write(part, 0, part.Length);            
             Dictionary<String, Object> props = new Dictionary<String, Object>();
-            context.connectionStartOk(props, mechanism, stResponse.ToArray(), "utf8");
+            context.ConnectionStartOk(props, mechanism, stResponse.ToArray(), "utf8");
         }
 
-        public override void closed()
+        public override void Closed()
         {
-            log.debug("Delegate closed");
+            log.Debug("Delegate Closed");
             lock (_client.CloseOk)
             {
                 try
                 {
-                    _client.Closed = true;
+                    _client.IsClosed = true;
                     Monitor.PulseAll(_client.CloseOk);
                 }
                 catch (Exception e)
@@ -82,16 +82,16 @@
             }
         }
 
-        public override void connectionClose(Channel context, ConnectionClose connectionClose)
+        public override void ConnectionClose(Channel context, ConnectionClose connectionClose)
         {
-            base.connectionClose(context, connectionClose);
-            ErrorCode errorCode = ErrorCode.getErrorCode((int) connectionClose.getReplyCode());
+            base.ConnectionClose(context, connectionClose);
+            ErrorCode errorCode = ErrorCode.GetErrorCode((int) connectionClose.GetReplyCode());
             if (_client.ClosedListener == null && errorCode.Code != (int) QpidErrorCode.NO_ERROR)
             {
-                throw new Exception ("Server closed the connection: Reason " +
-                                       connectionClose.getReplyText());
+                throw new Exception ("Server Closed the connection: Reason " +
+                                       connectionClose.GetReplyText());
             }           
-                _client.ClosedListener.onClosed(errorCode, connectionClose.getReplyText(), null);                   
+                _client.ClosedListener.OnClosed(errorCode, connectionClose.GetReplyText(), null);                   
         }
     }
 }

Modified: qpid/trunk/qpid/dotnet/client-010/client/client/ClientSession.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSession.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client/ClientSession.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/client/ClientSession.cs Thu Dec  3 22:31:12 2009
@@ -24,14 +24,13 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Text;
 using org.apache.qpid.transport;
 using org.apache.qpid.transport.util;
 
 namespace org.apache.qpid.client
 {
     /// <summary> Implements a Qpid Sesion.</summary>
-    public class ClientSession : Session
+    public class ClientSession : Session, IClientSession
     {
         public static short TRANSFER_ACQUIRE_MODE_NO_ACQUIRE = 1;
         public static short TRANSFER_ACQUIRE_MODE_PRE_ACQUIRE = 0;
@@ -47,13 +46,13 @@
         public static short MESSAGE_ACQUIRE_ANY_AVAILABLE_MESSAGE = 0;
         public static short MESSAGE_ACQUIRE_MESSAGES_IF_ALL_ARE_AVAILABLE = 1;
 
-        private Dictionary<String, IMessageListener> _listeners = new Dictionary<String, IMessageListener>();
+        private readonly Dictionary<String, IMessageListener> _listeners = new Dictionary<String, IMessageListener>();
 
         public ClientSession(byte[] name) : base(name)
         {
         }
 
-        public void attachMessageListener(IMessageListener listener, string Destination)
+        public void AttachMessageListener(IMessageListener listener, string Destination)
         {
             _listeners.Add(Destination, listener);
         }
@@ -63,47 +62,47 @@
             get { return _listeners; }
         }
 
-        public void messageTransfer(String destination, string routingkey, IMessage message)
+        public void MessageTransfer(String destination, string routingkey, IMessage message)
         {           
-            message.DeliveryProperties.setRoutingKey(routingkey);
-            messageTransfer(destination, message);
+            message.DeliveryProperties.SetRoutingKey(routingkey);
+            MessageTransfer(destination, message);
         }
 
-        public void messageTransfer(String destination, IMessage message)
+        public void MessageTransfer(String destination, IMessage message)
         {           
             byte[] body = new byte[message.Body.Position];
             message.Body.Seek(0, SeekOrigin.Begin);
             message.Body.Read(body, 0, body.Length);
-            message.MessageProperties.setMessageId(UUID.randomUUID());
-            messageTransfer(destination,
+            message.MessageProperties.SetMessageId(UUID.RandomUuid());
+            MessageTransfer(destination,
                             MessageAcceptMode.NONE,
                             MessageAcquireMode.PRE_ACQUIRED,
                             message.Header,
                             body);
         }
 
-        public void queueDeclare(String queue)
+        public void QueueDeclare(String queue)
         {
-            queueDeclare(queue, null, null);
+            QueueDeclare(queue, null, null);
         }
 
-        public void queueDeclare(String queue, params Option[] options) 
+        public void QueueDeclare(String queue, params Option[] options) 
         {
-            queueDeclare(queue, null, null, options);
+            QueueDeclare(queue, null, null, options);
         }
 
-        public void exchangeBind(String queue, String exchange, String bindingKey)
+        public void ExchangeBind(String queue, String exchange, String bindingKey)
         {
-            exchangeBind(queue, exchange, bindingKey, null);
+            ExchangeBind(queue, exchange, bindingKey, null);
         }
 
-         public void messageSubscribe(String queue)
+         public void MessageSubscribe(String queue)
          {
-             messageSubscribe(queue, queue, MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED, null, 0, null);
+             MessageSubscribe(queue, queue, MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED, null, 0, null);
              // issue credits     
-             messageSetFlowMode(queue, MessageFlowMode.WINDOW);
-             messageFlow(queue, MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
-             messageFlow(queue, MessageCreditUnit.MESSAGE, 10000);                                
+             MessageSetFlowMode(queue, MessageFlowMode.WINDOW);
+             MessageFlow(queue, MessageCreditUnit.BYTE, MESSAGE_FLOW_MAX_BYTES);
+             MessageFlow(queue, MessageCreditUnit.MESSAGE, 10000);                                
          }
              
     }

Modified: qpid/trunk/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs Thu Dec  3 22:31:12 2009
@@ -23,33 +23,33 @@
 {
     public class ClientSessionDelegate : SessionDelegate
     {
-        private static readonly Logger _log = Logger.get(typeof (ClientSessionDelegate));
+        private static readonly Logger _log = Logger.Get(typeof (ClientSessionDelegate));
 
         //  --------------------------------------------
         //   Message methods
         // --------------------------------------------
-        public override void messageTransfer(Session session, MessageTransfer xfr)
+        public override void MessageTransfer(Session session, MessageTransfer xfr)
         {
-            if (((ClientSession) session).MessageListeners.ContainsKey(xfr.getDestination()))
+            if (((ClientSession) session).MessageListeners.ContainsKey(xfr.GetDestination()))
             {
-                IMessageListener listener = ((ClientSession)session).MessageListeners[xfr.getDestination()];
-                listener.messageTransfer( new Message(xfr));
+                IMessageListener listener = ((ClientSession)session).MessageListeners[xfr.GetDestination()];
+                listener.MessageTransfer( new Message(xfr));
             }
             else
             {
-                _log.warn("No listener set for: {0}", xfr);
+                _log.Warn("No listener set for: {0}", xfr);
             }
         }
 
-        public override void messageReject(Session session, MessageReject mstruct)
+        public override void MessageReject(Session session, MessageReject mstruct)
         {
-            foreach (Range range in mstruct.getTransfers())
+            foreach (Range range in mstruct.GetTransfers())
             {
                 for (long l = range.Lower; l <= range.Upper; l++)
                 {
-                    _log.warn("message rejected: " + session.getCommand((int) l));
+                    _log.Warn("message rejected: " + session.GetCommand((int) l));
                 }
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/client/ErrorCode.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client/ErrorCode.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client/ErrorCode.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/client/ErrorCode.cs Thu Dec  3 22:31:12 2009
@@ -74,7 +74,7 @@
             get { return _hardError; }
         }
 
-        public static ErrorCode getErrorCode(int code)
+        public static ErrorCode GetErrorCode(int code)
         {
             switch (code)
             {
@@ -137,4 +137,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}

Added: qpid/trunk/qpid/dotnet/client-010/client/client/IClient.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client/IClient.cs?rev=886962&view=auto
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client/IClient.cs (added)
+++ qpid/trunk/qpid/dotnet/client-010/client/client/IClient.cs Thu Dec  3 22:31:12 2009
@@ -0,0 +1,75 @@
+/*
+* 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;
+
+namespace org.apache.qpid.client
+{
+    public interface IClient
+    {
+        /// <summary>
+        /// Establish a connection with the broker using the given parameters
+        /// 
+        /// </summary>
+        /// <param name="host">host name</param>
+        /// <param name="port">port number</param>
+        /// <param name="virtualHost">virtualHost the virtual host name</param>
+        /// <param name="username"> username user name</param>
+        /// <param name="passwor">password password</param>
+        void Connect(String host, int port, String virtualHost, String username, String passwor);
+
+        /// <summary>        
+        /// Close this client
+        /// </summary>
+        void Close();
+
+        /// <summary>
+        /// Create a session for this connection.
+        /// The returned session is suspended
+        /// (i.e. this session is not attached to an underlying channel)
+        /// </summary>
+        /// <param name="expiryInSeconds">Expiry time expressed in seconds, if the value is less than
+        /// or equal to 0 then the session does not expire.</param>
+        /// <returns>A newly created (suspended) session.</returns>
+        IClientSession CreateSession(long expiryInSeconds);
+
+        /// <summary>      
+        /// If the communication layer detects a serious problem with a connection, it
+        //  informs the client's ClosedListener
+        /// </summary>        
+        /// 
+        IClosedListener ClosedListener { set; }
+
+        bool IsClosed { get; set; }
+
+        /// <summary>
+        /// Establishes a connection with a broker using SSL
+        /// 
+        /// </summary>
+        /// <param name="host">Host name on which a broker is deployed</param>
+        /// <param name="port">Broker port </param>
+        /// <param name="virtualHost">virtual host name</param>
+        /// <param name="username">User Name</param>
+        /// <param name="password">Password</param>
+        /// <param name="serverName">Name of the SSL server</param>
+        /// <param name="certPath">Path to the X509 certificate to be used for client authentication</param>
+        /// <param name="rejectUntrusted">If true connection will not be established if the broker is not trusted</param>
+        void ConnectSSL(String host, int port, String virtualHost, String username, String password, string serverName, string certPath, bool rejectUntrusted);
+    }
+}

Added: qpid/trunk/qpid/dotnet/client-010/client/client/IClientSession.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client/IClientSession.cs?rev=886962&view=auto
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client/IClientSession.cs (added)
+++ qpid/trunk/qpid/dotnet/client-010/client/client/IClientSession.cs Thu Dec  3 22:31:12 2009
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using org.apache.qpid.transport;
+
+namespace org.apache.qpid.client
+{
+    public interface IClientSession : ISession
+    {
+        void AttachMessageListener(IMessageListener listener, string Destination);
+        Dictionary<String, IMessageListener> MessageListeners { get; }
+        void MessageTransfer(String destination, string routingkey, IMessage message);
+        void MessageTransfer(String destination, IMessage message);
+        void QueueDeclare(String queue);
+        void QueueDeclare(String queue, params Option[] options);
+        void ExchangeBind(String queue, String exchange, String bindingKey);
+        void MessageSubscribe(String queue);
+    }
+}

Copied: qpid/trunk/qpid/dotnet/client-010/client/client/IClosedListener.cs (from r886946, qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client/IClosedListener.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/client/IClosedListener.cs&p1=qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs&r1=886946&r2=886962&rev=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/client/IClosedListener.cs Thu Dec  3 22:31:12 2009
@@ -17,15 +17,13 @@
 * under the License.
 */
 
+using System;
 
 namespace org.apache.qpid.client
 {
-    public interface IMessageListener
+    public interface IClosedListener
     {
-        /// <summary>
-        /// Inform the listener of the message transfer
-        /// </summary>
-        /// <param name="xfr">The message transfer object</param>
-        void messageTransfer(IMessage xfr);
+
+        void OnClosed(ErrorCode errorCode, String reason, Exception t);
     }
 }

Modified: qpid/trunk/qpid/dotnet/client-010/client/client/IMessage.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client/IMessage.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client/IMessage.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/client/IMessage.cs Thu Dec  3 22:31:12 2009
@@ -37,12 +37,12 @@
 
         Dictionary<String, Object> ApplicationHeaders { get; set; }
 
-        void appendData(byte[] bytes);
+        void AppendData(byte[] bytes);
 
         MemoryStream Body { get; }
 
         string Destination { get; }
 
-        void clearData();
+        void ClearData();
     }
 }

Copied: qpid/trunk/qpid/dotnet/client-010/client/client/IMessageListener.cs (from r886946, qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client/IMessageListener.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/client/IMessageListener.cs&p1=qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs&r1=886946&r2=886962&rev=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/client/IMessageListener.cs Thu Dec  3 22:31:12 2009
@@ -26,6 +26,6 @@
         /// Inform the listener of the message transfer
         /// </summary>
         /// <param name="xfr">The message transfer object</param>
-        void messageTransfer(IMessage xfr);
+        void MessageTransfer(IMessage xfr);
     }
 }

Modified: qpid/trunk/qpid/dotnet/client-010/client/client/Message.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/client/Message.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/client/Message.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/client/Message.cs Thu Dec  3 22:31:12 2009
@@ -37,7 +37,7 @@
         {
             _message = new MessageTransfer();
             _message.Header = new Header( new MessageProperties(), new DeliveryProperties());
-            ((MessageProperties) _message.Header.Structs[0]).setApplicationHeaders(new Dictionary<string, object>());
+            ((MessageProperties) _message.Header.Structs[0]).SetApplicationHeaders(new Dictionary<string, object>());
         }
 
         public MessageProperties MessageProperties
@@ -84,24 +84,24 @@
             get
             {
                 if (Header != null)
-                    return ((MessageProperties) Header.Structs[0]).getApplicationHeaders();
+                    return ((MessageProperties) Header.Structs[0]).GetApplicationHeaders();
                 return null;
             }
             set
             {
                 if (Header != null)
                 {
-                    ((MessageProperties) Header.Structs[0]).setApplicationHeaders(value);
+                    ((MessageProperties) Header.Structs[0]).SetApplicationHeaders(value);
                 }
             }
         }
 
-        public void appendData(byte[] bytes)
+        public void AppendData(byte[] bytes)
         {
             Body.Write(bytes, 0, bytes.Length);
         }
 
-        public void clearData()
+        public void ClearData()
         {
             Body.Seek(0, SeekOrigin.Begin);
         }
@@ -125,7 +125,7 @@
 
         public string Destination
         {
-            get{ return _message.getDestination();}
+            get{ return _message.GetDestination();}
         }
     }
 }

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/Binary.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/Binary.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/Binary.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/Binary.cs Thu Dec  3 22:31:12 2009
@@ -51,22 +51,22 @@
 		{
 		}
 		
-		public byte[] array()
+		public byte[] Array()
 		{
 			return bytes;
 		}
 		
-		public int offset()
+		public int Offset()
 		{
 			return offset_Renamed_Field;
 		}
 		
-		public int size()
+		public int Size()
 		{
 			return size_Renamed_Field;
 		}
 		
-		public Binary slice(int low, int high)
+		public Binary Slice(int low, int high)
 		{
 			int sz;
 			
@@ -126,4 +126,4 @@
 			return true;
 		}
 	}
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/Channel.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/Channel.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/Channel.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/Channel.cs Thu Dec  3 22:31:12 2009
@@ -27,9 +27,9 @@
     /// <summary> 
     /// Channel
     /// </summary>
-    public class Channel : Invoker, ProtocolDelegate<Object>
+    public class Channel : Invoker, IProtocolDelegate<Object>
     {
-        private static readonly Logger log = Logger.get(typeof (Channel));
+        private static readonly Logger log = Logger.Get(typeof (Channel));
 
         private readonly Connection _connection;
         private readonly int _channel;
@@ -52,7 +52,7 @@
         }
 
         // Invoked when a network event is received
-        public void On_ReceivedEvent(object sender, ReceivedPayload<ProtocolEvent> payload)
+        public void On_ReceivedEvent(object sender, ReceivedPayload<IProtocolEvent> payload)
         {
             if (payload.Payload.Channel == _channel)
             {
@@ -72,10 +72,10 @@
             switch (method.EncodedTrack)
             {
                 case Frame.L1:
-                    method.dispatch(this, _connection.ConnectionDelegate);
+                    method.Dispatch(this, _connection.ConnectionDelegate);
                     break;
                 case Frame.L2:
-                    method.dispatch(this, _methoddelegate);
+                    method.Dispatch(this, _methoddelegate);
                     break;
                 case Frame.L3:
                     method.ProcessProtocolEvent(_session, _sessionDelegate);
@@ -97,28 +97,28 @@
 
         #endregion
 
-        public void exception(Exception t)
+        public void Exception(Exception t)
         {
-            _session.exception(t);
+            _session.Exception(t);
         }
 
-        public void closedFromConnection()
+        public void ClosedFromConnection()
         {
-            log.debug("channel closed: ", this);
+            log.Debug("channel Closed: ", this);
             if (_session != null)
             {
-                _session.closed();
+                _session.Closed();
             }
         }
 
-        public void closed()
+        public void Closed()
         {
-            log.debug("channel closed: ", this);
+            log.Debug("channel Closed: ", this);
             if (_session != null)
             {
-                _session.closed();
+                _session.Closed();
             }
-            _connection.removeChannel(_channel);
+            _connection.RemoveChannel(_channel);
         }
 
         public int EncodedChannel
@@ -132,43 +132,43 @@
             set { _session = value; }
         }
 
-        public void closeCode(ConnectionClose close)
+        public void CloseCode(ConnectionClose close)
         {
             if (_session != null)
             {
-                _session.closeCode(close);
+                _session.CloseCode(close);
             }
         }
 
-        private void emit(ProtocolEvent pevent)
+        private void Emit(IProtocolEvent pevent)
         {
             pevent.Channel = _channel;
-            _connection.send(pevent);
+            _connection.Send(pevent);
         }
 
-        public void method(Method m)
+        public void Method(Method m)
         {
-            emit(m);
+            Emit(m);
 
             if (!m.Batch)
             {
-                _connection.flush();
+                _connection.Flush();
             }
         }
 
-        protected override void invoke(Method m)
+        protected override void Invoke(Method m)
         {
-            method(m);
+            Method(m);
         }
 
-        public override Future invoke(Method m, Future future)
+        public override IFuture Invoke(Method m, IFuture future)
         {
             throw new Exception("UnsupportedOperation");
         }
 
-        public String toString()
+        public override String ToString()
         {
             return String.Format("{0}:{1}", _connection, _channel);
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs Thu Dec  3 22:31:12 2009
@@ -26,16 +26,16 @@
     /// </summary>
     internal class ChannelDelegate : MethodDelegate<Channel>
     {
-        public override void sessionDetached(Channel channel, SessionDetached closed)
+        public override void SessionDetached(Channel channel, SessionDetached closed)
         {
-            channel.closed();
+            channel.Closed();
         }
 
-        public override void sessionDetach(Channel channel, SessionDetach dtc)
+        public override void SessionDetach(Channel channel, SessionDetach dtc)
         {
-            channel.Session.closed();
-            channel.sessionDetached(dtc.getName(), SessionDetachCode.NORMAL);
-            channel.closed();
+            channel.Session.Closed();
+            channel.SessionDetached(dtc.GetName(), SessionDetachCode.NORMAL);
+            channel.Closed();
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/Connection.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/Connection.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/Connection.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/Connection.cs Thu Dec  3 22:31:12 2009
@@ -29,17 +29,17 @@
     /// </summary>
     public class Connection
     {
-        private static readonly Logger log = Logger.get(typeof (Connection));
+        private static readonly Logger log = Logger.Get(typeof (Connection));
 
-        private readonly Sender<ProtocolEvent> _sender;
+        private readonly ISender<IProtocolEvent> _sender;
         private readonly ConnectionDelegate _connDdelegate;
         private  int _channelMax = 1;
         private int _connectionId;
-        private readonly Receiver<ReceivedPayload<ProtocolEvent>> _receiver;
+        private readonly IReceiver<ReceivedPayload<IProtocolEvent>> _receiver;
 
         private readonly Dictionary<int, Channel> _channels = new Dictionary<int, Channel>();
 
-        public Connection(Receiver<ReceivedPayload<ProtocolEvent>> receiver, Sender<ProtocolEvent> sender, ConnectionDelegate connDdelegate)
+        public Connection(IReceiver<ReceivedPayload<IProtocolEvent>> receiver, ISender<IProtocolEvent> sender, ConnectionDelegate connDdelegate)
         {
             _receiver = receiver;
             _sender = sender;
@@ -63,20 +63,20 @@
             set { _channelMax = value; }
         }
 
-        public void send(ProtocolEvent pevent)
+        public void Send(IProtocolEvent pevent)
         {
-            log.debug("SEND: [{0}] {1}", this, pevent);
-            _sender.send(pevent);
+            log.Debug("SEND: [{0}] {1}", this, pevent);
+            _sender.Send(pevent);
         }
 
-        public void flush()
+        public void Flush()
         {
-            log.debug("FLUSH: [{0}]", this);
-            _sender.flush();
+            log.Debug("FLUSH: [{0}]", this);
+            _sender.Flush();
         }
 
 
-        public Channel getChannel()
+        public Channel GetChannel()
         {
             lock (_channels)
             {
@@ -84,14 +84,14 @@
                 {
                     if (!_channels.ContainsKey(i))
                     {
-                        return getChannel(i);
+                        return GetChannel(i);
                     }
                 }
                 throw new Exception("no more _channels available");
             }
         }
 
-        public Channel getChannel(int number)
+        public Channel GetChannel(int number)
         {
             lock (_channels)
             {
@@ -103,7 +103,7 @@
                 }
                 if (channel == null)
                 {
-                    channel = new Channel(this, number, _connDdelegate.getSessionDelegate());                   
+                    channel = new Channel(this, number, _connDdelegate.GetSessionDelegate());                   
                     _receiver.Received += channel.On_ReceivedEvent;                   
                     _channels.Add(number, channel);
                 }
@@ -111,7 +111,7 @@
             }
         }
 
-        public void removeChannel(int number)
+        public void RemoveChannel(int number)
         {
             lock (_channels)
             {
@@ -120,51 +120,51 @@
             }
         }
 
-        public void On_ReceivedEvent(object sender, ReceivedPayload<ProtocolEvent> payload)
+        public void On_ReceivedEvent(object sender, ReceivedPayload<IProtocolEvent> payload)
         {
-           log.debug("RECV: [{0}] {1}", this, payload.Payload);
+           log.Debug("RECV: [{0}] {1}", this, payload.Payload);
             if (_channels.ContainsKey(payload.Payload.Channel)) return;
-            Channel channel = getChannel(payload.Payload.Channel);
+            Channel channel = GetChannel(payload.Payload.Channel);
             channel.On_ReceivedEvent(sender, payload);
         }
 
         public void On_ReceivedException(Object sender, ExceptionArgs arg)
         {
-            _connDdelegate.exception(arg.Exception);
+            _connDdelegate.Exception(arg.Exception);
         }
 
         public void On_ReceivedClosed(Object sender, EventArgs arg)
         {
-            log.debug("Connection closed: {0}", this);
+            log.Debug("Connection Closed: {0}", this);
             lock (_channels)
             {
                 foreach (Channel ch in _channels.Values)
                 {
-                    ch.closedFromConnection();
+                    ch.ClosedFromConnection();
                 }
             }
             _channels.Clear();
-            _connDdelegate.closed();
+            _connDdelegate.Closed();
         }
 
 
-        public void closeCode(ConnectionClose close)
+        public void CloseCode(ConnectionClose close)
         {
             lock (_channels)
             {
                 foreach (Channel ch in _channels.Values)
                 {
-                    ch.closeCode(close);
+                    ch.CloseCode(close);
                 }
             }
         }
 
-        public void close()
+        public void Close()
         {
-            _sender.close();
+            _sender.Close();
         }
 
-        public String toString()
+        public override String ToString()
         {
             return String.Format("conn:{0}", this);
         }

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs Thu Dec  3 22:31:12 2009
@@ -32,16 +32,16 @@
     /// </summary>
     public abstract class ConnectionDelegate : MethodDelegate<Channel>
     {
-        private static readonly Logger log = Logger.get(typeof(ConnectionDelegate));
+        private static readonly Logger log = Logger.Get(typeof(ConnectionDelegate));
         private String _virtualHost;
 
         private ManualResetEvent _negotiationComplete;
 
-        public abstract SessionDelegate getSessionDelegate();
+        public abstract SessionDelegate GetSessionDelegate();
 
-        public abstract void exception(Exception t);
+        public abstract void Exception(Exception t);
 
-        public abstract void closed();
+        public abstract void Closed();
 
         public void setCondition(ManualResetEvent negotiationComplete)
         {
@@ -50,12 +50,12 @@
 
         public virtual void init(Channel ch, ProtocolHeader hdr)
         {
-            ch.Connection.send(new ProtocolHeader((byte)1, hdr.Major, hdr.Minor));
+            ch.Connection.Send(new ProtocolHeader((byte)1, hdr.Major, hdr.Minor));
             List<Object> plain = new List<Object>();
             plain.Add("PLAIN");
             List<Object> utf8 = new List<Object>();
             utf8.Add("utf8");
-            ch.connectionStart(null, plain, utf8);
+            ch.ConnectionStart(null, plain, utf8);
         }
 
         public String VirtualHost
@@ -67,42 +67,42 @@
         // ----------------------------------------------
         //           Client side
         //-----------------------------------------------
-        public override void connectionStart(Channel context, ConnectionStart mstruct)
+        public override void ConnectionStart(Channel context, ConnectionStart mstruct)
         {            
             Dictionary<String, Object> props = new Dictionary<String, Object>();
-            context.connectionStartOk(props, null, null, "utf8");
+            context.ConnectionStartOk(props, null, null, "utf8");
         }
 
-        public override void connectionSecure(Channel context, ConnectionSecure mstruct)
+        public override void ConnectionSecure(Channel context, ConnectionSecure mstruct)
         {      // todo SASL          
-            context.connectionSecureOk(new byte[0]);
+            context.ConnectionSecureOk(new byte[0]);
         }
 
-        public override void connectionTune(Channel context, ConnectionTune mstruct)
+        public override void ConnectionTune(Channel context, ConnectionTune mstruct)
         {
-            context.Connection.ChannelMax = mstruct.getChannelMax();
-            context.connectionTuneOk(mstruct.getChannelMax(), mstruct.getMaxFrameSize(), mstruct.getHeartbeatMax());
-            context.connectionOpen(_virtualHost, null, Option.INSIST);
+            context.Connection.ChannelMax = mstruct.GetChannelMax();
+            context.ConnectionTuneOk(mstruct.GetChannelMax(), mstruct.GetMaxFrameSize(), mstruct.GetHeartbeatMax());
+            context.ConnectionOpen(_virtualHost, null, Option.INSIST);
         }
 
-        public override void connectionOpenOk(Channel context, ConnectionOpenOk mstruct)
+        public override void ConnectionOpenOk(Channel context, ConnectionOpenOk mstruct)
         {
-            List<Object> knownHosts = mstruct.getKnownHosts();
+            List<Object> knownHosts = mstruct.GetKnownHosts();
             if (_negotiationComplete != null)
             {
                 _negotiationComplete.Set();
             }
         }
 
-        public override void connectionRedirect(Channel context, ConnectionRedirect mstruct)
+        public override void ConnectionRedirect(Channel context, ConnectionRedirect mstruct)
         {
             // not going to bother at the moment
         }
 
-        public override void connectionClose(Channel ch, ConnectionClose close)
+        public override void ConnectionClose(Channel ch, ConnectionClose close)
         {
-            ch.Connection.closeCode(close);
-            ch.connectionCloseOk();
+            ch.Connection.CloseCode(close);
+            ch.ConnectionCloseOk();
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/Field.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/Field.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/Field.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/Field.cs Thu Dec  3 22:31:12 2009
@@ -19,8 +19,7 @@
 *
 */
 using System;
-using Decoder = org.apache.qpid.transport.codec.Decoder;
-using Encoder = org.apache.qpid.transport.codec.Encoder;
+using org.apache.qpid.transport.codec;
 
 namespace org.apache.qpid.transport
 {
@@ -62,14 +61,14 @@
             get { return index; }
         }
 
-        public abstract bool has(Object mystruct);
+        public abstract bool Has(Object mystruct);
 
-        public abstract void has(Object mystruct, bool value);
+        public abstract void Has(Object mystruct, bool value);
 
-        public abstract T get(Object mystruct);
+        public abstract T Get(Object mystruct);
 
-        public abstract void read(Decoder dec, Object mystruct);
+        public abstract void Read(IDecoder dec, Object mystruct);
 
-        public abstract void write(Encoder enc, Object mystruct);
+        public abstract void Write(IEncoder enc, Object mystruct);
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/Header.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/Header.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/Header.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/Header.cs Thu Dec  3 22:31:12 2009
@@ -47,7 +47,7 @@
         }
 
 
-        public Struct get(Struct klass)
+        public Struct Get(Struct klass)
         {
             foreach (Struct st in _mystructs)
             {
@@ -59,7 +59,7 @@
             return null;
         }
 
-        public String toString()
+        public override String ToString()
         {
             StringBuilder str = new StringBuilder();
             str.Append(" Header(");
@@ -80,4 +80,4 @@
             return str.ToString();
         }
     }
-}
\ No newline at end of file
+}

Copied: qpid/trunk/qpid/dotnet/client-010/client/transport/IBinding.cs (from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/IBinding.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/transport/IBinding.cs&p1=qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs&r1=886946&r2=886962&rev=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/IBinding.cs Thu Dec  3 22:31:12 2009
@@ -18,24 +18,17 @@
 * under the License.
 *
 */
+using System;
 
-namespace org.apache.qpid.transport.util
+namespace org.apache.qpid.transport
 {
-	
-	/// <summary> 
-	/// Functions	 
-	/// </summary>
-	
-	public class Functions
-	{		
-		public static sbyte lsb(int i)
-		{
-			return (sbyte) (0xFF & i);
-		}
-		
-		public static sbyte lsb(long l)
-		{
-			return (sbyte) (0xFF & l);
-		}				
-	}
-}
\ No newline at end of file
+    /// <summary> 
+    /// Binding
+    /// </summary>
+    internal interface IBinding<E, T>
+    {
+        E Endpoint(ISender<T> sender);
+
+        IReceiver<R> Receiver<R>(E endpoint) where R : EventArgs;
+    }
+}

Copied: qpid/trunk/qpid/dotnet/client-010/client/transport/IFuture.cs (from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/IFuture.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/transport/IFuture.cs&p1=qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs&r1=886946&r2=886962&rev=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/IFuture.cs Thu Dec  3 22:31:12 2009
@@ -19,23 +19,20 @@
 *
 */
 
-using System;
-
 namespace org.apache.qpid.transport
 {
-    public class ExceptionArgs : EventArgs
+    /// <summary> 
+    /// Future
+    /// </summary>
+    public interface IFuture
     {
-        public ExceptionArgs(Exception e)
+        Struct Result
         {
-            m_exception = e;
+            get; set;
         }
-        private Exception m_exception;
 
-        public Exception Exception
-        {
-            get { return m_exception; }
-            set { m_exception = value; }
+        Session Session
+        { set;
         }
-
     }
 }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message