From 7d4317b2ff39b61f529a2e7c187238c1370cae5c Mon Sep 17 00:00:00 2001 From: Arnaud Simon Date: Mon, 8 Sep 2008 16:09:49 +0000 Subject: Qpid-1277: added nant support git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@693146 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/dotnet/client-010/README.txt | 64 +++++++ .../client-010/client/Properties/AssemblyInfo.cs | 8 +- qpid/dotnet/client-010/client/client/Client.cs | 1 - qpid/dotnet/client-010/client/default.build | 25 +++ qpid/dotnet/client-010/client/transport/Binding.cs | 2 +- qpid/dotnet/client-010/client/transport/Method.cs | 2 +- qpid/dotnet/client-010/client/transport/Struct.cs | 2 +- .../client/transport/codec/AbstractEncoder.cs | 13 +- qpid/dotnet/client-010/default.build | 201 +++++++++++++++++++++ qpid/dotnet/client-010/demo/Demo.csproj | 6 - qpid/dotnet/client-010/demo/Form1.Designer.cs | 39 ---- qpid/dotnet/client-010/demo/Form1.cs | 18 -- qpid/dotnet/client-010/demo/Program.cs | 4 +- .../client-010/demo/Properties/AssemblyInfo.cs | 8 +- qpid/dotnet/client-010/demo/default.build | 26 +++ .../client-010/test/Properties/AssemblyInfo.cs | 8 +- qpid/dotnet/client-010/test/default.build | 34 ++++ 17 files changed, 373 insertions(+), 88 deletions(-) create mode 100644 qpid/dotnet/client-010/README.txt create mode 100644 qpid/dotnet/client-010/client/default.build create mode 100644 qpid/dotnet/client-010/default.build delete mode 100644 qpid/dotnet/client-010/demo/Form1.Designer.cs delete mode 100644 qpid/dotnet/client-010/demo/Form1.cs create mode 100644 qpid/dotnet/client-010/demo/default.build create mode 100644 qpid/dotnet/client-010/test/default.build diff --git a/qpid/dotnet/client-010/README.txt b/qpid/dotnet/client-010/README.txt new file mode 100644 index 0000000000..bffa156df5 --- /dev/null +++ b/qpid/dotnet/client-010/README.txt @@ -0,0 +1,64 @@ +Info +==== + +AMQP version currently 0.10 + + +Setup +===== + +Install: + Microsoft Visual Studio 2005 (VS2005) + NAnt 0.85 - only required for builds outside VS2005 (.net 1.1, .net 2.0, mono 2.0) + Ant 1.6.5 + Cygwin (or alternatively build via cmd but alter instructions below accordingly) + +Set up PATH to include Nant.exe: + + $ PATH=/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727:$PATH + +Set up PATH to include ant: + + $ PATH=$ANT_HOME/bin:$PATH + + +Building +======== + +Generate code from /dotnet/client-010/gentool: + + $ cd /dotnet/client-010/gentool + $ ant + +You can build from Visual Studio 2005 normally. Alternatively, you +can build debug releases for any supported framework from the +command line using Nant: + +To build .NET 2.0 executables (to bin/net-2.0): + + $ cd /dotnet/client-010/ + $ nant + + +To build for Mono on Linux (to bin/mono-2.0): + + $ cd /dotnet/client-010/ + $ nant -t:mono-2.0 + +Releasing +========= + +For .NET 2.0 + + $ cd /dotnet/client-010/ + $ nant release-pkg + +Generates ./bin/net-2.0/release/Qpid.NET-net-2.0-yyyyMMdd.zip + +For Mono + + $ cd /dotnet/client-010/ + $ nant -t:mono-2.0 release-pkg + +Generates ./bin/mono-2.0/release/Qpid.NET-mono-2.0-yyyyMMdd.zip + diff --git a/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs index e1804b779a..96a79040af 100644 --- a/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs +++ b/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -6,11 +6,11 @@ using System.Runtime.InteropServices; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Qpid Client")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("Built from svn revision number: ")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Apache Software Foundation")] [assembly: AssemblyProduct("Qpid Client")] -[assembly: AssemblyCopyright("Copyright © Apache Software Foundation 2008")] +[assembly: AssemblyCopyright("Apache Software Foundation")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // 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: AssemblyVersion("0.10.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/qpid/dotnet/client-010/client/client/Client.cs b/qpid/dotnet/client-010/client/client/Client.cs index 646192c25d..6759c6dbdc 100644 --- a/qpid/dotnet/client-010/client/client/Client.cs +++ b/qpid/dotnet/client-010/client/client/Client.cs @@ -28,7 +28,6 @@ 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; diff --git a/qpid/dotnet/client-010/client/default.build b/qpid/dotnet/client-010/client/default.build new file mode 100644 index 0000000000..16b1532af9 --- /dev/null +++ b/qpid/dotnet/client-010/client/default.build @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + diff --git a/qpid/dotnet/client-010/client/transport/Binding.cs b/qpid/dotnet/client-010/client/transport/Binding.cs index 25884fc772..e07e85990d 100644 --- a/qpid/dotnet/client-010/client/transport/Binding.cs +++ b/qpid/dotnet/client-010/client/transport/Binding.cs @@ -29,6 +29,6 @@ namespace org.apache.qpid.transport { E endpoint(Sender sender); - Receiver receiver(E endpoint) where T : EventArgs; + Receiver receiver(E endpoint) where R : EventArgs; } } \ No newline at end of file diff --git a/qpid/dotnet/client-010/client/transport/Method.cs b/qpid/dotnet/client-010/client/transport/Method.cs index 0f9a84d778..c15343ba73 100644 --- a/qpid/dotnet/client-010/client/transport/Method.cs +++ b/qpid/dotnet/client-010/client/transport/Method.cs @@ -30,7 +30,7 @@ namespace org.apache.qpid.transport /// public abstract class Method : Struct, ProtocolEvent { - public static Method create(int type) + public new static Method create(int type) { return (Method) StructFactory.createInstruction(type); } diff --git a/qpid/dotnet/client-010/client/transport/Struct.cs b/qpid/dotnet/client-010/client/transport/Struct.cs index 718dcbc978..fead22268b 100644 --- a/qpid/dotnet/client-010/client/transport/Struct.cs +++ b/qpid/dotnet/client-010/client/transport/Struct.cs @@ -32,7 +32,7 @@ namespace org.apache.qpid.transport public abstract class Struct : Encodable { - public static Struct create(int type) + public static Struct create(int type) { return StructFactory.create(type); } diff --git a/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs b/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs index a34bd43331..f70eb17a55 100644 --- a/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs +++ b/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs @@ -281,7 +281,7 @@ namespace org.apache.qpid.transport.codec Type klass = value.GetType(); Code type = resolve(klass); - if (type == null) + if (type == Code.VOID) { throw new Exception ("unable to resolve type: " + klass + ", " + value); @@ -294,17 +294,18 @@ namespace org.apache.qpid.transport.codec private static Code resolve(Type klass) { - Code type = ENCODINGS[klass]; - if (type != null) + Code type; + if(ENCODINGS.ContainsKey(klass)) { - return type; + return ENCODINGS[klass]; } + Type sup = klass.BaseType; if (sup != null) { type = resolve(sup); - if (type != null) + if (type != Code.VOID) { return type; } @@ -312,7 +313,7 @@ namespace org.apache.qpid.transport.codec foreach (Type iface in klass.GetInterfaces()) { type = resolve(iface); - if (type != null) + if (type != Code.VOID) { return type; } diff --git a/qpid/dotnet/client-010/default.build b/qpid/dotnet/client-010/default.build new file mode 100644 index 0000000000..095b6de2e9 --- /dev/null +++ b/qpid/dotnet/client-010/default.build @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + build.svnversion = ${build.svnversion} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/qpid/dotnet/client-010/demo/Demo.csproj b/qpid/dotnet/client-010/demo/Demo.csproj index 541ee246eb..13dacc01be 100644 --- a/qpid/dotnet/client-010/demo/Demo.csproj +++ b/qpid/dotnet/client-010/demo/Demo.csproj @@ -40,12 +40,6 @@ - - Form - - - Form1.cs - diff --git a/qpid/dotnet/client-010/demo/Form1.Designer.cs b/qpid/dotnet/client-010/demo/Form1.Designer.cs deleted file mode 100644 index c6c633a823..0000000000 --- a/qpid/dotnet/client-010/demo/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace demo -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Text = "Form1"; - } - - #endregion - } -} - diff --git a/qpid/dotnet/client-010/demo/Form1.cs b/qpid/dotnet/client-010/demo/Form1.cs deleted file mode 100644 index 68a240189e..0000000000 --- a/qpid/dotnet/client-010/demo/Form1.cs +++ /dev/null @@ -1,18 +0,0 @@ -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 diff --git a/qpid/dotnet/client-010/demo/Program.cs b/qpid/dotnet/client-010/demo/Program.cs index 62730eb9b0..429fe1bf69 100644 --- a/qpid/dotnet/client-010/demo/Program.cs +++ b/qpid/dotnet/client-010/demo/Program.cs @@ -15,9 +15,7 @@ namespace WindowsClient static void Main(string[] args) { XmlConfigurator.Configure(new FileInfo("..\\..\\log.xml")); - // DOMConfigurator.Configure(); - - Console.WriteLine("befing"); + // DOMConfigurator.Configure() Client client = new Client(); Console.WriteLine("Client created"); client.connect("192.168.1.14", 5673, "test", "guest", "guest"); diff --git a/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs index e677e91990..eab12ce3c7 100644 --- a/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs +++ b/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -6,11 +6,11 @@ using System.Runtime.InteropServices; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Qpid Demo")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("Built from svn revision number: ")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Apache Software Foundation")] [assembly: AssemblyProduct("Qpid Demo")] -[assembly: AssemblyCopyright("Copyright © Apache Software Foundation 2008")] +[assembly: AssemblyCopyright("Apache Software Foundation")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.10.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/qpid/dotnet/client-010/demo/default.build b/qpid/dotnet/client-010/demo/default.build new file mode 100644 index 0000000000..01cad35665 --- /dev/null +++ b/qpid/dotnet/client-010/demo/default.build @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs index 197c2aa080..7de372bb29 100644 --- a/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs +++ b/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -6,11 +6,11 @@ using System.Runtime.InteropServices; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Qpid Test")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("Built from svn revision number: ")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Apache Software Foundation")] [assembly: AssemblyProduct("Qpid Test")] -[assembly: AssemblyCopyright("Copyright © Apache Software Foundation 2008")] +[assembly: AssemblyCopyright("Apache Software Foundation")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // 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: AssemblyVersion("0.10.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/qpid/dotnet/client-010/test/default.build b/qpid/dotnet/client-010/test/default.build new file mode 100644 index 0000000000..76b1b3ea85 --- /dev/null +++ b/qpid/dotnet/client-010/test/default.build @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1