diff options
| author | Ted Ross <tross@apache.org> | 2010-06-24 12:40:11 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2010-06-24 12:40:11 +0000 |
| commit | 8faa1d55ca1507ae4913e5476f21fbcd83e70bfe (patch) | |
| tree | 18ea72e2b81b36846e4abe4f6d508c48ff25615f /cpp/bindings/qpid/dotnet/src | |
| parent | 4d7371ec8515371d9c547052a91d382ff6400d12 (diff) | |
| download | qpid-python-8faa1d55ca1507ae4913e5476f21fbcd83e70bfe.tar.gz | |
QPID-2589 - Patch from Chuck Rolke
Visual Basic example added, UUID support added, C# Hello World example added.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@957531 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/dotnet/src')
| -rw-r--r-- | cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp b/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp index d463e668c3..c4587fe0f7 100644 --- a/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp +++ b/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp @@ -221,7 +221,25 @@ namespace Messaging { }
break;
-
+ case System::TypeCode::Object :
+ {
+ //
+ // Derived classes
+ //
+ if ("System.Guid" == typeP->ToString())
+ {
+ cli::array<System::Byte> ^ guidBytes = ((System::Guid)managedValue).ToByteArray();
+ pin_ptr<unsigned char> pinnedBuf = &guidBytes[0];
+ ::qpid::types::Uuid newUuid = ::qpid::types::Uuid(pinnedBuf);
+ qpidVariant = newUuid;
+ }
+ else
+ {
+ throw gcnew System::NotImplementedException();
+ }
+ }
+ break;
+
default:
throw gcnew System::NotImplementedException();
@@ -318,6 +336,11 @@ namespace Messaging { }
case ::qpid::types::VAR_UUID:
+ {
+ System::String ^ elementValue = gcnew System::String(variant.asUuid().str().c_str());
+ System::Guid ^ newGuid = System::Guid(elementValue);
+ dict[elementName] = newGuid;
+ }
break;
}
}
@@ -406,6 +429,11 @@ namespace Messaging { }
case ::qpid::types::VAR_UUID:
+ {
+ System::String ^ elementValue = gcnew System::String(variant.asUuid().str().c_str());
+ System::Guid ^ newGuid = System::Guid(elementValue);
+ (*managedList).Add(newGuid);
+ }
break;
}
}
|
