diff options
| author | Ted Ross <tross@apache.org> | 2010-06-15 17:51:10 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2010-06-15 17:51:10 +0000 |
| commit | 163e89881464fb242461fdf769839f58f5b3a28f (patch) | |
| tree | 10672f2fad735e083e5ec82548e680b744ca2004 /cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender | |
| parent | 71f053b9172cfcd5b2487ca8d96356d6250b346a (diff) | |
| download | qpid-python-163e89881464fb242461fdf769839f58f5b3a28f.tar.gz | |
QPID-2589 - Patch from Chuck Rolke
More API cleanup and new examples (to match the examples for other languages)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@954983 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender')
2 files changed, 40 insertions, 5 deletions
diff --git a/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs b/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs index 761ac0aac2..2b17052b3e 100644 --- a/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs +++ b/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs @@ -100,20 +100,55 @@ namespace Org.Apache.Qpid.Messaging.Examples Dictionary<string, object> subMap = new Dictionary<string, object>();
Collection<object> colors = new Collection<object>();
+ // add simple types
content["id"] = 987654321;
content["name"] = "Widget";
content["percent"] = 0.99;
+ // add nested amqp/map
subMap["name"] = "Smith";
subMap["number"] = 354;
+ content["nestedMap"] = subMap;
- content["nested"] = subMap;
-
+ // add an amqp/list
colors.Add("red");
colors.Add("green");
colors.Add("white");
+ content["colorsList"] = colors;
+
+ // add one of each supported amqp data type
+ bool mybool = true;
+ content["mybool"] = mybool;
+
+ byte mybyte = 4;
+ content["mybyte"] = mybyte;
+
+ UInt16 myUInt16 = 5;
+ content["myUInt16"] = myUInt16;
+
+ UInt32 myUInt32 = 6;
+ content["myUInt32"] = myUInt32;
+
+ UInt64 myUInt64 = 7;
+ content["myUInt64"] = myUInt64;
+
+ char mychar = 'h';
+ content["mychar"] = mychar;
+
+ Int16 myInt16 = 9;
+ content["myInt16"] = myInt16;
+
+ Int32 myInt32 = 10;
+ content["myInt32"] = myInt32;
+
+ Int64 myInt64 = 11;
+ content["myInt64"] = myInt64;
+
+ Single mySingle = (Single)12.12;
+ content["mySingle"] = mySingle;
- content["colors"] = colors;
+ Double myDouble = 13.13;
+ content["myDouble"] = myDouble;
//
// Construct a message with the map content and send it synchronously
diff --git a/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj b/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj index 26f2c5b997..1f37ce8dfe 100644 --- a/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj +++ b/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj @@ -3,7 +3,7 @@ <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{12F1C14F-5C7D-4075-9BAE-C091394FF99A}</ProjectGuid>
<OutputType>Exe</OutputType>
@@ -69,7 +69,7 @@ <ItemGroup>
<ProjectReference Include="..\..\src\org.apache.qpid.messaging.vcproj">
<Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
- <Name>org.apache.qpid.messaging</Name>
+ <Name>Org.Apache.Qpid.Messaging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
