summaryrefslogtreecommitdiff
path: root/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2010-05-28 18:09:10 +0000
committerTed Ross <tross@apache.org>2010-05-28 18:09:10 +0000
commit947b1491d7a39c87c4560126a6e50646aa2a2b24 (patch)
tree19a5c7ac347d807125f8352ef5f2d41810d79281 /cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver
parent8d317104053b8258380c47af8d792517c4da10b7 (diff)
downloadqpid-python-947b1491d7a39c87c4560126a6e50646aa2a2b24.tar.gz
QPID-2628 - Patch from Chuck Rolke
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@949245 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver')
-rw-r--r--cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs19
-rw-r--r--cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.csproj12
2 files changed, 23 insertions, 8 deletions
diff --git a/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs b/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs
index 6cc2a5e0a5..4888023830 100644
--- a/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs
+++ b/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs
@@ -37,7 +37,20 @@ namespace CSharpDirect
{
String host = "localhost:5672";
String addr = "amq.direct/key";
- int nMsg = 10;
+ Int32 nMsg = 10;
+
+ if (args.Length > 0)
+ host = args[0];
+ if (args.Length > 1)
+ addr = args[1];
+ if (args.Length > 2)
+ nMsg = Convert.ToInt32(args[2]);
+
+ Console.WriteLine("csharp.direct.receiver");
+ Console.WriteLine("host : {0}", host);
+ Console.WriteLine("addr : {0}", addr);
+ Console.WriteLine("nMsg : {0}", nMsg);
+ Console.WriteLine();
Connection conn = new Connection(host);
@@ -52,7 +65,7 @@ namespace CSharpDirect
Session sess = conn.createSession();
- Duration dur = new Duration(1000 * 3600 * 24); // Wait one day
+ Duration dura = new Duration(3600000); // wait forever
Receiver rcv = sess.createReceiver(addr);
@@ -62,7 +75,7 @@ namespace CSharpDirect
{
try
{
- Message msg2 = rcv.fetch(dur);
+ Message msg2 = rcv.fetch(dura);
Console.WriteLine("Rcvd msg {0} : {1}", i, msg2.getContent());
}
catch (Exception e)
diff --git a/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.csproj b/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.csproj
index 8cb4826a01..7bfcfb8331 100644
--- a/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.csproj
+++ b/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.csproj
@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>..\..\..\..\..\src\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -31,10 +31,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="org.apache.qpid.messagingd, Version=1.0.3779.23054, Culture=neutral, PublicKeyToken=679e1f50b62dbace, processorArchitecture=x86">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\bin\Debug\org.apache.qpid.messagingd.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -52,6 +48,12 @@
<Compile Include="csharp.direct.receiver.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\src\org.apache.qpid.messaging.vcproj">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>org.apache.qpid.messaging</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\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.