You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ar...@apache.org on 2008/09/08 13:46:06 UTC

svn commit: r693060 [1/6] - in /incubator/qpid/trunk/qpid/dotnet/client-010: ./ client/ client/Properties/ client/client/ client/generated/ client/transport/ client/transport/codec/ client/transport/exception/ client/transport/network/ client/transport...

Author: arnaudsimon
Date: Mon Sep  8 04:46:01 2008
New Revision: 693060

URL: http://svn.apache.org/viewvc?rev=693060&view=rev
Log:
Qpid-1277: AMQP 0.10 support 

Added:
    incubator/qpid/trunk/qpid/dotnet/client-010/
    incubator/qpid/trunk/qpid/dotnet/client-010/client/
    incubator/qpid/trunk/qpid/dotnet/client-010/client/Client.csproj
    incubator/qpid/trunk/qpid/dotnet/client-010/client/Properties/
    incubator/qpid/trunk/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/client/
    incubator/qpid/trunk/qpid/dotnet/client-010/client/client.sln
    incubator/qpid/trunk/qpid/dotnet/client-010/client/client.suo   (with props)
    incubator/qpid/trunk/qpid/dotnet/client-010/client/client/Client.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientInterface.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSession.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClosedListenerInterface.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ErrorCode.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/generated/
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Binary.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Binding.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Channel.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ClientDelegate.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Connection.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Field.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Future.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Header.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Method.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolDelegate.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolError.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolEvent.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolHeader.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Range.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/RangeSet.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ReceivedPayload.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Receiver.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Result.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Sender.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Session.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/SessionDelegate.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Struct.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractDecoder.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/Decoder.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/Encodable.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/Encoder.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSDecoder.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSEncoder.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/exception/
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ProtocolVersionException.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/exception/SessionClosedException.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/exception/SessionException.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/exception/TransportException.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/network/
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/network/Assembler.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/network/Disassembler.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/network/Frame.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/network/InputHandler.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/network/NetworkDelegate.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/network/NetworkEvent.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoReceiver.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoSender.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoTransport.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/ByteEncoder.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/CircularBuffer.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/Logger.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/Serial.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/UUID.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/demo/
    incubator/qpid/trunk/qpid/dotnet/client-010/demo/Demo.csproj
    incubator/qpid/trunk/qpid/dotnet/client-010/demo/Form1.Designer.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/demo/Form1.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/demo/Program.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/
    incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Resources.Designer.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Resources.resx
    incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Settings.Designer.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Settings.settings
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Composite.tpl
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Composite.tpl.bak
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Constant.tpl
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Enum.tpl
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Invoker.tpl
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/MethodDelegate.tpl
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/MethodDelegate.tpl.bak
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Option.tpl
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/StructFactory.tpl
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Type.tpl
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/build.xml
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/build.xml.bak
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/codegen
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/dotnetgenutil$py.class   (with props)
    incubator/qpid/trunk/qpid/dotnet/client-010/gentool/dotnetgenutil.py
    incubator/qpid/trunk/qpid/dotnet/client-010/lib/
    incubator/qpid/trunk/qpid/dotnet/client-010/lib/log4net/
    incubator/qpid/trunk/qpid/dotnet/client-010/lib/log4net/log4net-licence.txt
    incubator/qpid/trunk/qpid/dotnet/client-010/lib/log4net/log4net.dll   (with props)
    incubator/qpid/trunk/qpid/dotnet/client-010/lib/log4net/log4net.xml
    incubator/qpid/trunk/qpid/dotnet/client-010/lib/nunit/
    incubator/qpid/trunk/qpid/dotnet/client-010/lib/nunit/nunit-licence.txt
    incubator/qpid/trunk/qpid/dotnet/client-010/lib/nunit/nunit.framework.dll   (with props)
    incubator/qpid/trunk/qpid/dotnet/client-010/test/
    incubator/qpid/trunk/qpid/dotnet/client-010/test/Properties/
    incubator/qpid/trunk/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs
    incubator/qpid/trunk/qpid/dotnet/client-010/test/Test.csproj
    incubator/qpid/trunk/qpid/dotnet/client-010/test/transport/
    incubator/qpid/trunk/qpid/dotnet/client-010/test/transport/util/
    incubator/qpid/trunk/qpid/dotnet/client-010/test/transport/util/UUIDTest.cs

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/Client.csproj
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/Client.csproj?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/Client.csproj (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/Client.csproj Mon Sep  8 04:46:01 2008
@@ -0,0 +1,210 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.50727</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{B911FFD7-754F-4735-A188-218D5065BE79}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>client</RootNamespace>
+    <AssemblyName>Qpid Client</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\lib\log4net\log4net.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="client\Client.cs" />
+    <Compile Include="client\ClientConnectionDelegate.cs" />
+    <Compile Include="client\ClientSession.cs" />
+    <Compile Include="client\ClientSessionDelegate.cs" />
+    <Compile Include="client\ClientInterface.cs" />
+    <Compile Include="client\ClosedListenerInterface.cs" />
+    <Compile Include="client\ErrorCode.cs" />
+    <Compile Include="client\MessageListenerInterface.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\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\Binding.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\MSDecoder.cs" />
+    <Compile Include="transport\codec\MSEncoder.cs" />
+    <Compile Include="transport\codec\Decoder.cs" />
+    <Compile Include="transport\codec\Encodable.cs" />
+    <Compile Include="transport\codec\Encoder.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\Future.cs" />
+    <Compile Include="transport\Header.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\InputHandler.cs" />
+    <Compile Include="transport\network\io\IoReceiver.cs" />
+    <Compile Include="transport\network\io\IoSender.cs" />
+    <Compile Include="transport\network\io\IoTransport.cs" />
+    <Compile Include="transport\network\NetworkDelegate.cs" />
+    <Compile Include="transport\network\NetworkEvent.cs" />
+    <Compile Include="transport\ProtocolDelegate.cs" />
+    <Compile Include="transport\ProtocolError.cs" />
+    <Compile Include="transport\ProtocolEvent.cs" />
+    <Compile Include="transport\ProtocolHeader.cs" />
+    <Compile Include="transport\Range.cs" />
+    <Compile Include="transport\RangeSet.cs" />
+    <Compile Include="transport\ReceivedPayload.cs" />
+    <Compile Include="transport\Receiver.cs" />
+    <Compile Include="transport\Result.cs" />
+    <Compile Include="transport\Sender.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. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Qpid Client")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Software Foundation")]
+[assembly: AssemblyProduct("Qpid Client")]
+[assembly: AssemblyCopyright("Copyright © Apache Software Foundation 2008")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("dac7ef42-e9c8-45a5-8050-1301b6f8160e")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/client.sln
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/client.sln?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/client.sln (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/client.sln Mon Sep  8 04:46:01 2008
@@ -0,0 +1,32 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Client.csproj", "{B911FFD7-754F-4735-A188-218D5065BE79}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "..\test\Test.csproj", "{95CB4C90-7C53-44A9-B11C-96235F158ACA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "..\demo\Demo.csproj", "{E4C46FBC-7560-406D-BFEF-CA010E584DF4}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{B911FFD7-754F-4735-A188-218D5065BE79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B911FFD7-754F-4735-A188-218D5065BE79}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B911FFD7-754F-4735-A188-218D5065BE79}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B911FFD7-754F-4735-A188-218D5065BE79}.Release|Any CPU.Build.0 = Release|Any CPU
+		{95CB4C90-7C53-44A9-B11C-96235F158ACA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{95CB4C90-7C53-44A9-B11C-96235F158ACA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{95CB4C90-7C53-44A9-B11C-96235F158ACA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{95CB4C90-7C53-44A9-B11C-96235F158ACA}.Release|Any CPU.Build.0 = Release|Any CPU
+		{E4C46FBC-7560-406D-BFEF-CA010E584DF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E4C46FBC-7560-406D-BFEF-CA010E584DF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E4C46FBC-7560-406D-BFEF-CA010E584DF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{E4C46FBC-7560-406D-BFEF-CA010E584DF4}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/client.suo
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/client.suo?rev=693060&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/qpid/trunk/qpid/dotnet/client-010/client/client.suo
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/client/Client.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/client/Client.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/client/Client.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/client/Client.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,111 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+using System;
+using System.Text;
+using System.Threading;
+using org.apache.qpid.transport;
+using org.apache.qpid.transport.network.io;
+using org.apache.qpid.transport.util;
+
+namespace org.apache.qpid.client
+{
+    public class Client : ClientInterface
+    {
+        private Connection _conn;
+        private ClientSession _session; 
+        private static readonly Logger _log = Logger.get(typeof (Client));
+        private const long timeout = 60000;
+        private bool _closed;
+        private readonly Object _closeOK;
+        private ClosedListener _closedListner;
+
+        public bool Closed
+        {
+            get { return _closed; }
+            set { _closed = value; }
+        }
+
+        public Object CloseOk
+        {
+            get { return _closeOK; }
+        }
+
+        public Client()
+        {
+            _closed = false;
+            _closeOK = new object();
+        }
+
+        #region Interface ClientInterface
+
+        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,
+                                     port, virtualHost, username));
+            ConnectionDelegate connectionDelegate = new ClientConnectionDelegate(this);
+            ManualResetEvent negotiationComplete = new ManualResetEvent(false);
+            connectionDelegate.setCondition(negotiationComplete);
+            connectionDelegate.VirtualHost = virtualHost;
+            _conn = IoTransport.connect(host, port, connectionDelegate);
+            
+            _conn.send(new ProtocolHeader(1, 0, 10));
+            negotiationComplete.WaitOne();
+        }
+
+
+        public void close()
+        {
+            Channel ch = _conn.getChannel(0);
+            ch.connectionClose(ConnectionCloseCode.NORMAL, "client is closing");
+            lock (CloseOk)
+            {
+                long start = DateTime.Now.Millisecond;
+                long elapsed = 0;
+                while (!Closed && elapsed < timeout)
+                {
+                    Monitor.Wait(CloseOk, (int) (timeout - elapsed));
+                    elapsed = DateTime.Now.Millisecond - start;
+                }
+                if (!Closed)
+                {
+                    throw new Exception("Timed out when closing connection");
+                }
+                _conn.close();
+            }
+        }
+
+        public ClientSession 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);
+            return ssn;
+        }
+
+        public ClosedListener ClosedListener
+        {
+            set { _closedListner = value; }
+            get { return _closedListner; }
+        }       
+
+        #endregion
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,76 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+using System;
+using System.Threading;
+using org.apache.qpid.transport;
+using org.apache.qpid.transport.util;
+
+namespace org.apache.qpid.client
+{
+    internal class ClientConnectionDelegate : ClientDelegate
+    {
+        private static readonly Logger log = Logger.get(typeof (ClientConnectionDelegate));
+        private readonly Client _client;
+
+        public ClientConnectionDelegate(Client client)
+        {
+            _client = client;
+        }
+
+        public override SessionDelegate getSessionDelegate()
+        {
+            return new ClientSessionDelegate();
+        }
+
+        public override void exception(Exception t)
+        {
+            throw t;
+        }
+
+        public override void closed()
+        {
+            log.debug("Delegate closed");
+            lock (_client.CloseOk)
+            {
+                try
+                {
+                    _client.Closed = true;
+                    Monitor.PulseAll(_client.CloseOk);
+                }
+                catch (Exception e)
+                {
+                    throw new SystemException("Error when closing client", e);
+                }
+            }
+        }
+
+        public new void connectionClose(Channel context, ConnectionClose connectionClose)
+        {
+            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());
+            }           
+                _client.ClosedListener.onClosed(errorCode, connectionClose.getReplyText(), null);                   
+        }
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientInterface.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientInterface.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientInterface.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientInterface.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,60 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+using System;
+using client.client;
+
+namespace org.apache.qpid.client
+{
+    public interface ClientInterface
+    {
+        /// <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>
+        ClientSession createSession(long expiryInSeconds);
+
+        /// <summary>      
+        /// If the communication layer detects a serious problem with a connection, it
+        //  informs the client's ClosedListener
+        /// </summary>        
+        /// 
+        ClosedListener ClosedListener { set; }
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSession.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSession.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSession.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSession.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,43 @@
+
+
+using System;
+using System.Collections.Generic;
+using client.client;
+using org.apache.qpid.transport;
+
+namespace org.apache.qpid.client
+{
+    /// <summary> Implements a Qpid Sesion.</summary>
+    public class ClientSession : Session
+    {
+        public static short TRANSFER_ACQUIRE_MODE_NO_ACQUIRE = 1;
+        public static short TRANSFER_ACQUIRE_MODE_PRE_ACQUIRE = 0;
+        public static short TRANSFER_CONFIRM_MODE_REQUIRED = 0;
+        public static short TRANSFER_CONFIRM_MODE_NOT_REQUIRED = 1;
+        public static short MESSAGE_FLOW_MODE_CREDIT = 0;
+        public static short MESSAGE_FLOW_MODE_WINDOW = 1;
+        public static short MESSAGE_FLOW_UNIT_MESSAGE = 0;
+        public static short MESSAGE_FLOW_UNIT_BYTE = 1;
+        public static long MESSAGE_FLOW_MAX_BYTES = 0xFFFFFFFF;
+        public static short MESSAGE_REJECT_CODE_GENERIC = 0;
+        public static short MESSAGE_REJECT_CODE_IMMEDIATE_DELIVERY_FAILED = 1;
+        public static short MESSAGE_ACQUIRE_ANY_AVAILABLE_MESSAGE = 0;
+        public static short MESSAGE_ACQUIRE_MESSAGES_IF_ALL_ARE_AVAILABLE = 1;
+
+        private Dictionary<String, MessageListener> _listeners = new Dictionary<String, MessageListener>();
+
+        public ClientSession(byte[] name) : base(name)
+        {
+        }
+
+        public void attachMessageListener(MessageListener listener, string Destination)
+        {
+            _listeners.Add(Destination, listener);
+        }
+
+        public Dictionary<String, MessageListener> MessageListeners
+        {
+            get { return _listeners; }
+        }
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,57 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+using System;
+using client.client;
+using org.apache.qpid.transport;
+using org.apache.qpid.transport.util;
+
+namespace org.apache.qpid.client
+{
+    public class ClientSessionDelegate : SessionDelegate
+    {
+        private static readonly Logger _log = Logger.get(typeof (ClientSessionDelegate));
+
+        //  --------------------------------------------
+        //   Message methods
+        // --------------------------------------------
+        public override void messageTransfer(Session session, MessageTransfer xfr)
+        {
+            if (((ClientSession) session).MessageListeners.ContainsKey(xfr.getDestination()))
+            {
+                MessageListener listener = ((ClientSession) session).MessageListeners[xfr.getDestination()];
+                listener.messageTransfer(xfr);
+            }
+            else
+            {
+                _log.warn("No listener set for: {0}", xfr);
+            }
+        }
+
+        public override void messageReject(Session session, MessageReject mstruct)
+        {
+            foreach (Range range in mstruct.getTransfers())
+            {
+                for (long l = range.Lower; l <= range.Upper; l++)
+                {
+                    _log.warn("message rejected: " + session.getCommand((int) l));
+                }
+            }
+        }
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClosedListenerInterface.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClosedListenerInterface.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClosedListenerInterface.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ClosedListenerInterface.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,29 @@
+/*
+* 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 ClosedListener
+    {
+
+        void onClosed(ErrorCode errorCode, String reason, Exception t);
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ErrorCode.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ErrorCode.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ErrorCode.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/client/ErrorCode.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,140 @@
+/*
+* 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 enum QpidErrorCode
+    {
+        NO_ERROR = 200,
+        CONTENT_TOO_LARGE = 311,
+        NO_ROUTE = 312,
+        NO_CONSUMERS = 313,
+        CONNECTION_FORCED = 320,
+        INVALID_PATH = 402,
+        ACCESS_REFUSED = 403,
+        NOT_FOUND = 404,
+        RESOURCE_LOCKED = 405,
+        PRE_CONDITION_FAILED = 406,
+        FRAME_ERROR = 501,
+        SYNTAX_ERROR = 502,
+        COMMAND_INVALID = 503,
+        SESSION_ERROR = 504,
+        NOT_ALLOWED = 530,
+        NOT_IMPLEMENTED = 540,
+        INTERNAL_ERROR = 541,
+        INVALID_ARGUMENT = 542,
+        UNDEFINED = 1
+    }
+
+    public struct ErrorCode
+    {
+        private int _code;
+        private String _desc;
+        private readonly bool _hardError;
+
+        public ErrorCode(int code, String desc, bool hardError)
+        {
+            _code = code;
+            _desc = desc;
+            _hardError = hardError;
+        }
+
+        public int Code
+        {
+            get { return _code; }
+            set { _code = value; }
+        }
+
+        public String Description
+        {
+            get { return _desc; }
+            set { _desc = value; }
+        }
+
+        public bool ISHardError
+        {
+            get { return _hardError; }
+        }
+
+        public static ErrorCode getErrorCode(int code)
+        {
+            switch (code)
+            {
+                case 200:
+                    return
+                        new ErrorCode(200, "reply-success", true);
+                case 311:
+                    return
+                        new ErrorCode(311, "content-too-large", false);
+                case 312:
+                    return
+                        new ErrorCode(312, "no-route", false);
+                case 313:
+                    return
+                        new ErrorCode(313, "content-consumers", false);
+                case 320:
+                    return
+                        new ErrorCode(320, "connection-forced", true);
+                case 402:
+                    return
+                        new ErrorCode(402, "invalid-path", true);
+                case 403:
+                    return
+                        new ErrorCode(403, "access-refused", false);
+                case 404:
+                    return
+                        new ErrorCode(404, "not-found", false);
+                case 405:
+                    return
+                        new ErrorCode(405, "resource-locked", false);
+                case 406:
+                    return
+                        new ErrorCode(406, "precondition-failed", false);
+                case 501:
+                    return
+                        new ErrorCode(501, "frame_error", true);
+                case 502:
+                    return
+                        new ErrorCode(502, "syntax_error", true);
+                case 503:
+                    return
+                        new ErrorCode(503, "command_invalid", true);
+                case 504:
+                    return
+                        new ErrorCode(504, "sesion_error", true);
+                case 530:
+                    return
+                        new ErrorCode(530, "not_allowed", true);
+                case 540:
+                    return
+                        new ErrorCode(540, "not_implemented", true);
+                case 541:
+                    return
+                        new ErrorCode(541, "internal_error", true);
+                case 542:
+                    return
+                        new ErrorCode(542, "invalid_argument", true);
+                default:
+                    return new ErrorCode(1, "undefined", true);
+            }
+        }
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/client/MessageListenerInterface.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,31 @@
+/*
+* 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 org.apache.qpid.transport;
+
+namespace client.client
+{
+    public interface MessageListener
+    {
+        /// <summary>
+        /// Inform the listener of the message transfer
+        /// </summary>
+        /// <param name="xfr">The message transfer object</param>
+        void messageTransfer(MessageTransfer xfr);
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Binary.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Binary.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Binary.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Binary.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,129 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+
+namespace org.apache.qpid.transport
+{
+	
+	
+	/// <summary> 
+    /// Binary
+	/// </summary>
+	
+	public sealed class Binary
+	{
+		
+		private readonly byte[] bytes;
+		private readonly int offset_Renamed_Field;
+		private readonly int size_Renamed_Field;
+		private int hash = 0;
+		
+		public Binary(byte[] bytes, int offset, int size)
+		{
+			if (offset + size > bytes.Length)
+			{
+				throw new System.IndexOutOfRangeException();
+			}
+			
+			this.bytes = bytes;
+			offset_Renamed_Field = offset;
+			size_Renamed_Field = size;
+		}
+		
+		public Binary(byte[] bytes):this(bytes, 0, bytes.Length)
+		{
+		}
+		
+		public byte[] array()
+		{
+			return bytes;
+		}
+		
+		public int offset()
+		{
+			return offset_Renamed_Field;
+		}
+		
+		public int size()
+		{
+			return size_Renamed_Field;
+		}
+		
+		public Binary slice(int low, int high)
+		{
+			int sz;
+			
+			if (high < 0)
+			{
+				sz = size_Renamed_Field + high;
+			}
+			else
+			{
+				sz = high - low;
+			}
+			
+			if (sz < 0)
+			{
+				sz = 0;
+			}
+			
+			return new Binary(bytes, offset_Renamed_Field + low, sz);
+		}
+		
+		public override int GetHashCode()
+		{
+			if (hash == 0)
+			{
+				int hc = 0;
+				for (int i = 0; i < size_Renamed_Field; i++)
+				{
+					hc = 31 * hc + (0xFF & bytes[offset_Renamed_Field + i]);
+				}
+				hash = hc;
+			}
+			
+			return hash;
+		}
+		
+		public  override bool Equals(System.Object o)
+		{
+			if (!(o is Binary))
+			{
+				return false;
+			}
+			
+			Binary buf = (Binary) o;
+			if (size_Renamed_Field != buf.size_Renamed_Field)
+			{
+				return false;
+			}
+			
+			for (int i = 0; i < size_Renamed_Field; i++)
+			{
+				if (bytes[offset_Renamed_Field + i] != buf.bytes[buf.offset_Renamed_Field + i])
+				{
+					return false;
+				}
+			}
+			
+			return true;
+		}
+	}
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Binding.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Binding.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Binding.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Binding.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,34 @@
+/*
+*
+* 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.transport
+{
+    /// <summary> 
+    /// Binding
+    /// </summary>
+    internal interface Binding<E, T>
+    {
+        E endpoint(Sender<T> sender);
+
+        Receiver<T> receiver<T>(E endpoint) where T : EventArgs;
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Channel.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Channel.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Channel.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Channel.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,175 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+using System;
+using org.apache.qpid.transport.network;
+using org.apache.qpid.transport.util;
+using SessionDelegate=org.apache.qpid.transport.SessionDelegate;
+
+namespace org.apache.qpid.transport
+{
+    /// <summary> 
+    /// Channel
+    /// </summary>
+    public class Channel : Invoker, ProtocolDelegate<Object>
+    {
+        private static readonly Logger log = Logger.get(typeof (Channel));
+
+        private readonly Connection _connection;
+        private readonly int _channel;
+        private readonly MethodDelegate<Channel> _methoddelegate;
+        private readonly SessionDelegate _sessionDelegate;
+        // session may be null
+        private Session _session;
+
+        public Channel(Connection connection, int channel, SessionDelegate sessionDelegate)
+        {
+            _connection = connection;
+            _channel = channel;
+            _methoddelegate = new ChannelDelegate();
+            _sessionDelegate = sessionDelegate;
+        }
+
+        public Connection Connection
+        {
+            get { return _connection; }
+        }
+
+        // Invoked when a network event is received
+        public void On_ReceivedEvent(object sender, ReceivedPayload<ProtocolEvent> payload)
+        {
+            if (payload.Payload.Channel == _channel)
+            {
+                payload.Payload.ProcessProtocolEvent(null, this);
+            }
+        }
+
+        #region ProtocolDelegate<T>
+
+        public void Init(Object v, ProtocolHeader hdr)
+        {
+            _connection.ConnectionDelegate.init(this, hdr);
+        }
+
+        public void Control(Object v, Method method)
+        {
+            switch (method.EncodedTrack)
+            {
+                case Frame.L1:
+                    method.dispatch(this, _connection.ConnectionDelegate);
+                    break;
+                case Frame.L2:
+                    method.dispatch(this, _methoddelegate);
+                    break;
+                case Frame.L3:
+                    method.ProcessProtocolEvent(_session, _sessionDelegate);
+                    break;
+                default:
+                    throw new Exception("unknown track: " + method.EncodedTrack);
+            }
+        }
+
+        public void Command(Object v, Method method)
+        {
+            method.ProcessProtocolEvent(_session, _sessionDelegate);
+        }
+
+        public void Error(Object v, ProtocolError error)
+        {
+            throw new Exception(error.Message);
+        }
+
+        #endregion
+
+        public void exception(Exception t)
+        {
+            _session.exception(t);
+        }
+
+        public void closedFromConnection()
+        {
+            log.debug("channel closed: ", this);
+            if (_session != null)
+            {
+                _session.closed();
+            }
+        }
+
+        public void closed()
+        {
+            log.debug("channel closed: ", this);
+            if (_session != null)
+            {
+                _session.closed();
+            }
+            _connection.removeChannel(_channel);
+        }
+
+        public int EncodedChannel
+        {
+            get { return _channel; }
+        }
+
+        public Session Session
+        {
+            get { return _session; }
+            set { _session = value; }
+        }
+
+        public void closeCode(ConnectionClose close)
+        {
+            if (_session != null)
+            {
+                _session.closeCode(close);
+            }
+        }
+
+        private void emit(ProtocolEvent pevent)
+        {
+            pevent.Channel = _channel;
+            _connection.send(pevent);
+        }
+
+        public void method(Method m)
+        {
+            emit(m);
+
+            if (!m.Batch)
+            {
+                _connection.flush();
+            }
+        }
+
+        protected override void invoke(Method m)
+        {
+            method(m);
+        }
+
+        public override Future<T> invoke<T>(Method m, Future<T> future)
+        {
+            throw new Exception("UnsupportedOperation");
+        }
+
+        public String toString()
+        {
+            return String.Format("{0}:{1}", _connection, _channel);
+        }
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,33 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+namespace org.apache.qpid.transport
+{
+	
+	
+	/// <summary> 
+	/// ChannelDelegate
+	/// 
+	/// </summary>
+
+    class ChannelDelegate : MethodDelegate<Channel>
+    {
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ClientDelegate.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ClientDelegate.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ClientDelegate.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ClientDelegate.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,35 @@
+/*
+*
+* 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 org.apache.qpid.transport;
+
+namespace org.apache.qpid.transport
+{
+    abstract class ClientDelegate : ConnectionDelegate
+    {
+        public override void init(Channel ch, ProtocolHeader hdr)
+        {
+            if (hdr.Major != 0 && hdr.Minor != 10)
+            {
+                throw new ProtocolVersionException((sbyte) hdr.Major, (sbyte) hdr.Minor);
+            }
+        }
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Connection.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Connection.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Connection.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Connection.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,172 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+using System;
+using System.Collections.Generic;
+using Logger = org.apache.qpid.transport.util.Logger;
+
+namespace org.apache.qpid.transport
+{
+    /// <summary> 
+    /// Connection
+    /// </summary>
+    public class Connection
+    {
+        private static readonly Logger log = Logger.get(typeof (Connection));
+
+        private readonly Sender<ProtocolEvent> _sender;
+        private readonly ConnectionDelegate _connDdelegate;
+        private  int _channelMax = 1;
+        private int _connectionId;
+        private readonly Receiver<ReceivedPayload<ProtocolEvent>> _receiver;
+
+        private readonly Dictionary<int, Channel> _channels = new Dictionary<int, Channel>();
+
+        public Connection(Receiver<ReceivedPayload<ProtocolEvent>> receiver, Sender<ProtocolEvent> sender, ConnectionDelegate connDdelegate)
+        {
+            _receiver = receiver;
+            _sender = sender;
+            _connDdelegate = connDdelegate;
+        }
+
+        public int ConnectionId
+        {
+            get { return _connectionId; }
+            set { _connectionId = value; }
+        }
+
+        public ConnectionDelegate ConnectionDelegate
+        {
+            get { return _connDdelegate; }
+        }
+
+        public int ChannelMax
+        {
+            get { return _channelMax; }
+            set { _channelMax = value; }
+        }
+
+        public void send(ProtocolEvent pevent)
+        {
+            log.debug("SEND: [{0}] {1}", this, pevent);
+            _sender.send(pevent);
+        }
+
+        public void flush()
+        {
+            log.debug("FLUSH: [{0}]", this);
+            _sender.flush();
+        }
+
+
+        public Channel getChannel()
+        {
+            lock (_channels)
+            {
+                for (int i = 0; i < ChannelMax; i++)
+                {
+                    if (!_channels.ContainsKey(i))
+                    {
+                        return getChannel(i);
+                    }
+                }
+                throw new Exception("no more _channels available");
+            }
+        }
+
+        public Channel getChannel(int number)
+        {
+            lock (_channels)
+            {
+                Channel channel = null;
+                if (_channels.Count > 0)
+                {
+                    if( _channels.ContainsKey(number))
+                        channel = _channels[number];
+                }
+                if (channel == null)
+                {
+                    channel = new Channel(this, number, _connDdelegate.getSessionDelegate());                   
+                    _receiver.Received += channel.On_ReceivedEvent;                   
+                    _channels.Add(number, channel);
+                }
+                return channel;
+            }
+        }
+
+        public void removeChannel(int number)
+        {
+            lock (_channels)
+            {
+                _receiver.Received -= _channels[number].On_ReceivedEvent;
+                _channels.Remove(number);                
+            }
+        }
+
+        public void On_ReceivedEvent(object sender, ReceivedPayload<ProtocolEvent> payload)
+        {
+           log.debug("RECV: [{0}] {1}", this, payload.Payload);
+            if (_channels.ContainsKey(payload.Payload.Channel)) return;
+            Channel channel = getChannel(payload.Payload.Channel);
+            channel.On_ReceivedEvent(sender, payload);
+        }
+
+        public void On_ReceivedException(Object sender, ExceptionArgs arg)
+        {
+            _connDdelegate.exception(arg.Exception);
+        }
+
+        public void On_ReceivedClosed(Object sender, EventArgs arg)
+        {
+            log.debug("Connection closed: {0}", this);
+            lock (_channels)
+            {
+                foreach (Channel ch in _channels.Values)
+                {
+                    ch.closedFromConnection();
+                }
+            }
+            _channels.Clear();
+            _connDdelegate.closed();
+        }
+
+
+        public void closeCode(ConnectionClose close)
+        {
+            lock (_channels)
+            {
+                foreach (Channel ch in _channels.Values)
+                {
+                    ch.closeCode(close);
+                }
+            }
+        }
+
+        public void close()
+        {
+            _sender.close();
+        }
+
+        public String toString()
+        {
+            return String.Format("conn:{0}", this);
+        }
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,109 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Logger = org.apache.qpid.transport.util.Logger;
+
+namespace org.apache.qpid.transport
+{
+    /// <summary> 
+    /// ConnectionDelegate
+    /// 
+    /// Currently only implemented client specific methods
+    /// </summary>
+    public abstract class ConnectionDelegate : MethodDelegate<Channel>
+    {
+        private static readonly Logger log = Logger.get(typeof(ConnectionDelegate));
+        private String _virtualHost;
+
+        private ManualResetEvent _negotiationComplete;
+
+        public abstract SessionDelegate getSessionDelegate();
+
+        public abstract void exception(Exception t);
+
+        public abstract void closed();
+
+        public void setCondition(ManualResetEvent negotiationComplete)
+        {
+            _negotiationComplete = negotiationComplete;
+        }
+
+        public virtual void init(Channel ch, ProtocolHeader hdr)
+        {
+            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);
+        }
+
+        public String VirtualHost
+        {
+            get { return _virtualHost; }
+            set { _virtualHost = value; }
+        }
+
+        // ----------------------------------------------
+        //           Client side
+        //-----------------------------------------------
+        public override void connectionStart(Channel context, ConnectionStart mstruct)
+        {
+            // todo SASL 
+            Dictionary<String, Object> props = new Dictionary<String, Object>();
+            context.connectionStartOk(props, null, null, "utf8");
+        }
+
+        public override void connectionSecure(Channel context, ConnectionSecure mstruct)
+        {      // todo SASL          
+            context.connectionSecureOk(new byte[0]);
+        }
+
+        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);
+        }
+
+        public override void connectionOpenOk(Channel context, ConnectionOpenOk mstruct)
+        {
+            List<Object> knownHosts = mstruct.getKnownHosts();
+            if (_negotiationComplete != null)
+            {
+                _negotiationComplete.Set();
+            }
+        }
+
+        public override void connectionRedirect(Channel context, ConnectionRedirect mstruct)
+        {
+            // not going to bother at the moment
+        }
+
+        public override void connectionClose(Channel ch, ConnectionClose close)
+        {
+            ch.Connection.closeCode(close);
+            ch.connectionCloseOk();
+        }
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Field.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Field.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Field.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Field.cs Mon Sep  8 04:46:01 2008
@@ -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;
+using Decoder = org.apache.qpid.transport.codec.Decoder;
+using Encoder = org.apache.qpid.transport.codec.Encoder;
+
+namespace org.apache.qpid.transport
+{
+    /// <summary> 
+    /// Field
+    /// </summary>
+    public abstract class Field<C, T>
+    {
+        private C container;
+        private T type;
+        private String name;
+        private int index;
+
+        protected Field(C container, T type, String name, int index)
+        {
+            this.container = container;
+            this.type = type;
+            this.name = name;
+            this.index = index;
+        }
+
+        public C Container
+        {
+            get { return container; }
+        }
+
+        public T Type
+        {
+            get { return type; }
+        }
+
+        public String Name
+        {
+            get { return name; }
+        }
+
+        public int Index
+        {
+            get { return index; }
+        }
+
+        public abstract bool has(Object mystruct);
+
+        public abstract void has(Object mystruct, bool value);
+
+        public abstract T get(Object mystruct);
+
+        public abstract void read(Decoder dec, Object mystruct);
+
+        public abstract void write(Encoder enc, Object mystruct);
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Future.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Future.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Future.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Future.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,38 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+
+namespace org.apache.qpid.transport
+{
+    /// <summary> 
+    /// Future
+    /// </summary>
+    public interface Future<T>
+    {
+        T Result
+        {
+            get; set;
+        }
+
+        Session Session
+        { set;
+        }
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Header.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Header.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Header.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Header.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,83 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace org.apache.qpid.transport
+{
+    /// <summary> 
+    /// Header
+    /// </summary>
+    public class Header
+    {
+        private readonly Struct[] _mystructs;
+
+        public Header(List<Struct> structs)
+            : this(structs.ToArray())
+        {
+        }
+
+        public Header(params Struct[] structs)
+        {
+            _mystructs = structs;
+        }
+
+        public Struct[] Structs
+        {
+            get { return _mystructs; }
+        }
+
+
+        public Struct get(Struct klass)
+        {
+            foreach (Struct st in _mystructs)
+            {
+                if (Equals(st.GetType(), klass.GetType()))
+                {
+                    return st;
+                }
+            }
+            return null;
+        }
+
+        public String toString()
+        {
+            StringBuilder str = new StringBuilder();
+            str.Append(" Header(");
+            bool first = true;
+            foreach (Struct s in _mystructs)
+            {
+                if (first)
+                {
+                    first = false;
+                }
+                else
+                {
+                    str.Append(", ");
+                }
+                str.Append(s);
+            }
+            str.Append(")");
+            return str.ToString();
+        }
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Method.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Method.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Method.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/Method.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,150 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+using System;
+using System.IO;
+using System.Text;
+using Frame = org.apache.qpid.transport.network.Frame;
+
+namespace org.apache.qpid.transport
+{
+    /// <summary> 
+    /// Method
+    /// </summary>
+    public abstract class Method : Struct, ProtocolEvent
+    {
+        public static Method create(int type)
+        {
+            return (Method) StructFactory.createInstruction(type);
+        }
+
+        // XXX: command subclass?
+        private int id;
+        private int channel;
+        private bool idSet;
+        private bool sync;
+        private bool batch;
+
+        public int Id
+        {
+            get { return id; }
+            set
+            {
+                id = value;
+                idSet = true;
+            }
+        }
+
+
+        public bool Sync
+        {
+            get { return sync; }
+            set { sync = value; }
+        }
+
+        public bool Batch
+        {
+            get { return batch; }
+            set { batch = value; }
+        }
+
+        public abstract bool hasPayload();
+
+        public virtual Header Header
+        {
+            get { return null; }
+            set { throw new Exception(); }
+        }
+
+        public virtual MemoryStream Body
+        {
+            get { return null; }
+            set { throw new Exception(); }
+        }
+
+
+        public abstract void dispatch<C>(C context, MethodDelegate<C> mdelegate );
+
+        #region ProtocolEvent
+
+        public int Channel
+        {
+            get { return channel; }
+            set { channel = value; }
+        }
+
+        public abstract byte EncodedTrack { get; set; }
+
+        public void ProcessProtocolEvent<C>(C context, ProtocolDelegate<C> protocoldelegate)
+        {
+            if (EncodedTrack == Frame.L4)
+            {
+                protocoldelegate.Command(context, this);
+            }
+            else
+            {
+                protocoldelegate.Control(context, this);
+            }
+        }
+
+        #endregion
+
+        public new String toString()
+        {
+            StringBuilder str = new StringBuilder();
+
+            str.Append("ch=");
+            str.Append(channel);
+
+            if (EncodedTrack == Frame.L4 && idSet)
+            {
+                str.Append(" id=");
+                str.Append(id);
+            }
+
+            if (sync || batch)
+            {
+                str.Append(" ");
+                str.Append("[");
+                if (Sync)
+                {
+                    str.Append("S");
+                }
+                if (Batch)
+                {
+                    str.Append("B");
+                }
+                str.Append("]");
+            }
+            str.Append(" ");
+            str.Append(base.toString());
+            if (Header != null)
+            {
+                str.Append(Header.toString());
+            }
+            if (Body != null)
+            {
+                str.Append("\n  body=");
+                str.Append(Body.ToString());
+            }
+            return str.ToString();
+        }
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolDelegate.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolDelegate.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolDelegate.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolDelegate.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,37 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+
+namespace org.apache.qpid.transport
+{
+    /// <summary> 
+    /// ProtocolDelegate
+    /// </summary>
+    public interface ProtocolDelegate<T>
+    {
+        void Init(T context, ProtocolHeader header);
+
+        void Control(T context, Method control);
+
+        void Command(T context, Method command);
+
+        void Error(T context, ProtocolError error);
+    }
+}
\ No newline at end of file