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 [4/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...

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,59 @@
+using System;
+using System.Threading;
+using org.apache.qpid.transport;
+using org.apache.qpid.transport.util;
+
+namespace common.org.apache.qpid.transport.util
+{
+    public class ResultFuture<T> : Future<T> where T : Struct 
+    {
+        const long _timeout = 60000;
+        private Struct _result;
+        private Session _session;
+        private static readonly Logger log = Logger.get(typeof(ResultFuture<T>));
+
+        public Struct get(long timeout)
+        {
+            lock (this)
+            {
+                long start = DateTime.Now.Millisecond;
+                long elapsed = 0;
+                while (! _session.Closed && _timeout - elapsed > 0 && _result == null)
+                {
+                        log.debug("{0} waiting for result: {1}", _session, this );
+                        Monitor.Wait(this, (int) (timeout - elapsed));
+                        elapsed = DateTime.Now.Millisecond - start;                   
+                }
+            }
+            if( _session.Closed )
+            {
+                throw new SessionException(_session.getExceptions());
+            }
+           return _result;
+        }
+
+        public T Result
+        {
+            get { return (T) get(_timeout); }
+            set
+            {
+                lock (this)
+                {
+                    _result = value;
+                    Monitor.PulseAll(this);
+                }
+            }
+        }
+
+        public Session Session
+        {
+            set { _session = value; }
+        }
+
+        public String toString()
+        {
+            return String.Format("Future({0})", _result);
+        }
+
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/Serial.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/Serial.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/Serial.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/Serial.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,94 @@
+/*
+*
+* 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.util
+{
+    /// <summary> 
+    /// This class provides basic serial number comparisons as defined in
+    /// RFC 1982.
+    /// </summary>
+    public class Serial
+    {
+        ///
+        /// 
+        ///Compares two numbers using serial arithmetic.
+        ///
+        /// param s1 the first serial number
+        /// param s2 the second serial number
+        ///
+        /// return a negative integer, zero, or a positive integer as the
+        /// first argument is less than, equal to, or greater than the
+        ///  second
+        ///
+        public static int compare(int s1, int s2)
+        {
+            return s1 - s2;
+        }
+
+        public static bool lt(int s1, int s2)
+        {
+            return compare(s1, s2) < 0;
+        }
+
+        public static bool le(int s1, int s2)
+        {
+            return compare(s1, s2) <= 0;
+        }
+
+        public static bool gt(int s1, int s2)
+        {
+            return compare(s1, s2) > 0;
+        }
+
+        public static bool ge(int s1, int s2)
+        {
+            return compare(s1, s2) >= 0;
+        }
+
+        public static bool eq(int s1, int s2)
+        {
+            return s1 == s2;
+        }
+
+        public static int min(int s1, int s2)
+        {
+            if (lt(s1, s2))
+            {
+                return s1;
+            }
+            else
+            {
+                return s2;
+            }
+        }
+
+        public static int max(int s1, int s2)
+        {
+            if (gt(s1, s2))
+            {
+                return s1;
+            }
+            else
+            {
+                return s2;
+            }
+        }
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/UUID.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/UUID.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/UUID.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/client/transport/util/UUID.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,88 @@
+/*
+*
+* 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.util
+{
+    public class UUID
+    {
+        private long _mostSigBits;
+
+        private long _leastSigBits;
+
+
+        public UUID(long mostSigBits, long leastSigBits)
+        {
+            _mostSigBits = mostSigBits;
+            _leastSigBits = leastSigBits;
+        }
+
+        public long MostSignificantBits
+        {
+            get { return _mostSigBits; }
+            set { _mostSigBits = value; }
+        }
+
+        public long LeastSignificantBits
+        {
+            get { return _leastSigBits; }
+            set { _leastSigBits = value; }
+        }
+
+        private UUID(byte[] r)
+        {
+            MostSignificantBits = 0;
+            LeastSignificantBits = 0;
+            for (int i = 0; i < 8; i++)
+                MostSignificantBits = (MostSignificantBits << 8) | (r[i] & 0xff);
+            for (int i = 8; i < 16; i++)
+                LeastSignificantBits = (LeastSignificantBits << 8) | (r[i] & 0xff); 
+        }
+
+        public static UUID randomUUID()
+        {
+            byte[] randomBytes = new byte[16];
+            Random random = new Random();
+            random.NextBytes(randomBytes);
+            randomBytes[6] &= 0x0f;  
+            randomBytes[6] |= 0x40; 
+            randomBytes[8] &= 0x3f; 
+            randomBytes[8] |= 0x80;           
+            return new UUID(randomBytes);
+        }
+
+        public new String ToString()
+        {
+            return (digits(_mostSigBits >> 32, 8) + "-" +
+                    digits(_mostSigBits >> 16, 4) + "-" +
+                    digits(_mostSigBits, 4) + "-" +
+                    digits(_leastSigBits >> 48, 4) + "-" +
+                    digits(_leastSigBits, 12));
+        }
+
+        private static String digits(long val, int digits)
+        {
+            long hi = 1L << (digits * 4);
+            return Convert.ToString((hi | (val & (hi - 1))), 16);
+        }
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/demo/Demo.csproj
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/demo/Demo.csproj?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/demo/Demo.csproj (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/demo/Demo.csproj Mon Sep  8 04:46:01 2008
@@ -0,0 +1,84 @@
+<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>{E4C46FBC-7560-406D-BFEF-CA010E584DF4}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>demo</RootNamespace>
+    <AssemblyName>Qpid Demo</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.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\client\Client.csproj">
+      <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
+      <Name>Client</Name>
+    </ProjectReference>
+  </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/demo/Form1.Designer.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/demo/Form1.Designer.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/demo/Form1.Designer.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/demo/Form1.Designer.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,39 @@
+namespace demo
+{
+    partial class Form1
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Text = "Form1";
+        }
+
+        #endregion
+    }
+}
+

Added: incubator/qpid/trunk/qpid/dotnet/client-010/demo/Form1.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/demo/Form1.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/demo/Form1.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/demo/Form1.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace demo
+{
+    public partial class Form1 : Form
+    {
+        public Form1()
+        {
+            InitializeComponent();
+        }
+    }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/demo/Program.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/demo/Program.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/demo/Program.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/demo/Program.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,99 @@
+using System;
+using System.IO;
+using System.Text;
+using System.Threading;
+using client.client;
+using log4net.Config;
+using org.apache.qpid.client;
+using org.apache.qpid.transport;
+using org.apache.qpid.transport.util;
+
+namespace WindowsClient
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+             XmlConfigurator.Configure(new FileInfo("..\\..\\log.xml"));
+            // DOMConfigurator.Configure();
+
+            Console.WriteLine("befing");
+            Client client = new Client();
+            Console.WriteLine("Client created");
+            client.connect("192.168.1.14", 5673, "test", "guest", "guest");
+            Console.WriteLine("Connection established");
+
+            ClientSession ssn = client.createSession(50000);
+            Console.WriteLine("Session created");
+            ssn.queueDeclare("queue1", null, null);
+            ssn.exchangeBind("queue1", "amq.direct", "queue1", null);
+
+
+            Object wl = new Object();
+            ssn.attachMessageListener(new MyListener(ssn, wl), "myDest");
+
+            ssn.messageSubscribe("queue1", "myDest", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED, null,
+                                 0, null);
+            DateTime start = DateTime.Now;
+
+            // issue credits     
+            ssn.messageSetFlowMode("myDest", MessageFlowMode.WINDOW);
+            ssn.messageFlow("myDest", MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
+            ssn.messageFlow("myDest", MessageCreditUnit.MESSAGE, 10000);
+            ssn.sync();
+
+            for (int i = 0; i < 10000; i ++)
+            {            
+            ssn.messageTransfer("amq.direct", MessageAcceptMode.NONE, MessageAcquireMode.PRE_ACQUIRED,
+                                new Header(new DeliveryProperties().setRoutingKey("queue1"),
+                                           new MessageProperties().setMessageId(UUID.randomUUID())),
+                                Encoding.UTF8.GetBytes("test: " + i));
+            }
+
+            lock(wl)
+            {
+                Monitor.Wait(wl);
+            }
+            DateTime now = DateTime.Now;
+            Console.WriteLine("Start time " + start + " now: " + now);
+
+            Console.WriteLine("Done time: " +  (now - start));
+            lock (wl)
+            {
+                Monitor.Wait(wl, 30000);
+            }
+            client.close();
+        }
+    }
+
+    class MyListener : MessageListener
+    {
+        private readonly Object _wl;
+        private ClientSession _session;
+        private int _count;
+
+        public MyListener(ClientSession session, object wl)
+        {
+            _wl = wl;
+            _session = session;
+            _count = 0;
+        }
+
+        public void messageTransfer(MessageTransfer m)
+        {
+            BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
+            byte[] body = new byte[m.Body.Length - m.Body.Position];
+            reader.Read(body, 0, body.Length);
+            ASCIIEncoding enc = new ASCIIEncoding();
+        //   Console.WriteLine("Got a message: " + enc.GetString(body) + " count = " + _count);           
+            _count++;
+            if (_count == 10000)
+            {
+                lock (_wl)
+                {
+                    Monitor.PulseAll(_wl);
+                }
+            }
+        }
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,33 @@
+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 Demo")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Software Foundation")]
+[assembly: AssemblyProduct("Qpid Demo")]
+[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("434bc34e-b59b-4800-87cf-c2d301cb5082")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Resources.Designer.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Resources.Designer.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Resources.Designer.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Resources.Designer.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.1433
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace demo.Properties
+{
+
+
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("demo.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Resources.resx
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Resources.resx?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Resources.resx (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Resources.resx Mon Sep  8 04:46:01 2008
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Settings.Designer.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Settings.Designer.cs?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Settings.Designer.cs (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Settings.Designer.cs Mon Sep  8 04:46:01 2008
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.1433
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace demo.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Settings.settings
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Settings.settings?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Settings.settings (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/demo/Properties/Settings.settings Mon Sep  8 04:46:01 2008
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Composite.tpl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Composite.tpl?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Composite.tpl (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Composite.tpl Mon Sep  8 04:46:01 2008
@@ -0,0 +1,273 @@
+using System;
+using org.apache.qpid.transport.codec;
+using System.Collections.Generic;
+using org.apache.qpid.transport.util;
+using org.apache.qpid.transport.network;
+using System.IO;
+
+namespace org.apache.qpid.transport
+{
+
+${
+from genutil import *
+
+cls = klass(type)["@name"]
+
+segments = type["segments"]
+
+if type.name in ("control", "command"):
+  override = "override"
+  base = "Method"
+  size = 0
+  pack = 2
+  if segments:
+    payload = "true"
+  else:
+    payload = "false"
+  if type.name == "control" and cls == "connection":
+    track = "Frame.L1"
+  elif cls == "session" and type["@name"] in ("attach", "attached", "detach", "detached"):
+    track = "Frame.L2"
+  elif type.name == "command":
+    track = "Frame.L4"
+  else:
+    track = "Frame.L3"
+else:  
+  override = ""
+  base = "Struct"
+  size = type["@size"]
+  pack = num(type["@pack"])
+  payload = "false"
+  track = "4"
+
+PACK_TYPES = {
+  1: "byte",
+  2: "int",
+  4: "int"
+}
+
+typecode = code(type)
+}
+
+public sealed class $name : $base {
+
+    public const int TYPE = $typecode;
+
+    public override int getStructType() {
+        return TYPE;
+    }
+
+    public override int getSizeWidth() {
+        return $size;
+    }
+
+    public override int getPackWidth() {
+        return $pack;
+    }
+
+    public $override bool hasPayload() {
+        return $payload;
+    }
+
+    public $override byte EncodedTrack 
+    {
+       get{ return $track; }
+       set { throw new NotImplementedException(); }
+    }
+
+${
+from dotnetgenutil import *
+if pack > 0:
+  out("    private $(PACK_TYPES[pack]) packing_flags = 0;\n");
+
+fields = get_fields(type)
+params = get_dotnetparameters(type, fields)
+options = get_options(fields)
+
+for f in fields:
+  if not f.empty:
+    out("    private $(f.type) _$(f.name);\n")
+
+if segments:
+  out("    private Header _header;\n")
+  out("    private MemoryStream _body;\n")
+}
+
+${
+if fields:
+  out("    public $name() {}\n")
+}
+
+    public $name($(", ".join(params))) {
+${
+for f in fields:
+  if f.option: continue 
+  out("        $(f.set)($(f.name));\n")
+
+if segments:
+  out("        Header = header;\n")
+  out("        Body = body;\n")
+
+if options or base == "Method":
+  out("""
+        for (int i=0; i < _options.Length; i++) {
+            switch (_options[i]) {
+""")
+
+  for f in options:
+    out("            case Option.$(f.option): packing_flags |= $(f.flag_mask(pack)); break;\n")
+
+  if base == "Method":
+    out("""            case Option.SYNC: Sync = true; break;
+            case Option.BATCH: Batch = true; break;
+""")
+  out("""            case Option.NONE: break;
+            default: throw new Exception("invalid option: " + _options[i]);
+            }
+        }
+""")
+}
+    }
+
+    public $override void dispatch<C>(C context, MethodDelegate<C> mdelegate) {
+        mdelegate.$(dromedary(name))(context, this);
+    }
+
+${
+for f in fields:
+  if pack > 0:
+    out("""
+    public  bool $(f.has)() {
+        return (packing_flags & $(f.flag_mask(pack))) != 0;
+    }
+
+    public  $name $(f.clear)() {
+        packing_flags = (byte) (packing_flags & ~$(f.flag_mask(pack)));       
+${
+if (not f.empty and not (f.default == "null")):
+  out("        _$(f.name) =  $(f.default);")
+}
+        Dirty = true;
+        return this;
+    }
+""")
+
+  out("""
+    public  $(f.type) $(f.get)() {
+${
+if f.empty:
+  out("        return $(f.has)();")
+else:
+  out("        return _$(f.name);")
+}
+    }
+
+    public  $name $(f.set)($(f.type) value) {
+${
+if not f.empty:
+  out("        _$(f.name) = value;")
+}
+${
+if pack > 0:
+  out("        packing_flags |=  $(f.flag_mask(pack));")
+}
+        Dirty = true;
+        return this;
+    }
+
+    public  $name $(f.name)($(f.type) value) {
+        return $(f.set)(value);
+    }
+""")
+}
+
+${
+if segments:
+    out("""    public  Header Header {
+        get { return _header;}
+        set { _header = value;}
+	      }
+	      
+    public  $name header(Header header) {
+        Header = header;
+        return this;
+    }
+
+    public  MemoryStream Body
+    {
+       get{ return _body;}
+       set{ _body = value;}
+    }
+
+    public  $name body(MemoryStream body)
+    {
+        Body = body;
+        return this;
+    }
+""")
+}
+
+    public override void write(Encoder enc)
+    {
+${
+if pack > 0:
+  out("        enc.writeUint%s(packing_flags);\n" % (pack*8));
+
+for f in fields:
+  if f.empty:
+    continue
+  if pack > 0:
+    out("        if ((packing_flags & $(f.flag_mask(pack))) != 0)\n    ")
+  pre = ""
+  post = ""
+  if f.type_node.name == "struct":
+    pre = "%s.TYPE, " % cname(f.type_node)
+  elif f.type_node.name == "domain":
+    post = ""
+    pre = "(short)"
+  out("        enc.write$(f.coder)($(pre)_$(f.name)$(post));\n")
+}
+    }
+
+    public override void read(Decoder dec)
+    {
+${
+if pack > 0:
+   out("        packing_flags = ($(PACK_TYPES[pack])) dec.readUint%s();\n" % (pack*8));
+
+for f in fields:
+  if f.empty:
+    continue
+  if pack > 0:
+    out("        if ((packing_flags & $(f.flag_mask(pack))) != 0)\n    ")
+  pre = ""
+  post = ""
+  arg = ""
+  if f.type_node.name == "struct":
+    pre = "(%s)" % cname(f.type_node)
+    arg = "%s.TYPE" % cname(f.type_node)
+  elif f.type_node.name == "domain":
+    pre = "%sGetter.get(" % cname(f.type_node)
+    post = ")"
+  out("        _$(f.name) = $(pre)dec.read$(f.coder)($(arg))$(post);\n")
+}
+    }
+
+    public override Dictionary<String,Object> Fields
+    {
+    get{
+        Dictionary<String,Object> result = new Dictionary<String,Object>();
+
+${
+for f in fields:
+  if pack > 0:
+    out("        if ((packing_flags & $(f.flag_mask(pack))) != 0)\n    ")
+  out('        result.Add("_$(f.name)", $(f.get)());\n')
+}
+
+        return result;
+        }
+    }
+
+}
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Composite.tpl.bak
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Composite.tpl.bak?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Composite.tpl.bak (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Composite.tpl.bak Mon Sep  8 04:46:01 2008
@@ -0,0 +1,273 @@
+using System;
+using org.apache.qpid.transport.codec;
+using System.Collections.Generic;
+using org.apache.qpid.transport.util;
+using org.apache.qpid.transport.network;
+using System.IO;
+
+namespace org.apache.qpid.transport
+{
+
+${
+from genutil import *
+
+cls = klass(type)["@name"]
+
+segments = type["segments"]
+
+if type.name in ("control", "command"):
+  override = "override"
+  base = "Method"
+  size = 0
+  pack = 2
+  if segments:
+    payload = "true"
+  else:
+    payload = "false"
+  if type.name == "control" and cls == "connection":
+    track = "Frame.L1"
+  elif cls == "session" and type["@name"] in ("attach", "attached", "detach", "detached"):
+    track = "Frame.L2"
+  elif type.name == "command":
+    track = "Frame.L4"
+  else:
+    track = "Frame.L3"
+else:  
+  override = ""
+  base = "Struct"
+  size = type["@size"]
+  pack = num(type["@pack"])
+  payload = "false"
+  track = "4"
+
+PACK_TYPES = {
+  1: "byte",
+  2: "short",
+  4: "int"
+}
+
+typecode = code(type)
+}
+
+public sealed class $name : $base {
+
+    public const int TYPE = $typecode;
+
+    public override int getStructType() {
+        return TYPE;
+    }
+
+    public override int getSizeWidth() {
+        return $size;
+    }
+
+    public override int getPackWidth() {
+        return $pack;
+    }
+
+    public $override bool hasPayload() {
+        return $payload;
+    }
+
+    public $override byte EncodedTrack 
+    {
+       get{ return $track; }
+       set { throw new NotImplementedException(); }
+    }
+
+${
+from dotnetgenutil import *
+if pack > 0:
+  out("    private $(PACK_TYPES[pack]) packing_flags = 0;\n");
+
+fields = get_fields(type)
+params = get_dotnetparameters(type, fields)
+options = get_options(fields)
+
+for f in fields:
+  if not f.empty:
+    out("    private $(f.type) _$(f.name);\n")
+
+if segments:
+  out("    private Header _header;\n")
+  out("    private MemoryStream _body;\n")
+}
+
+${
+if fields:
+  out("    public $name() {}\n")
+}
+
+    public $name($(", ".join(params))) {
+${
+for f in fields:
+  if f.option: continue 
+  out("        $(f.set)($(f.name));\n")
+
+if segments:
+  out("        Header = header;\n")
+  out("        Body = body;\n")
+
+if options or base == "Method":
+  out("""
+        for (int i=0; i < _options.Length; i++) {
+            switch (_options[i]) {
+""")
+
+  for f in options:
+    out("            case Option.$(f.option): packing_flags |= $(f.flag_mask(pack)); break;\n")
+
+  if base == "Method":
+    out("""            case Option.SYNC: Sync = true; break;
+            case Option.BATCH: Batch = true; break;
+""")
+  out("""            case Option.NONE: break;
+            default: throw new Exception("invalid option: " + _options[i]);
+            }
+        }
+""")
+}
+    }
+
+    public $override void dispatch<C>(C context, MethodDelegate<C> mdelegate) {
+        mdelegate.$(dromedary(name))(context, this);
+    }
+
+${
+for f in fields:
+  if pack > 0:
+    out("""
+    public  bool $(f.has)() {
+        return (packing_flags & $(f.flag_mask(pack))) != 0;
+    }
+
+    public  $name $(f.clear)() {
+        packing_flags = (byte) (packing_flags & ~$(f.flag_mask(pack)));       
+${
+if (not f.empty and not (f.default == "null")):
+  out("        _$(f.name) =  $(f.default);")
+}
+        Dirty = true;
+        return this;
+    }
+""")
+
+  out("""
+    public  $(f.type) $(f.get)() {
+${
+if f.empty:
+  out("        return $(f.has)();")
+else:
+  out("        return _$(f.name);")
+}
+    }
+
+    public  $name $(f.set)($(f.type) value) {
+${
+if not f.empty:
+  out("        _$(f.name) = value;")
+}
+${
+if pack > 0:
+  out("        packing_flags |=  $(f.flag_mask(pack));")
+}
+        Dirty = true;
+        return this;
+    }
+
+    public  $name $(f.name)($(f.type) value) {
+        return $(f.set)(value);
+    }
+""")
+}
+
+${
+if segments:
+    out("""    public  Header Header {
+        get { return _header;}
+        set { _header = value;}
+	      }
+	      
+    public  $name header(Header header) {
+        Header = header;
+        return this;
+    }
+
+    public  MemoryStream Body
+    {
+       get{ return _body;}
+       set{ _body = value;}
+    }
+
+    public  $name body(MemoryStream body)
+    {
+        Body = body;
+        return this;
+    }
+""")
+}
+
+    public override void write(Encoder enc)
+    {
+${
+if pack > 0:
+  out("        enc.writeUint%s(packing_flags);\n" % (pack*8));
+
+for f in fields:
+  if f.empty:
+    continue
+  if pack > 0:
+    out("        if ((packing_flags & $(f.flag_mask(pack))) != 0)\n    ")
+  pre = ""
+  post = ""
+  if f.type_node.name == "struct":
+    pre = "%s.TYPE, " % cname(f.type_node)
+  elif f.type_node.name == "domain":
+    post = ""
+    pre = "(short)"
+  out("        enc.write$(f.coder)($(pre)_$(f.name)$(post));\n")
+}
+    }
+
+    public override void read(Decoder dec)
+    {
+${
+if pack > 0:
+   out("        packing_flags = ($(PACK_TYPES[pack])) dec.readUint%s();\n" % (pack*8));
+
+for f in fields:
+  if f.empty:
+    continue
+  if pack > 0:
+    out("        if ((packing_flags & $(f.flag_mask(pack))) != 0)\n    ")
+  pre = ""
+  post = ""
+  arg = ""
+  if f.type_node.name == "struct":
+    pre = "(%s)" % cname(f.type_node)
+    arg = "%s.TYPE" % cname(f.type_node)
+  elif f.type_node.name == "domain":
+    pre = "%sGetter.get(" % cname(f.type_node)
+    post = ")"
+  out("        _$(f.name) = $(pre)dec.read$(f.coder)($(arg))$(post);\n")
+}
+    }
+
+    public override Dictionary<String,Object> Fields
+    {
+    get{
+        Dictionary<String,Object> result = new Dictionary<String,Object>();
+
+${
+for f in fields:
+  if pack > 0:
+    out("        if ((packing_flags & $(f.flag_mask(pack))) != 0)\n    ")
+  out('        result.Add("_$(f.name)", $(f.get)());\n')
+}
+
+        return result;
+        }
+    }
+
+}
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Constant.tpl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Constant.tpl?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Constant.tpl (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Constant.tpl Mon Sep  8 04:46:01 2008
@@ -0,0 +1,16 @@
+namespace org.apache.qpid.transport
+{
+
+${from genutil import *}
+
+public class Constant
+{
+${
+constants = spec.query["amqp/constant"]
+
+for c in constants:
+  name = scream(c["@name"])
+  value = c["@value"]
+  out("    public const int $name = $value;\n")
+}}
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Enum.tpl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Enum.tpl?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Enum.tpl (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Enum.tpl Mon Sep  8 04:46:01 2008
@@ -0,0 +1,38 @@
+using System;
+namespace org.apache.qpid.transport
+{
+${
+from genutil import *
+
+vtype = jtype(resolve_type(type))
+
+out("   public enum $name : $vtype")
+
+choices = [(scream(ch["@name"]), "= %s" % (ch["@value"]))
+           for ch in type.query["enum/choice"]]
+}
+   {
+    $(",\n    ".join(["%s%s" % ch for ch in choices]))
+    }
+
+${
+
+out("   public struct $name")
+out("Getter")
+}
+   {
+    public static $name get($vtype value)
+    {
+        switch (value)
+        {
+${
+choices = [(scream(ch["@name"]), "%s" % (ch["@value"]))
+           for ch in type.query["enum/choice"]]
+
+for ch, value in choices:
+  out('          case $value: return $name.$ch;\n')
+}        default: throw new Exception("no such value: " + value);
+        }
+    }
+ }
+}

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Invoker.tpl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Invoker.tpl?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Invoker.tpl (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Invoker.tpl Mon Sep  8 04:46:01 2008
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using common.org.apache.qpid.transport.util;
+
+namespace org.apache.qpid.transport
+{
+
+public abstract class Invoker {
+
+    protected abstract void invoke(Method method);
+    public abstract Future<T> invoke<T>(Method method, Future<T> resultClass);
+
+${
+from dotnetgenutil import *
+
+for c in composites:
+  name = cname(c)
+  fields = get_fields(c)
+  params = get_dotnetparameters(c, fields)
+  args = get_arguments(c, fields)
+  result = c["result"]
+  if result:
+    if not result["@type"]:
+      rname = cname(result["struct"])
+    else:
+      rname = cname(result, "@type")
+    jresult = "Future<%s>" % rname
+    jreturn = "return "
+    jclass = ", new ResultFuture<%s>()" % rname
+    jinvoke = "invoke"
+  else:
+    jinvoke = "invoke"
+    jresult = "void"
+    jreturn = ""
+    jclass = ""
+
+  out("""
+    public $jresult $(dromedary(name))($(", ".join(params))) {
+        $(jreturn)$jinvoke(new $name($(", ".join(args)))$jclass);
+    }
+""")
+}
+
+}
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/MethodDelegate.tpl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/MethodDelegate.tpl?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/MethodDelegate.tpl (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/MethodDelegate.tpl Mon Sep  8 04:46:01 2008
@@ -0,0 +1,14 @@
+namespace org.apache.qpid.transport
+{
+
+public abstract class MethodDelegate<C> {
+
+${
+from genutil import *
+
+for c in composites:
+  name = cname(c)
+  out("    public virtual void $(dromedary(name))(C context, $name mystruct) {}\n")
+}
+}
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/MethodDelegate.tpl.bak
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/MethodDelegate.tpl.bak?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/MethodDelegate.tpl.bak (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/MethodDelegate.tpl.bak Mon Sep  8 04:46:01 2008
@@ -0,0 +1,14 @@
+namespace org.apache.qpid.transport
+{
+
+public abstract class MethodDelegate<C> {
+
+${
+from genutil import *
+
+for c in composites:
+  name = cname(c)
+  out("    public void $(dromedary(name))(C context, $name mystruct) {}\n")
+}
+}
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Option.tpl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Option.tpl?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Option.tpl (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Option.tpl Mon Sep  8 04:46:01 2008
@@ -0,0 +1,21 @@
+namespace org.apache.qpid.transport
+{
+public enum Option {
+
+${
+from genutil import *
+
+options = {}
+
+for c in composites:
+  for f in c.query["field"]:
+    t = resolve_type(f)
+    if t["@name"] == "bit":
+      option = scream(f["@name"])
+      if not options.has_key(option):
+        options[option] = None
+        out("    $option,\n")}
+    BATCH,
+    NONE
+}
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/StructFactory.tpl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/StructFactory.tpl?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/StructFactory.tpl (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/StructFactory.tpl Mon Sep  8 04:46:01 2008
@@ -0,0 +1,43 @@
+using System;
+
+namespace  org.apache.qpid.transport
+{
+
+class StructFactory {
+
+    public static Struct create(int type)
+    {
+        switch (type)
+        {
+${
+from genutil import *
+
+fragment = """        case $name.TYPE:
+            return new $name();
+"""
+
+for c in composites:
+  name = cname(c)
+  if c.name == "struct":
+    out(fragment)
+}        default:
+            throw new Exception("type: " + type);
+        }
+    }
+
+    public static Struct createInstruction(int type)
+    {
+        switch (type)
+        {
+${
+for c in composites:
+  name = cname(c)
+  if c.name in ("command", "control"):
+    out(fragment)
+}        default:
+            throw new Exception("type: " + type);
+        }
+    }
+
+}
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Type.tpl
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Type.tpl?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Type.tpl (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/Type.tpl Mon Sep  8 04:46:01 2008
@@ -0,0 +1,82 @@
+using System;
+
+namespace org.apache.qpid.transport
+{
+
+${from genutil import *}
+
+public struct QpidType
+{
+    public Code code;
+    public int width;
+    public bool isfixed;
+
+    public Code Code
+    {
+        get { return code; }
+        set { code = value; }
+    }
+    
+    public int Width
+    {
+        get { return width; }
+        set { width = value; }
+    }
+    
+    public bool Fixed
+    {
+        get { return isfixed; }
+        set { isfixed = value; }
+    }
+    
+    QpidType(Code code, int width, bool isfixed)
+    {
+        this.code = code;
+        this.width = width;
+        this.isfixed = isfixed;
+    }
+    
+    public static QpidType get(byte code)
+    {
+        switch (code)
+        {      	
+${
+types = spec.query["amqp/type"] + spec.query["amqp/class/type"]
+codes = {}
+first = True
+for t in types:
+  code = t["@code"]
+  fix_width = t["@fixed-width"]
+  var_width = t["@variable-width"]
+
+  if code is None:
+    continue
+
+  if fix_width is None:
+    width = var_width
+    fixed = "false"
+  else:
+    width = fix_width
+    fixed = "true"
+
+  name = scream(t["@name"])
+  codes[code] = name
+  
+  out("          case $code : return new QpidType(Code.$name, $width, $fixed);\n")
+}
+          default: throw new Exception("unknown code: " + code);
+        }
+    }
+}
+
+public enum Code : byte
+   {    
+${
+keys = list(codes.keys())
+keys.sort()
+
+for code in keys:
+  out("   $(codes[code]) = $code,\n")
+}
+   }
+}
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/build.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/build.xml?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/build.xml (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/build.xml Mon Sep  8 04:46:01 2008
@@ -0,0 +1,52 @@
+<!--
+ -
+ - 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.
+ -
+ -->
+<project name="GenTool" default="build">
+
+  <property name="generated.dir" location="../client/" />
+  <property name="gentools.timestamp" location="${generated.dir}/gentools.timestamp" />
+  <property name="jython.timestamp" location="${generated.dir}/jython.timestamp" />
+  <property name="java.basedir" location="../../../java/common" />
+  <property name="mllib.dir" location="../../../python" />
+  <property name="xml.spec.dir" location="../../../specs" />
+
+  
+  <target name="check_jython_deps">
+    <uptodate property="jython.notRequired" targetfile="${jython.timestamp}">
+      <srcfiles dir="${xml.spec.dir}" includes="amqp.0-10-qpid-errata.xml" />
+    </uptodate>
+  </target>
+
+   <target name="build" depends="check_jython_deps" unless="jython.notRequired">
+    <java classname="org.python.util.jython" fork="true" failonerror="true">
+      <arg value="-Dpython.cachedir.skip=true"/>
+      <arg value="-Dpython.path=${java.basedir}/jython-lib.jar/Lib${path.separator}${mllib.dir}${path.separator}${java.basedir}${path.separator}${basedir}"/>
+      <arg value="${basedir}/codegen"/>
+      <arg value="${generated.dir}"/>
+      <arg value="${xml.spec.dir}/amqp.0-10-qpid-errata.xml"/>
+      <arg value="${basedir}"/>
+      <classpath>
+        <pathelement location="${java.basedir}/jython-2.2-rc2.jar"/>
+      </classpath>
+    </java>
+    <touch file="${jython.timestamp}" />
+  </target>
+
+</project>

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/build.xml.bak
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/build.xml.bak?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/build.xml.bak (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/build.xml.bak Mon Sep  8 04:46:01 2008
@@ -0,0 +1,52 @@
+<!--
+ -
+ - 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.
+ -
+ -->
+<project name="GenTool" default="build">
+
+  <property name="generated.dir" location="../client/generated" />
+  <property name="gentools.timestamp" location="${generated.dir}/gentools.timestamp" />
+  <property name="jython.timestamp" location="${generated.dir}/jython.timestamp" />
+  <property name="java.basedir" location="../../../java/common" />
+  <property name="mllib.dir" location="../../../python" />
+  <property name="xml.spec.dir" location="../../../specs" />
+
+  
+  <target name="check_jython_deps">
+    <uptodate property="jython.notRequired" targetfile="${jython.timestamp}">
+      <srcfiles dir="${xml.spec.dir}" includes="amqp.0-10-qpid-errata.xml" />
+    </uptodate>
+  </target>
+
+   <target name="build" depends="check_jython_deps" unless="jython.notRequired">
+    <java classname="org.python.util.jython" fork="true" failonerror="true">
+      <arg value="-Dpython.cachedir.skip=true"/>
+      <arg value="-Dpython.path=${java.basedir}/jython-lib.jar/Lib${path.separator}${mllib.dir}${path.separator}${java.basedir}${path.separator}${basedir}"/>
+      <arg value="${basedir}/codegen"/>
+      <arg value="${generated.dir}"/>
+      <arg value="${xml.spec.dir}/amqp.0-10-qpid-errata.xml"/>
+      <arg value="${basedir}"/>
+      <classpath>
+        <pathelement location="${java.basedir}/jython-2.2-rc2.jar"/>
+      </classpath>
+    </java>
+    <touch file="${jython.timestamp}" />
+  </target>
+
+</project>

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/codegen
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/codegen?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/codegen (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/codegen Mon Sep  8 04:46:01 2008
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+
+import os, sys, mllib
+from templating import Parser
+from dotnetgenutil import *
+
+out_dir = sys.argv[1]
+spec_file = sys.argv[2]
+tpl_dir = sys.argv[3]
+pkg_dir = os.path.join(out_dir, "generated")
+
+if not os.path.exists(pkg_dir):
+  os.makedirs(pkg_dir)
+
+spec = mllib.xml_parse(spec_file)
+
+def excludes(nd):
+  if (nd.parent is not None and
+      nd.parent.name == "class" and
+      nd.parent["@name"] in ("file", "stream")):
+    return False
+  else:
+    return True
+
+def execute(output, template, **kwargs):
+  f = open(os.path.join(tpl_dir, template))
+  input = f.read()
+  f.close()
+  p = Parser(**kwargs)
+  p.parse(input)
+  fname = os.path.join(pkg_dir, output)
+  f = open(fname, "w")
+  f.write(p.output)
+  f.close()
+
+execute("Type.cs", "Type.tpl", spec = spec)
+execute("Constant.cs", "Constant.tpl", spec = spec)
+
+structs = spec.query["amqp/struct"] + \
+    spec.query["amqp/class/struct", excludes] + \
+    spec.query["amqp/class/command/result/struct", excludes]
+controls = spec.query["amqp/class/control", excludes]
+commands = spec.query["amqp/class/command", excludes]
+
+composites = structs + controls + commands
+
+for c in composites:
+  name = cname(c)
+  execute("%s.cs" % name, "Composite.tpl", type = c, name = name)
+
+execute("MethodDelegate.cs", "MethodDelegate.tpl", composites = composites)
+execute("Option.cs", "Option.tpl", composites = composites)
+execute("Invoker.cs", "Invoker.tpl", composites = controls + commands)
+execute("StructFactory.cs", "StructFactory.tpl", composites = composites)
+
+def is_enum(nd):
+  return nd["enum"] is not None
+
+enums = spec.query["amqp/domain", is_enum] + \
+    spec.query["amqp/class/domain", is_enum]
+
+for e in enums:
+  name = cname(e)
+  execute("%s.cs" % name, "Enum.tpl", name = name, type = e)
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/dotnetgenutil$py.class
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/dotnetgenutil%24py.class?rev=693060&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/dotnetgenutil$py.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/qpid/trunk/qpid/dotnet/client-010/gentool/dotnetgenutil.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/gentool/dotnetgenutil.py?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/gentool/dotnetgenutil.py (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/gentool/dotnetgenutil.py Mon Sep  8 04:46:01 2008
@@ -0,0 +1,252 @@
+
+def camel(offset, *args):
+  parts = []
+  for a in args:
+    parts.extend(a.split("-"))
+  return "".join(parts[:offset] + [p[0].upper() + p[1:] for p in parts[offset:]])
+
+def dromedary(s):
+  return s[0].lower() + s[1:]
+
+def scream(*args):
+  return "_".join([a.replace("-", "_").upper() for a in args])
+
+def num(x, default=None):
+  if x is not None and x != "":
+    return int(x, 0)
+  else:
+    return default
+
+def klass(nd):
+  parent = nd.parent
+  while parent is not None:
+    if hasattr(parent, "name") and parent.name == "class":
+      return parent
+    parent = parent.parent
+
+untyped = -1
+
+def code(nd):
+  global untyped
+  cd = num(nd["@code"])
+  if cd is None:
+    cd = untyped
+    untyped -= 1
+    return cd
+
+  cls = klass(nd)
+  if cls:
+    cd |= (num(cls["@code"]) << 8)
+  return cd
+
+def root(nd):
+  if nd.parent is None:
+    return nd
+  else:
+    return root(nd.parent)
+
+def qname(nd):
+  name = nd["@name"]
+  cls = klass(nd)
+  if cls != None:
+    return "%s.%s" % (cls["@name"], name)
+  else:
+    return name
+
+RESOLVED = {}
+
+def resolve(node, name):
+  key = (node, name)
+  if RESOLVED.has_key(key):
+    return RESOLVED[key]
+  else:
+    spec = root(node)
+    cls = klass(node)
+    if cls:
+      for nd in cls.query["#tag"]:
+        if nd["@name"] == name:
+          RESOLVED[key] = nd
+          return nd
+    for nd in spec.query["amqp/#tag"] + spec.query["amqp/class/#tag"]:
+      if name == qname(nd):
+        RESOLVED[key] = nd
+        return nd
+    raise Exception("unresolved name: %s" % name)
+
+def resolve_type(nd):
+  if hasattr(nd, "_resolved_type"):
+    return nd._resolved_type
+  else:
+    name = nd["@type"]
+    type = resolve(nd, name)
+    if type.name == "domain" and not type["enum"]:
+      type = resolve_type(type)
+    nd._resolved_type = type
+    return type
+
+TYPES = {
+  "bit": "bool",
+  "uint8": "short",
+  "uint16": "int",
+  "uint32": "long",
+  "uint64": "long",
+  "datetime": "long",
+  "uuid": "UUID",
+  "sequence-no": "int",
+  "sequence-set": "RangeSet", # XXX
+  "byte-ranges": "RangeSet", # XXX
+  "str8": "String",
+  "str16": "String",
+  "vbin8": "byte[]",
+  "vbin16": "byte[]",
+  "vbin32": "byte[]",
+  "struct32": "Struct",
+  "map": "Dictionary<String,Object>",
+  "array": "List<Object>"
+  }
+
+def cname(nd, field="@name"):
+  cls = klass(nd)
+  if cls:
+    if (nd.name in ("struct", "result") and
+        cls["@name"] != "session" and
+        nd[field] != "header"):
+      return camel(0, nd[field])
+    else:
+      return camel(0, cls["@name"], nd[field])
+  else:
+    return camel(0, nd[field])
+
+def jtype(nd):
+  if nd.name == "struct" or nd["enum"]:
+    return cname(nd)
+  else:
+    return TYPES[nd["@name"]]
+
+REFS = {
+  "bool": "Boolean",
+  "byte": "Byte",
+  "short": "Short",
+  "int": "Integer",
+  "long": "Long",
+  "float": "Float",
+  "double": "Double",
+  "char": "Character"
+}
+
+def jref(jt):
+  return REFS.get(jt, jt)
+
+def jclass(jt):
+  idx = jt.find('<')
+  if idx > 0:
+    return jt[:idx]
+  else:
+    return jt
+
+DEFAULTS = {
+  "long": 0,
+  "int": 0,
+  "short": 0,
+  "byte": 0,
+  "char": 0,
+  "bool": "false"
+  }
+
+class Field:
+
+  def __init__(self, index, nd):
+    self.index = index
+    self.name = camel(1, nd["@name"])
+    self.type_node = resolve_type(nd)
+    if self.type_node.name == "domain":
+      self.prim_type = resolve_type(self.type_node)
+    else:
+      self.prim_type = self.type_node
+    self.variable_width = num(self.prim_type["@variable-width"], 0)
+    self.fixed_width = num(self.prim_type["@fixed-width"], 0)
+    self.empty = self.variable_width == 0 and self.fixed_width == 0 and self.prim_type.name != "struct"
+    tname = cname(self.type_node)
+    if self.type_node.name == "struct":
+      self.read = "(%s) dec.readStruct(%s.TYPE)" % (tname, tname)
+      self.write = "enc.writeStruct(%s.TYPE, check(struct).%s)" % (tname, self.name)
+      self.coder = "Struct"
+    elif self.type_node.name == "domain":
+      self.coder = camel(0, self.prim_type["@name"])
+      self.read = "%s.get(dec.read%s())" % (tname, self.coder)
+      self.write = "enc.write%s(check(struct).%s.getValue())" % (self.coder, self.name)
+    else:
+      self.coder = camel(0, self.type_node["@name"])
+      self.read = "dec.read%s()" % self.coder
+      self.write = "enc.write%s(check(struct).%s)" % (self.coder, self.name)
+    self.type = jtype(self.type_node)
+    self.default = DEFAULTS.get(self.type, "null")
+    self.has = camel(1, "has", self.name)
+    self.get = camel(1, "get", self.name)
+    self.set = camel(1, "set", self.name)
+    self.clear = camel(1, "clear", self.name)
+    if self.type == "bool":
+      self.option = scream(nd["@name"])
+    else:
+      self.option = None
+
+  def flag_mask(self, pack):
+    flag = pack * 8 - 8 - (self.index/8)*8 + (self.index % 8)
+    return 1 << flag
+
+
+def get_fields(nd):
+  fields = []
+  index = 0
+  for f in nd.query["field"]:
+    fields.append(Field(index, f))
+    index += 1
+  return fields
+
+def get_parameters(type, fields):
+  params = []
+  options = False
+  for f in fields:
+    if f.option:
+      options = True
+    else:
+      params.append("%s %s" % (f.type, f.name))
+  if type["segments"]:
+    params.append("Header header")
+    params.append("MemoryStream body")
+  if options or type.name in ("control", "command"):
+    params.append("Option ... _options")
+  return params
+
+def get_arguments(type, fields):
+  args = []
+  options = False
+  for f in fields:
+    if f.option:
+      options = True
+    else:
+      args.append(f.name)
+  if type["segments"]:
+    args.append("header")
+    args.append("body")
+  if options or type.name in ("control", "command"):
+    args.append("_options")
+  return args
+
+def get_options(fields):
+  return [f for f in fields if f.option]
+
+def get_dotnetparameters(type, fields):
+  params = []
+  options = False
+  for f in fields:
+    if f.option:
+      options = True
+    else:
+      params.append("%s %s" % (f.type, f.name))
+  if type["segments"]:
+    params.append("Header header")
+    params.append("MemoryStream body")
+  if options or type.name in ("control", "command"):
+    params.append("params Option[] _options")
+  return params
\ No newline at end of file

Added: incubator/qpid/trunk/qpid/dotnet/client-010/lib/log4net/log4net-licence.txt
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/client-010/lib/log4net/log4net-licence.txt?rev=693060&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/client-010/lib/log4net/log4net-licence.txt (added)
+++ incubator/qpid/trunk/qpid/dotnet/client-010/lib/log4net/log4net-licence.txt Mon Sep  8 04:46:01 2008
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.

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

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