summaryrefslogtreecommitdiff
path: root/qpid/dotnet/client-010/addins/ExcelAddInProducer
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/dotnet/client-010/addins/ExcelAddInProducer')
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj83
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs62
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddInProducer/Properties/AssemblyInfo.cs54
3 files changed, 199 insertions, 0 deletions
diff --git a/qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj b/qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj
new file mode 100644
index 0000000000..d9b1b63737
--- /dev/null
+++ b/qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj
@@ -0,0 +1,83 @@
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements. See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership. The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License. You may obtain a copy of the License at
+ -
+ - http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied. See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+ -->
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{80F00C3B-EB38-4B3B-9F77-68977A30B155}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>ExcelAddInProducer</RootNamespace>
+ <AssemblyName>Qpid Excel AddIn Producer</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>2.0</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </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="System" />
+ <Reference Include="System.configuration" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="**\*.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\client\Client.csproj">
+ <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
+ <Name>Client</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\App.config">
+ <Link>App.config</Link>
+ </None>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs b/qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs
new file mode 100644
index 0000000000..a8bbdf2fbd
--- /dev/null
+++ b/qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs
@@ -0,0 +1,62 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+using System;
+using System.Configuration;
+using System.Text;
+using System.Threading;
+using org.apache.qpid.client;
+
+namespace ExcelAddInProducer
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ string host = ConfigurationManager.AppSettings["Host"];
+ int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
+ string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
+ string username = ConfigurationManager.AppSettings["Username"];
+ string password = ConfigurationManager.AppSettings["Password"];
+
+ Client client = new Client();
+ Console.WriteLine("Client created");
+ client.Connect(host, port, virtualhost, username, password);
+ Console.WriteLine("Connection established");
+
+ IClientSession ssn = client.CreateSession(50000);
+ Console.WriteLine("Session created");
+ ssn.QueueDeclare("queue1", null, null);
+ ssn.ExchangeBind("queue1", "amq.direct", "queue1", null);
+ IMessage message = new Message();
+ message.ApplicationHeaders.Add("price", 0);
+ for (int i = 0; i < 100; i++)
+ {
+ message.ClearData();
+ message.AppendData( Encoding.UTF8.GetBytes("test: " + i));
+ message.ApplicationHeaders["price"] = i;
+ ssn.MessageTransfer("amq.direct", "queue1", message);
+ Thread.Sleep(1000);
+ }
+
+ client.Close();
+ }
+ }
+}
diff --git a/qpid/dotnet/client-010/addins/ExcelAddInProducer/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/addins/ExcelAddInProducer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000000..28fe3427cb
--- /dev/null
+++ b/qpid/dotnet/client-010/addins/ExcelAddInProducer/Properties/AssemblyInfo.cs
@@ -0,0 +1,54 @@
+/*
+ *
+ * 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.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 Excel AddIn Producer")]
+[assembly: AssemblyDescription("Built from svn revision number: ")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Software Foundation")]
+[assembly: AssemblyProduct("Qpid Excel AddIn Producer")]
+[assembly: AssemblyCopyright("Apache Software Foundation")]
+[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("3416a5c2-eb70-4d77-b401-dfa659bd419e")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("0.5.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]